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
Gamejam Devlog - Timedust v0.0.2 - Checkpoints
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.
By the way, go check Rafa Fieno's video on checkpoints, this guy nailed it, it's a lifetime saver:
Get Timedust - Jam Edition
Log in with itch.io to leave a comment.