ItemType

Eldar9x
edited May 2011 in Photon Server
Hellow all!
Help me, please to understand next things... Do I understand correctly?:

1 ) Actor is a character who manages the Peer. Peer can simultaneously have several Actor. For example, I have a few fighters on the Combat Map, and each is Actor?

2 ) Item is a thing that belongs to the Actor. Actor is the owner of the Item.
For example, Some Fighter (Actor) on the Combat Map have a machine gun. And the gun that is the Item.
Do I understand this construction architecture games?
If so, why ItemType declared as Byte, ( see, for example, Actor.GetOwnedItems (byte itemType)).
Types of things can be much ( much greater than 255 )?

Comments

  • Meaning TBS Strategy Game on the Big Map
  • A MmoPeer can only have one MmoActor at a time. The current MmoActor is also the MmoPeer's current operation handler after entering a world. Only items can be seen on maps, this is why every actor has an item as avatar.
    You will usually not sync every single little thing that you have on your client side as MmoItem. For instance the current gun would be a property of you avatar item, not a separate item. If you really need more than 255 item types we could think about opening this up, but I do also think that you could just combine different item types to one group and then distinguish between them by id.
  • Thanks for response, Boris!
    But how then should I be if I want to manage multiple objects on a map ( in the third person )? For example, I 'd like to see on the map was attended by three fighter. The enemy they are too. Each fighter can be selected. Can be selected several soldiers. Selected fighter ( or fighters ) will move and react to my commands.
    It turns out that here we can not use the concept of Actor... How to be here?
    As for guns, it's just a thing a player in the general inventory. There may be ammunition, armor and so on. What is the essence of the MMO game engine are determined by these objects, if at all possible?
  • Everything players can see and that moves is an item.
    An Actor can have multiple items or none. The Actor is just the glue between peer and world.
    An Actor does not necessarily require an Avatar - just check all Avatar usages to expect null if you do that.

    Everything about an item that others can see is an item property (color, etc).
    Item properties are not really intended to be used for things that change very often because clients that resubscribe will then have to pull the latest properties frequently.
    So I think you should sync amount of ammunition or condition of armor while in combat with normal raise events or with custom operations/events.
  • Thank you very much! Gradually, I begin to understand the structure of mmo application.