Hi @endel, you are fast!!
I had it like u suggested at first.
MapRoom has MapState with
- World (static platforms, ground etc)
- PlayerState
- EnemyState
- NpcState
- BlockState (all dynamic bodies that aren't players npcs or enemies)
The player in TownRoom doesn't need to know about the state from MapRoom so I thought to create a room for each map to make the game as lightweight as possible. But thinking now maybe there is a way I can get the data from onAuth and then initiate MapState or TownState based on that without sharing for example NpcState to all the players online.