Treetop Trek

A long level that scrolls: climb ladders, dodge spells and reach the flag. Treetop Trek shows scrolling, ladders, music, pausing, and a wizard that shoots at you.

Treetop Trek โ€” NutHouse
The Treetop Trek level editor zoomed out: a level three screens wide with a dashed yellow Screen box
The level is 1920 pixels wide. The dashed box is what the player sees.

What it shows

Shows: Scrolling, ladders, music, pause. The level is 1920 pixels wide but the screen is 640. Bigger screen (it scrolls) is ticked in the level settings, The screen follows is set to Hero, and Scroll is Only across. The background picture is set to Repeats along. See Levels bigger than the screen.

How to play

โ† and โ†’ run, โ†‘ jumps. On a ladder, โ†‘ and โ†“ climb. Press P to pause and P again to carry on. Squash slimes from above. Stay away from the wizardโ€™s spells, or squash the wizard for 100 points. Touch the flag at the far right to win.

The things in it

HeroPlatform (walk and jump).
CoinTen of them, on the ledges and along the ground.
SlimePatrols back and forth, Speed 15, Falls with gravity.
WizardStays still, on the middle ledge. Rules make it shoot.
SpellA Star from the library, renamed. It has no movement of its own: Shoot at gives it one.
Grass, Wooden Ledge, LadderTiles. Ladders run from each ledge down to the ground.
LivesShow lives as a row of hearts.
Paused, Hint, You WinText. Paused and You Win start hidden.

The rules, one by one

Treetop Trek โ€” Events
The Events tab of Treetop Trek
Fifteen rules, in five groups with comments.
WhenStart of level
DoPlay music Adventure tune (loops)

Music starts once and loops by itself.

WhenUpon pressing P
DoPause, or carry on if paused

One key does both jobs.

WhenThe game is paused
DoShow Paused
WhenNOT: The game is paused
DoHide Paused

Rules still run while the game is paused, so the message can appear and go away. See Pause and carry on.

WhenHero collides with Coin
DoDestroy CoinAdd 10 to the scorePlay Coin
WhenHero collides with SlimeHero is falling
DoDestroy SlimeJump Hero (40)Play Hit
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 squash-or-hurt pair as Coin Quest.

WhenEvery 2 secondsWizard is near Hero (400 pixels)
DoWizard: Shoot at Hero with Spell (speed 35)Play Laser

The wizard only throws spells when you are close. Far away, nothing happens.

WhenHero collides with Spell
DoDestroy SpellSubtract 1 from the livesPlay LoseSet position of Hero to 48, 420Flash Hero for 1.5 seconds
WhenSpell collides with a background
DoDestroy Spell

Spells vanish when they hit you or a tile, so they never pile up.

WhenHero collides with WizardHero is falling
DoDestroy WizardJump Hero (40)Add 100 to the score

Land on the wizard and the spells stop for good.

WhenHero leaves the play area (bottom)
DoSubtract 1 from the livesPlay LoseSet position of Hero to 48, 420Flash Hero for 1.5 seconds
WhenHero leaves the play area (left, right)
DoStop Hero
WhenLives = 0
DoRestart the game
WhenHero collides with Flag
DoShow You WinSwitch off the playerโ€™s controlsStop the musicPlay Win

Switching the controls off means the hero cannot wander away from the flag while the message shows.

Three changes to try

  1. A grumpier wizard. In the Events tab, right-click Every 2 seconds, choose Change settingsโ€ฆ and make it 1 second.
  2. Spooky music. In the sidebar click + Built-in sound and add Spooky tune. In the first rule, click the โœŽ next to Play music and pick it.
  3. A longer trek. Click empty space in the Level tab. On the right change Width from 1920 to 2560. Alt-drag some grass and a ledge into the new space, and move the flag to the end.

Still stuck?

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