Characters randomly hidden on vector map: z-order
Yesterday we had a session with 7 instances of rolisteam.
Instance 1 (mine) hosted the game and I was a player. Instance 2 was the game master's. Instances 4..7 were additional players.
When the game master opened a vector map, all players dragged their avatar onto the map. The game master always saw all players but:
- Instance 1 saw only two players (1 and 4) but player 4 disappeared after some moves;
- Instance 2 saw only one player (2);
- Instance 3 initially saw all players but after a few moves, some players disappeared; etc.
Towards the end of the game, it dawned on me that this might be related to z-ordering, so I suggested to the game master that they right-click on all characters (they were still all visible to them) and apply "bring to front". Sure enough, all characters immediately became visible to all instances. On all instances but the game master's, they were hidden behind the background image of the map.
I think a possible fix is two-fold:
- partition the z-ordering into three non-overlapping intervals; one for each layer on the vector map i.e. ground, objects, characters. This way, characters can never be obscured by objects on the object or ground layers and objects can never be obscured by the ground layer.
- initialize the "altitude" or whatever it's called on all objects to the same value across all instances of rolisteam; i.e. as soon as a player drags their character onto a vector map, make that object top of the z-order and propagate this to all other instances.