Coin Quest

Run, jump, squash slimes and reach the flag. Coin Quest shows platform movement, the gravity rules, two levels, and enemies that patrol or chase.

Coin Quest — NutHouse
Level 1 of Coin Quest: sunny hills, grass, wooden ledges, coins, two slimes and a flag
Level 1. Level 2 is a night forest with clouds, bats and spikes.

What it shows

Shows: Platform movement, gravity events, levels. Two levels share almost the same rules, so it is a good place to see how a game goes from one level to the next.

How to play

← and → run. ↑ jumps. Collect every coin, then touch the flag. Land on a slime or a bat from above to squash it for 50 points. Touch one from the side and you lose a life. Spikes always hurt. Fall off the bottom and you lose a life too.

The things in it

HeroPlatform (walk and jump). Jumps with the Up arrow.
CoinStays still, with a spinning animation. Five in each level.
SlimePatrols back and forth, Speed 15, Turn round at the edge of a ledge ticked, Falls with gravity ticked. Level 1 only.
BatChases another object: Hero, Speed 10, Only when closer than 220 pixels. Level 2 only.
SpikesStays still. Level 2 only.
Grass, Wooden Ledge, CloudTiles. Grass is solid. Ledges and clouds are platforms you can jump up through.
Score, Lives, Hint, You WinWords and numbers in front. You Win starts hidden.

The rules, one by one

Coin Quest — Events
The Events tab of Coin Quest with comments between groups of rules
The yellow comments say what each group of rules does.

These are the rules of Level 1. Level 2 has the same ones, with Bat and Spikes instead of Slime.

WhenHero collides with Coin
DoDestroy CoinAdd 10 to the scorePlay Coin

Only the coin you touched is destroyed.

WhenHero collides with SlimeHero is falling
DoDestroy SlimeJump Hero (40)Add 50 to the scorePlay Hit

Falling means you came from above. The small jump is the bounce you feel after a squash.

WhenHero collides with SlimeNOT: Hero is falling
DoSubtract 1 from the livesPlay LoseSet position of Hero to 48, 420Flash Hero for 1.5 seconds

The same touch, the other way round. NOT turns “is falling” into “is not falling”. See NOT: the opposite.

In Level 2 the Spikes rule has no “falling” condition at all, so spikes hurt from every side.

WhenHero leaves the play area (bottom)
DoSubtract 1 from the livesPlay LoseSet position of Hero to 48, 420Flash Hero for 1.5 seconds

Falling into a gap costs a life and sends you back to the start.

WhenHero leaves the play area (left, right)
DoStop Hero

The sides of the level are walls.

WhenHero lands on the ground
DoPlay Bounce

A gravity rule: it happens once, the moment the hero lands.

WhenUpon pressing Up arrowHero is standing on the ground
DoPlay Jump

The jump sound only plays when a jump can really start.

WhenLives = 0
DoRestart the game

Game over means back to Level 1 with fresh lives.

WhenHero collides with FlagNumber of Coin = 0
DoNext level

The flag only works when there are no coins left. In Level 2 this rule shows You Win!, stops the hero and plays a sound instead.

Three changes to try

  1. Higher jumps. In the Level tab click the hero. On the right, change Jump strength from 50 to 70. Now you can reach places you could not before.
  2. Braver bats. In Level 2 click a bat and change Only when closer than from 220 to 0. Zero means always.
  3. A third level. In the Game tab click Duplicate on Level 2, then Edit the copy. Move the coins and the flag. The rules come with it.

Still stuck?

Try the Chocobreak tutorial, open a sample game and read its rules, or look at the questions people ask.