Gamejam Devlog - Timedust v0.0.2 - Checkpoints


Timedust checkpoints

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.



Timedust Checkpoint code 01
Position2D's coordinates are sent to the singleton as respawn location


Timedust checkpoints gdscript code

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:

Get Timedust - Jam Edition

Download NowName your own price

Comments

Log in with itch.io to leave a comment.

nice devlog!
I also played your game. Great gamejam entry
ps. I don't know why but YouTube deleted your post, but I read it in the mail. Thanks for sharing the tutorial <3

Hello !
Maybe YT deleted my post because I posted a link?

Anyway, thank you for taking the time to test what I did.