Mastodon Feed: Post

Mastodon Feed

brib@bribstodon.xyz ("brib :neofox_floof:​ :Nonbinary: -> EMF 2026") wrote:

Goal: A game restart magic that reloads the level.

So: My WinScreen has a PlayAgainButtom that emits a game_restart signal. I want this to reload the level node to, well, restart the game.

Idea: Turn level into a scene you can instantiate. When the game starts (or you press the "restart" button), the scene instantiates and is added to the tree, and when it ends, remove the node that gets created.

It seems to work, and actually doesn't feel that cursed? Although I do have to re-connect the signals which seems less than ideal for larger games