In order to properly synchronize game state changes (i.e. deleting nodes), a queue of events should be implemented that will be processed before Scene::update(). This way, events can be safely scheduled asynchronically (e.g. deleting a node in response to a key press while rendering nodes).
This means that our game loop will essentially consist of
In order to properly synchronize game state changes (i.e. deleting nodes), a queue of events should be implemented that will be processed before Scene::update(). This way, events can be safely scheduled asynchronically (e.g. deleting a node in response to a key press while rendering nodes). This means that our game loop will essentially consist of