← All examples

Arrange the room

An open exercise (the open rule): the toys can go on the shelf or on the rug, with no right or wrong answers. It ends when all of them are in place; the ball bounces (animation).

Schema
v2.0
Required features
element.imageelement.textelement.componentelement.targetvisual.textvisual.animationcomponent.draggabletarget.capacitytarget.snaprule.openaction.play-soundaction.returnaction.emit-particles
Components
imagetexttargetcomponent

How to open it in the editor

  1. Click Open in the editor — GS Editor opens with the exercise loaded (scene and assets).
  2. Or click Download the exercise (a ZIP with projekt.json, images/ and sounds/) and choose Open ZIP in the start window of the editor.

Exercise file

Show the JSON (6,858 characters)
{
  "schema": "2.0",
  "requires": [
    "element.image",
    "element.text",
    "element.component",
    "element.target",
    "visual.text",
    "visual.animation",
    "component.draggable",
    "target.capacity",
    "target.snap",
    "rule.open",
    "action.play-sound",
    "action.return",
    "action.emit-particles"
  ],
  "id": "open-exercise",
  "size": {
    "width": 1200,
    "height": 675
  },
  "languages": [
    "pl",
    "en"
  ],
  "defaultLanguage": "pl",
  "assets": [
    {
      "id": "room",
      "kind": "image",
      "src": {
        "default": "images/room.png"
      }
    },
    {
      "id": "shelf",
      "kind": "image",
      "src": {
        "default": "images/shelf.png"
      }
    },
    {
      "id": "bear",
      "kind": "image",
      "src": {
        "default": "images/bear.png"
      }
    },
    {
      "id": "block",
      "kind": "image",
      "src": {
        "default": "images/block.png"
      }
    },
    {
      "id": "duck",
      "kind": "image",
      "src": {
        "default": "images/duck.png"
      }
    },
    {
      "id": "car",
      "kind": "image",
      "src": {
        "default": "images/car.png"
      }
    },
    {
      "id": "ball-bounce",
      "kind": "animation",
      "src": {
        "default": "images/ball-bounce.png"
      }
    },
    {
      "id": "pick-up",
      "kind": "audio",
      "src": {
        "default": "sounds/pick-up.wav"
      }
    },
    {
      "id": "drop",
      "kind": "audio",
      "src": {
        "default": "sounds/drop.wav"
      }
    },
    {
      "id": "win",
      "kind": "audio",
      "src": {
        "default": "sounds/win.wav"
      }
    }
  ],
  "elements": [
    {
      "id": "background",
      "type": "image",
      "rect": [
        0,
        0,
        1200,
        675
      ],
      "layer": 0,
      "visual": {
        "type": "image",
        "asset": "room"
      }
    },
    {
      "id": "instruction",
      "type": "text",
      "rect": [
        72,
        20,
        1056,
        80
      ],
      "layer": 5,
      "visual": {
        "type": "text",
        "text": {
          "pl": "Urządź pokój po swojemu: postaw każdą zabawkę na <b>półce</b> albo na <b>dywanie</b>.",
          "en": "Arrange the room your way: put every toy on the <b>shelf</b> or on the <b>rug</b>."
        },
        "size": 28,
        "color": "#5a3a22",
        "align": "center"
      }
    },
    {
      "id": "shelf",
      "type": "image",
      "rect": [
        380,
        270,
        440,
        132
      ],
      "layer": 1,
      "visual": {
        "type": "image",
        "asset": "shelf"
      }
    },
    {
      "id": "on-shelf",
      "type": "target",
      "rect": [
        380,
        160,
        440,
        120
      ],
      "layer": 1,
      "capacity": "many",
      "snap": {
        "mode": "none"
      },
      "on": {
        "drop": [
          {
            "do": "play-sound",
            "asset": "drop"
          },
          {
            "do": "emit-particles",
            "target": "dropped"
          }
        ]
      }
    },
    {
      "id": "on-rug",
      "type": "target",
      "rect": [
        310,
        560,
        540,
        100
      ],
      "layer": 1,
      "capacity": "many",
      "snap": {
        "mode": "none"
      },
      "on": {
        "drop": [
          {
            "do": "play-sound",
            "asset": "drop"
          },
          {
            "do": "emit-particles",
            "target": "dropped"
          }
        ]
      }
    },
    {
      "id": "bear",
      "type": "component",
      "rect": [
        45,
        525,
        100,
        100
      ],
      "layer": 3,
      "visual": {
        "type": "image",
        "asset": "bear"
      },
      "draggable": {
        "bounds": "scene",
        "hit": "pixels"
      },
      "on": {
        "drag-start": [
          {
            "do": "play-sound",
            "asset": "pick-up"
          }
        ],
        "drop-outside": [
          {
            "do": "return",
            "target": "self"
          }
        ]
      }
    },
    {
      "id": "block",
      "type": "component",
      "rect": [
        165,
        540,
        85,
        85
      ],
      "layer": 3,
      "visual": {
        "type": "image",
        "asset": "block"
      },
      "draggable": {
        "bounds": "scene",
        "hit": "pixels"
      },
      "on": {
        "drag-start": [
          {
            "do": "play-sound",
            "asset": "pick-up"
          }
        ],
        "drop-outside": [
          {
            "do": "return",
            "target": "self"
          }
        ]
      }
    },
    {
      "id": "duck",
      "type": "component",
      "rect": [
        880,
        530,
        90,
        90
      ],
      "layer": 3,
      "visual": {
        "type": "image",
        "asset": "duck"
      },
      "draggable": {
        "bounds": "scene",
        "hit": "pixels"
      },
      "on": {
        "drag-start": [
          {
            "do": "play-sound",
            "asset": "pick-up"
          }
        ],
        "drop-outside": [
          {
            "do": "return",
            "target": "self"
          }
        ]
      }
    },
    {
      "id": "car",
      "type": "component",
      "rect": [
        985,
        540,
        100,
        85
      ],
      "layer": 3,
      "visual": {
        "type": "image",
        "asset": "car"
      },
      "draggable": {
        "bounds": "scene",
        "hit": "pixels"
      },
      "on": {
        "drag-start": [
          {
            "do": "play-sound",
            "asset": "pick-up"
          }
        ],
        "drop-outside": [
          {
            "do": "return",
            "target": "self"
          }
        ]
      }
    },
    {
      "id": "ball",
      "type": "component",
      "rect": [
        1095,
        530,
        90,
        90
      ],
      "layer": 3,
      "visual": {
        "type": "animation",
        "asset": "ball-bounce",
        "frames": 6,
        "fps": 8,
        "loop": true,
        "autoplay": true
      },
      "draggable": {
        "bounds": "scene",
        "hit": "pixels"
      },
      "on": {
        "drag-start": [
          {
            "do": "play-sound",
            "asset": "pick-up"
          }
        ],
        "drop-outside": [
          {
            "do": "return",
            "target": "self"
          }
        ]
      }
    }
  ],
  "rule": {
    "kind": "open",
    "complete": "all-placed"
  },
  "on": {
    "completed": [
      {
        "do": "play-sound",
        "asset": "win"
      },
      {
        "do": "emit-particles",
        "target": "on-shelf"
      },
      {
        "do": "emit-particles",
        "target": "on-rug"
      }
    ]
  }
}