Slow Rush Studios logo,
    depicting an apprehensive-looking snail rushing forward

Slow Rush Studios

◂  Tilemapping
News index
Architectural Questions  ▸

Level Progression

Contents

This week, levels have a goal to reach, and reaching the goal loads the next level.

You can also die, and revive players by touching the spawn point again.

Level Goals

I implemented exactly the same thing as Broforce, because if it was good enough 9 years ago, it's good enough today, right?

One of the players has to reach a level exit, and reaching that exit loads the next level.

LDTK (our level editor - see last week) has support for "entities", which are just rectangles you can name and place in the level. So both spawn and exit points are created as entities.

Unfortunately I didn't design the test scene file format (still in use for non-LDTK levels, for debugging specific atom behaviors that need higher resolution than tiles) for arbitrary entities, so I made a little migration process to convert the existing test scenes over to the new format. In hindsight the migration was not really worthwhile - I should have just recreated the test scenes I still care about from scratch.

Player Death

Implementing "you beat the level" lead me to make (what was supposed to be) a quick detour to also add "you failed the level": previously, dying would instantly respawn your character so you would never actually fail.

Several hours of reworking my input-handling logic later1, you now stay dead until another player revives you:

For now, reviving only happens when another player touches the spawn area again.

Eventually I expect to have a "Revive" spell that players cast, or maybe (again) the Broforce approach of reviving players at checkpoints if there are lives left.

If all players die, I just reload the existing level.

Playable web build‎

Here, enjoy 3 glorious levels, back to back:

Click to focus, then play with keyboard and mouse. No mobile support! Give feedback.

Notes:


1

I had unwisely de-coupled my input handling and game logic for adding a player, so that new players were added automatically based on the input that was read... and if there was any input from an existing control map for a player who didn't exist anymore (because they died), the game would crash. Whoops.

◂  Tilemapping
News index
Architectural Questions  ▸