Skip to content

Instantly share code, notes, and snippets.

Last active January 25, 2020 09:23
What would you like to do?
First Game Jam

About the game

The objective of the game is to make sure we are able to complete level 3 having picked all the keys. You are required to code the logic that will allow the rules to apply as so:


  • Crystals: we should make sure all the crystals are picked in a level before we enable the yellow doors.
  • Yellow doors: Provide access to the section that is locked from normal game play, but allow us to access the key that will allow the main level exit door to function.
  • The level exit door: Allow us to move to Stage 2 and Stage 3. The door is only to be activated if the level's key is picked.

How the game works

  • Each time a new stage begins, the exit and yellow doors are de-activated.
  • The player can collect crystals. The crystals should unlock the yellow doors.
  • The yellow doors should be used to then access the key, that should enable the level exit door.
  • The player can access each yellow door from each side. The yellow door transports the player character to and from the key's location (back and forth).

Coding instructions

There are 2 major functions you can use to activate yellow doors and the exit door:

  • setExitDoorActive(true | false);
  • setYellowDoorsActive(true | false);

Functions that should be implemented to respond to events

The following functions should be implemented to respond to events during game play:

  • crystalPicked(totalNumCrystals) - The totalNumCrystals will denote how many crystals in total there are in the current level / room.
  • keyPicked() - Invoked when a key is picked by the player.
  • roomChanged() - Invoked when a new stage is loaded / re-loaded (when the game room changes).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment