Palace Run

Race through a long palace before the sand runs out. Fight the guards with your sword, jump the spike pits and slip through the gates while they are open.

How to play

โ† and โ†’ run, โ†‘ jumps and Space swings the sword. Potions mend you. Reach the princess at the far end.

The things in it

PrincePlatform movement, with a swing animation.
Palace GuardPatrols, falls with gravity, and has a swing animation too.
Sword SwishA quick flash made in front of the prince when he swings.
Palace GateTwo animations: stopped (shut) and open.
Health, Sand TimerA bar and a timer that counts down from 2 minutes 30.
Vizier SaysA text with three lines, shown one after another.

The sword

Global value F remembers which way the prince faces: 1 for right, -1 for left. The sword swish is made 26 pixels in front of him, times F, so it appears on the side he faces.

WhenPlayer pressed Fire 1Not more than every 0.4 seconds
DoPrince: change animation to swingCreate Sword Swish at (Global("F") * 26, -2) from PrinceSword Swish fades out over 0.2 seconds
WhenSword Swish collides with Palace Guard
DoDestroy Sword SwishAdd 1 to Palace Guard value AFlash Palace Guard
WhenPalace Guard value A โ‰ฅ 3
DoDestroy Palace GuardAdd 100 to score

Each guard counts its own hits in value A. That is how every guard needs three hits, however many there are.

The gates

Every 2.5 seconds the gates switch switch 1. Switch on shows the open animation, off shows stopped. When a shut gate overlaps the prince, he is put back 6 pixels and stopped, like a wall.

Still stuck?

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