Skip to content

Commit

Permalink
Modify title and game_1.lp instructions for second pilot study. Add a…
Browse files Browse the repository at this point in the history
… new dinner intent game.
  • Loading branch information
meldckn committed Feb 14, 2018
1 parent f1688b8 commit 4b2cc99
Show file tree
Hide file tree
Showing 4 changed files with 168 additions and 13 deletions.
146 changes: 146 additions & 0 deletions games/dinner_1.lp
Original file line number Diff line number Diff line change
@@ -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_)).
==========
<ul>
<li>games/dinner_1.lp</li>
<li>GOAL:<ul>
<li>Reduce tension</li>
</ul></li>

<li>HINT:<ul>
<li>
make [[blue|triangle]] touch [[red|triangle]]
</li>
</ul></li>
<li>CONTROLS:<ul>
<li> hold the mouse button
to make [[red|triangle]] orbit the cursor</li>
</ul></ul>
20 changes: 11 additions & 9 deletions games/game_1.lp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
9 changes: 5 additions & 4 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"

}

Expand All @@ -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;
Expand Down Expand Up @@ -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("<h2>Game Information</h2>"+
$("#instructions").html("<h2>Beach Cleanup</h2>"+
"<pre>"+instructions+"</pre>");


Expand Down
6 changes: 6 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,10 @@ div#instructions h2 {

body {
font-family: Abel;
}

#game {
padding:20px;
margin:20px;
background:lightgrey;
}

0 comments on commit 4b2cc99

Please sign in to comment.