Improbable Icon

SpatialOS Forums

A question about Multiserver Shooter Tutorial

In this document

I found this picture, the green area and the red area means two worker’s authority area. But what’s strange to me is that the area on the upper right looks like it has two colors. Is this area for the red worker or the green one? Or just a bug?

Hey there - great to see you’re working through the tutorial!

This isn’t a bug but I can see how it could be confusing. We colour the areas (quadrants of the world in this case) based on whether each worker has authority over any components in that area. In this case, we have an entity at the origin. The way we define the areas means that this entity is considered to be in the top right quadrant. As a result, the fact that the ‘green’ worker is authoritative over some of that entity’s components means that the top right quadrant is coloured both green and red.

I hope this clears things up. Let me know if you have any more questions.

Thank you for your reply. In this example, there is only one server-worker, which means the green worker has the authority of entity at the origin, but this entity is divided into the upper right quadrant, so there will be two colors in the upper right corner.

  1. If the origin entity moves to the left, the green block in the upper right corner disappears and becomes a completely red block.
  2. Entity moving in the upper right corner, red workers own their authority?

I believe you’re correct with both of your points:

  1. Yep, if the entity moves to the left, then the top right quadrant will appear completely red.
  2. Technically this depends on your load balancing strategy. Provided the strategy is two boxes that intersect at x=0 (as it looks like it is here), then as soon as the entity moves to the right, authority for its components would transfer over to the ‘red’ worker. This would mean that the top right quadrant would go red again.

I see, thank you very much