Interest area ID in EnterWorld operation

edited July 2010 in Photon Server
Hello,

I noticed there is an InterestAreaID property in the EnterWorld operation class in the MMO server demo. However, nothing seems to set this value (in the DotNet client, Operations.EnterWorld() does not set this optional interest area ID parameter). Something else that is confusing is that it seem like if multiple actors join the world, they are all given an interest area ID of 0 (by default) if that parameter was not set by the operation request. Shouldn't using the same ID for multiple interest areas cause conflicts?

Personally it seems like interest area IDs are something that would be generated by the server, and your interest area ID is returned to you as a parameter in the EnterWorld operation response.

What was the idea behind this parameter?

Comments

  • BorisBoris ✭✭
    interest area ids are unique per actor. Actor A cannot control interest areas of actor B, so they don't need to be unique for the whole system.
    The client can create additional interest areas and move/attach/resize them independently from each other.

    As for why is there a parameter that is not used: You are right, it's not needed there. The idea was that you might want to start with a different interest area id, but in the end it wasn't used.
    The purpose of the mmo demo is to show case the open world interest management, it's not like Lite where you subclass the LiteGame etc... For most MMOs for instance I would not use a radar where you get the position of all players in the world. with 1000 players there there are 100 movement updates per second delivered to every client.
    so: feel free to make it your own, change whatever you need to change or start with a new project that uses some of the same patterns.
  • BorisBoris ✭✭
    oh by the way: to see a second interest area in action hit F5 in the island demo.
    It spawns an item that has a second interest area attached. the item flies away from you and suddenly you can see players further away (near the item)
Sign In or Register to comment.