MattGuerrette / VixenEngine

Open Source C++ Game Engine
http://mattguerrette.github.io/VixenEngine/
GNU General Public License v3.0
39 stars 13 forks source link

[VGame] Scene loading needs to be reworked and made better #2

Open MattGuerrette opened 9 years ago

MattGuerrette commented 9 years ago

Currently, there are evident race cases and unknowns involved with interaction between lua scripted game logic and scenes because issues with scene state. The lifetime of a scene and all of its objects needs to be made more concrete.

For example:

LoadScene -> Scene is now created -> initialize all gameobjects -> call initialize (scripting) on all objects -> continue with gameplay.

There was an issue with the current scene not being set correctly in SceneManager due to the current scene loading code, and trying to create or delete objects before a scene has been initialized or made current causes issues. This needs to be addressed.