Change game state to clear out explosions periodically
Closed this issue · 1 comments
devstopfix commented
Currently the game state is expected to have one consumer, and when the state is retrieved the explosions are cleared.
This has two side effects:
- if the renderer is not running - the list of explosions grows large - which can crash the sound consumer when they connect
- we can only have one consumer otherwise they steal events from each other
Fix:
- add id to explosions
- keep them in the state for 1s
devstopfix commented
Closed. UI no longer needs to pause rendering