devstopfix/elixoids

Change game state to clear out explosions periodically

Closed this issue · 1 comments

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:

  1. if the renderer is not running - the list of explosions grows large - which can crash the sound consumer when they connect
  2. we can only have one consumer otherwise they steal events from each other

Fix:

  1. add id to explosions
  2. keep them in the state for 1s

Closed. UI no longer needs to pause rendering