From 4b2cc99a29512a962331fd2359dfdbb0ae6cfbc8 Mon Sep 17 00:00:00 2001 From: Melanie Dickinson Date: Wed, 14 Feb 2018 10:58:31 -0800 Subject: [PATCH] Modify title and game_1.lp instructions for second pilot study. Add a new dinner intent game. --- games/dinner_1.lp | 146 ++++++++++++++++++++++++++++++++++++++++++++++ games/game_1.lp | 20 ++++--- js/main.js | 9 +-- style.css | 6 ++ 4 files changed, 168 insertions(+), 13 deletions(-) create mode 100644 games/dinner_1.lp diff --git a/games/dinner_1.lp b/games/dinner_1.lp new file mode 100644 index 0000000..f6b864d --- /dev/null +++ b/games/dinner_1.lp @@ -0,0 +1,146 @@ +label(resource(r_1_XX_),tension,write). +label(entity(e_2_XX_),friend1). +label(entity(e_3_XX_),friend2). +label(resource(r_2_XX_),activism,read_only). +label(entity(e_1_XX_),emma). + +entity(e_1_XX_). +entity(e_2_XX_). +entity(e_3_XX_). + +resource(r_1_XX_). +resource(r_2_XX_). + +singular(entity(e_1_XX_)). + +many(entity(e_2_XX_)). +many(entity(e_3_XX_)). + +initialize(set_value(resource(r_1_XX_),scalar(0))). +initialize(add(entity(e_1_XX_),scalar(1),location(middle,center))). +initialize(add(entity(e_2_XX_),scalar(1),location(top,left))). +initialize(add(entity(e_2_XX_),scalar(1),location(top,right))). +initialize(add(entity(e_2_XX_),scalar(1),location(bottom,left))). +initialize(add(entity(e_2_XX_),scalar(1),location(bottom,right))). +initialize(add(entity(e_3_XX_),scalar(1),location(top,center))). +initialize(add(entity(e_3_XX_),scalar(1),location(middle,left))). +initialize(add(entity(e_3_XX_),scalar(1),location(middle,right))). +initialize(add(entity(e_3_XX_),scalar(1),location(bottom,center))). +initialize(set_color(entity(e_1_XX_),red)). +initialize(set_sprite(entity(e_1_XX_),triangle)). +initialize(set_sprite(entity(e_2_XX_),triangle)). +initialize(set_sprite(entity(e_3_XX_),triangle)). +initialize(set_color(entity(e_2_XX_),blue)). +initialize(set_color(entity(e_3_XX_),green)). +initialize(set_draggable(entity(e_2_XX_),true)). +initialize(set_draggable(entity(e_3_XX_),true)). + +controlLogic(draggable(entity(e_2_XX_))). +controlLogic(draggable(entity(e_3_XX_))). + +timer_logic(timer(t_1_XX_),scalar(7),loop). + +pool(entity(e_1_XX_),location(top,left),random,random). +pool(entity(e_1_XX_),location(top,center),random,random). +pool(entity(e_1_XX_),location(top,right),random,random). +pool(entity(e_1_XX_),location(middle,left),random,random). +pool(entity(e_1_XX_),location(middle,center),random,random). +pool(entity(e_1_XX_),location(middle,right),random,random). +pool(entity(e_1_XX_),location(bottom,left),random,random). +pool(entity(e_1_XX_),location(bottom,center),random,random). +pool(entity(e_1_XX_),location(bottom,right),random,random). +pool(entity(e_3_XX_),location(top,left),random,ordered). +pool(entity(e_3_XX_),location(top,center),random,ordered). +pool(entity(e_3_XX_),location(top,right),random,ordered). +pool(entity(e_3_XX_),location(middle,left),random,ordered). +pool(entity(e_3_XX_),location(middle,center),random,ordered). +pool(entity(e_3_XX_),location(middle,right),random,ordered). +pool(entity(e_3_XX_),location(bottom,left),random,ordered). +pool(entity(e_3_XX_),location(bottom,center),random,ordered). +pool(entity(e_3_XX_),location(bottom,right),random,ordered). +pool(entity(e_2_XX_),location(top,left),ordered,ordered). +pool(entity(e_2_XX_),location(top,center),ordered,ordered). +pool(entity(e_2_XX_),location(top,right),ordered,ordered). +pool(entity(e_2_XX_),location(middle,left),ordered,ordered). +pool(entity(e_2_XX_),location(middle,center),ordered,ordered). +pool(entity(e_2_XX_),location(middle,right),ordered,ordered). +pool(entity(e_2_XX_),location(bottom,left),ordered,ordered). +pool(entity(e_2_XX_),location(bottom,center),ordered,ordered). +pool(entity(e_2_XX_),location(bottom,right),ordered,ordered). + +boundary(closed). + +initialize(set_value(resource(r_1_XX_),scalar(0))). +initialize(set_value(resource(r_1_XX_),scalar(1))). +initialize(set_value(resource(r_2_XX_),scalar(10))). + +precondition(ge(resource(r_1_XX_),scalar(9)),outcome(o_1_XX_)). +result(outcome(o_1_XX_),mode_change(narrative_gating)). + +precondition(control_event(button(mouse,pressed)),outcome(o_2_XX_)). +result(outcome(o_2_XX_),add(entity(e_2_XX_),scalar(1),pool(entity(e_2_XX_)))). + +precondition(overlaps(entity(e_1_XX_),entity(e_2_XX_),true),outcome(o_3_XX_)). +result(outcome(o_3_XX_),add(entity(e_3_XX_),scalar(1),pool(entity(e_3_XX_)))). +result(outcome(o_3_XX_),delete(entity(e_2_XX_))). + +precondition(ge(resource(r_2_XX_),scalar(6)),outcome(o_4_XX_)). +precondition(overlaps(entity(e_1_XX_),entity(e_3_XX_),true),outcome(o_4_XX_)). +result(outcome(o_4_XX_),decrease(resource(r_1_XX_),scalar(20))). +result(outcome(o_4_XX_),delete(entity(e_3_XX_))). + +precondition(timer_elapsed(t_1_XX_),outcome(o_5_XX_)). +result(outcome(o_5_XX_),add(entity(e_2_XX_),scalar(1),pool(entity(e_2_XX_)))). + +precondition(overlaps(entity(e_2_XX_),entity(e_3_XX_),true),outcome(o_6_XX_)). +result(outcome(o_6_XX_),decrease(property(entity(e_3_XX_),health),scalar(10))). +result(outcome(o_6_XX_),delete(entity(e_2_XX_))). + +precondition(control_event(button(mouse,held)),outcome(orbit_the_cursor_entity_e_1_XX__XX__XX_)). +result(outcome(orbit_the_cursor_entity_e_1_XX__XX__XX_),increase_over_time(resource(r_1_XX_),scalar(1))). +result(outcome(orbit_the_cursor_entity_e_1_XX__XX__XX_),look_at(entity(e_1_XX_),cursor,nearest)). +result(outcome(orbit_the_cursor_entity_e_1_XX__XX__XX_),moves(entity(e_1_XX_),left,scalar(3))). + +precondition(tick,tick). +result(tick,apply_restitution(entity(e_1_XX_),entity(e_1_XX_))). +result(tick,apply_restitution(entity(e_2_XX_),entity(e_2_XX_))). +result(tick,apply_restitution(entity(e_3_XX_),entity(e_3_XX_))). + +reading(goal(reduce),resource(r_1_XX_)). +reading(bad,resource(r_1_XX_)). +reading(consumes,relation(entity(e_1_XX_),resource(r_1_XX_))). +reading(consumes,relation(entity(e_2_XX_),property(entity(e_3_XX_),health))). +reading(consumes,relation(entity(e_3_XX_),property(entity(e_3_XX_),health))). +reading(consumes,relation(entity(e_3_XX_),resource(r_1_XX_))). +reading(bad,outcome(orbit_the_cursor_entity_e_1_XX__XX__XX_)). +reading(bad,outcome(o_4_XX_)). +reading(good,outcome(o_4_XX_)). +reading(good,outcome(o_3_XX_)). +reading(good,entity(e_1_XX_)). +reading(good,entity(e_3_XX_)). +reading(hurt,relation(entity(e_3_XX_),entity(e_2_XX_))). +reading(hurt,relation(entity(e_2_XX_),entity(e_3_XX_))). +reading(risk_reward,ge(resource(r_2_XX_))). +reading(risk_reward,overlaps(entity(e_1_XX_),entity(e_3_XX_),true)). +reading(risk_reward,overlaps(entity(e_1_XX_))). +reading(risk_reward,overlaps(entity(e_3_XX_))). +reading(tradeoff,outcome(o_4_XX_)). +reading(stakes(low),resource(r_2_XX_)). +reading(outcome_hurts,relation(outcome(orbit_the_cursor_entity_e_1_XX__XX__XX_),resource(r_1_XX_))). +reading(risk,outcome(orbit_the_cursor_entity_e_1_XX__XX__XX_)). +========== + diff --git a/games/game_1.lp b/games/game_1.lp index b82b58e..24ff5fa 100644 --- a/games/game_1.lp +++ b/games/game_1.lp @@ -57,7 +57,9 @@ reading(grinding,resource(r_1_XX_)). ========== With labels: -Red triangles can be dragged around with the mouse +Red triangles are people. + +They can be dragged around with the mouse. If a red triangle overlaps a red triangle: effort will increase by 1 @@ -73,15 +75,15 @@ If the mouse button is pressed, ========== Without labels: -Red triangles can be dragged around with the mouse +Red triangles metaphorically represent people + trying to clean up a beach and save a crab population. -If a red triangle overlaps a red triangle: - effort will increase by 1 - the area under the cursor will be set to clear color - both of the red triangles will be deleted +They can be dragged around with the mouse. -If effort is larger than 3 and there is less than 90% orange, - all red triangles' health will decrease by 6 over time +If two people overlap: + effort will increase by 1 + the colored area under the cursor will cleared + both people will be deleted. If the mouse button is pressed, - a red triangle will appear + a new person will appear. diff --git a/js/main.js b/js/main.js index cef9a9a..6dafc2b 100644 --- a/js/main.js +++ b/js/main.js @@ -26,7 +26,8 @@ requirejs.config({ "game_3" : "../games/game_3.lp", "game_4" : "../games/game_4.lp", "game_5" : "../games/game_5.lp", - "game_6" : "../games/game_6.lp" + "game_6" : "../games/game_6.lp", + "dinner_1" : "../games/dinner_1.lp" } @@ -42,11 +43,11 @@ requirejs.config({ requirejs( ["Phaser","AspPhaserGenerator","text!initialPhaserFile", - "text!game_1","text!game_2","text!game_3","text!game_4","text!game_5","text!game_6", + "text!game_1","text!game_2","text!game_3","text!game_4","text!game_5","text!game_6","text!dinner_1", "text!HealthBar","text!State","text!Condition","text!Display","text!StoryAssembler", "jQuery"], function (Phaser, AspPhaserGenerator, initialPhaserFile, - game_1,game_2,game_3,game_4,game_5,game_6, + game_1,game_2,game_3,game_4,game_5,game_6,dinner_1, HealthBar, State, Condition, Display, StoryAssembler) { var gameFile = game_1; @@ -93,7 +94,7 @@ requirejs( // Discard the first line of the instructions ("With labels:" or "Without labels:") instructions = instructions.substring(instructions.indexOf("\n",1) + 1); - $("#instructions").html("

Game Information

"+ + $("#instructions").html("

Beach Cleanup

"+ "
"+instructions+"
"); diff --git a/style.css b/style.css index 6a96b6a..40e45f1 100644 --- a/style.css +++ b/style.css @@ -28,4 +28,10 @@ div#instructions h2 { body { font-family: Abel; +} + +#game { + padding:20px; + margin:20px; + background:lightgrey; } \ No newline at end of file