itch.io is community of indie game creators and players

Devlogs

Gamejam Devlog - Timedust v0.0.2 - Checkpoints

Timedust - Jam Edition
A browser game made in HTML5
Checkpoints allow to respawn at certain locations


A real quick update, as I continue pushing forward to make a new game!
I already did the Checkpoints stuff back in my game Moonie for the Nokia3310 Jam.

However, I forgot a lot of stuff haha, so I had to remind myself how to do things.

The key here is obviously to use an autoloaded singleton to which I send the respawn pose each time a Checkpoint is activated.

On the object Checkpoint itself, there is an area 2d that will only the detect the Player. If Player is detected, then the Checkpoint becomes active and sent its coordinates to the singleton.

For as long as the singleton's variable match the checpoint's global_position, it remains active. If it's different (in case a different Checkpoint is activated), that checkpoint returns to be inactive.

For cosmetic, I added a Position2D node as a coordinates reference point for respawn. It's slightly more elevated that the checkpoint itself, so whn the Player respawns, it spawns at the top of it, then fall into the ground.



Position2D's coordinates are sent to the singleton as respawn location


Check if the coordinates are different than the singleton's


By the way, go check Rafa Fieno's video on checkpoints, this guy nailed it, it's a lifetime saver:

Download Timedust - Jam Edition
Read comments (2)