Hi, my team is developing a Platformer, and now we encounter a problem, we never guess (until now and the project is almost finished as an alpha ) when the player dies, it goes back to a respawn point, but the mechanics and environment obstacles (where the player dies) are actually completed, and the player stays without a way to keep playing, is there a best practice to restart only that part of the level/scene? I had some Ideas but I think they use a big amount of the Device resources, or are really really boring for the people designing the level
Can you reload the entire level and programmatically complete each checkpoint?
Actually, no, the checkpoints are just a return area and are not completely (how I know they should be) programmed, primarily because we wanted a fast return to the checkpoint, without Loading Screen
In a game I was doing, I implemented an interface where things such as pickups, hazards, monsters, etc that should be reset could be added to a list and then if the player died, I would loop through the list and call their reset method to get them back to where they needed to be and turn them back on. This allowed me to only reset the stuff that had been added to the list.
This could also be achieved by events where stuff could subscribe to an event when snagged. Granted, depending on your pickups, you might need to reset points or coins picked up, but you could register these values when a checkpoint is hit. You could then also clear the list when you hit a checkpoint so stuff behind the checkpoint isnβt reset.
Can you use incremental scene-loading and -unloading to do this?
Alternatively, can you have the stuff that needs to be reset live in prefabs and re-instantiate them whenever a player hits/goes back to a checkpoint?