Accidental JetPack in Station Keeping

Some functionality is intentional and some can emerge by an accident.

This is a story of jetpack in Station Keeping.

I've never intended to have a jetpack in the game. The initial design has turbolift to move cosmonauts between station levels.

station-v3.jpg

Then, I've introduced a bug in jump implementation. So my fast-prototyped jump code looked something like this:

is jump key pressed? is Hero vertical speed = 0? set Hero vertical speed = JUMP SPEED

At this point, I didn't want to involve collision detection with tiles and just assumed, that the hero can jump only when vertical speed is zero. The problem is, the vertical speed could be zero not only when the player is on the ground. It is also zero for a very short time when the gravity takes over and starts moving the body back downwards

So, instead of jump, I've implemented an air-jump. The player can jump off the thin air now. Add to that a particle effect and you'll have a jetpack.

sequence-2.gif

Now, why do I need a turbolift? The player already can move between station levels. So I've increased the jump threshold to be in the range of -0.1 to 0.1 and postponed the turbolift implementation for later into the jam.

As all jammers know, the time passes faster than you realize. I've never managed to implement an actual turbolift. All I've got is a last-minute jet-pack particle effect. It was the only thing, that can justify why a character jumps of thin air.

But even that was not without a glitch. The character vertical speed is near zero all the time you hit the ceiling. That creates weird-looking bursts of energy, originating somewhere in the middle of character sprite.

sequence-1.gif

Well... No time to fix. I've packaged the game and pushed the archive to itch.io.

Only when the first feedback started to appear on the page, I've realized the actual problem.

Floating-point calculation and variable delta-time make some things hard to accurately predict. And on some machines, the jetpack didn't work as expected and just created rare sparks with no lift to the character. It resulted in players falling down at the bottom of the space station and not able to get out.

So it was not a jetpack after all. Just a bug with a particle effect :smiley:. Kind of a bummer. It breaks the gameplay.

Only on the second day after the jam I've realized the gravity of the problem and created a patch that fixes the jetpack mechanics. And finally, it feels right.

reduce the jetpack pulse timer is jetpack pulse timer < 0? increase vertical speed reset the jetpack pulse timer It is a pulsating jet-pack. It has quite different feel than permanent jets I've implemented in other games.

sequence-3.gif

Now I'm happy, that players won't be stuck at the bottom level of the space station :smile: