Doing regeneration can be a huge pain, especially with dynamic and multi-location scripts all carefully networked together in order to work. Regeneration can cause serious problems with those.
What’d be nice is a way to simply force the game to restart, returning it to the template state, and then ‘rejoining’ each of the players (more like a faux rejoin that fires .PlayerAdded).
Without affecting the players at all, completely reset the game to the way it is stored on ROBLOX’s servers and simulate the PlayerAdded event on Players.
Without affecting the players at all, completely reset the game to the way it is stored on ROBLOX’s servers and simulate the PlayerAdded event on Players. [/quote]
That seems like it would be useful. I’ve actually done something like this a while back. I can give you the scripts if you want.
“Without affecting the players at all, completely reset the game to the way it is stored on ROBLOX’s servers and simulate the PlayerAdded event on Players.”
DataModel:Reset() certainly does not do that. Unfortunately that wouldn’t actually work as well. Or at least it would take sweeping architectural changes to actually be feasible to implement. There’s no good way right now to reset the game’s code without also resetting the core game / player user-interface code.
Plus, it’s of limited value as a feature, since as soon as you want to improve the user experience at all you would stop using it and write your own more fine grained regeneration.
[quote] “Without affecting the players at all, completely reset the game to the way it is stored on ROBLOX’s servers and simulate the PlayerAdded event on Players.”
DataModel:Reset() certainly does not do that. Unfortunately that wouldn’t actually work as well. Or at least it would take sweeping architectural changes to actually be feasible to implement. There’s no good way right now to reset the game’s code without also resetting the core game / player user-interface code.
Plus, it’s of limited value as a feature, since as soon as you want to improve the user experience at all you would stop using it and write your own more fine grained regeneration. [/quote]
I can’t seem to ever get it to work quite right. I always get obnoxious edge cases that end up completely busting it.
When you use as much abstraction as I do it gets hard to regen without breaking everything, and you just want to completely reset the entire game.
… then it should be easier than normal to handle regeneration of your level. You just have to build regeneration into your abstractions as a first class concept from the start.