cyanskies / hades

A 2d game framework
1 stars 0 forks source link

Call on_connect for systems when starting a new level. #128

Open cyanskies opened 1 year ago

cyanskies commented 1 year ago

Currently starting a level is the same as loading a save, but this means that pre-placed objects in the editor will never have on_connect called for them. I want to provide the guarantee that on_connect is called exactly once for each object, so that it can be used for one off gameplay logic safely (such as registering new tanks with the player object).

This will require replacing the current level start sequence, which is to convert the level into a level save at time 0.

A possible solution is to create the empty level and then add objects to it one by one.