Need help resetting game

Peace Unto You! I need help, may someone guide me to some video that clearly explains how to reset a game. I’m new to coding so I need a in depth guide on how to do it.

I don’t get how this is the part of my game that I’m having the most issues with. I don’t get how there isn’t a built in system reset in defold. It’s crazy. I only have 1 collection with my entire game, so the use of a collection proxy doesn’t serve for I only have ONE collection.

I need the most simplest way of resetting the ENTIRE game.

I only have 1 collection with my entire game, so the use of a collection proxy doesn’t serve for I only have ONE collection.

The most common way is to use a collection proxy to reload a level.
This is essentially what the collection proxy is made for.

Another way would be to use a factory/collection factory to respawn your items when you choose to. E:.g “Delete all game objects” followed by a “Recreate all game objects!”.
This approach is much more cumbersome, as you have to track each object’s properties, and store them when the level starts.

1 Like

There is a built-in method. It’s sys.reboot()

Okay see my issue is this. I’m using a proxy but it isn’t reloading anything. So basically I got it to where when my player dies a game over screen appears, after 7 seconds the game is supposed to reset. But the only thing that happens is the game over screen disappears, and the game just keeps on running.

I made sure the proxy is in a new collection to not cause cycles, and I made sure the proxy itself has the main collection in mind, but it still doesn’t work.

WTF IT WORKED!!! Okay so I’ve heard that this method may not be useful for HTML5 builds of the game, is there way truth to this?

Not sure, we mostly run Android/iOS builds so I don’t know much about HTML5 builds.

Okay cool yeah my goal is to fully publish the game, so I’m only using the HTLM5 build for testing on iPhone since I don’t wanna drop that $100 a year LOL but from what I can tell it worked.

Oh and I’m testing it on the HTML5 and it appears to be working. OMG I LOVE YOUUUUU