ViewID's and SubID's

Options
Why do view ID's have to represent SubID's?

I would love to be able to give things a set SubID. while leaving their view ID a static number..

Rather than when a player instantiates something, it has to be 1001-1002 / 2001-2003. This gives the obvious limitation to 999 objects in the scene owned by that player at any given time. When you run out. kaboom.

Also, if subID's could be used this way, you wouldn't have to set the view ID to the player id + 1000..

You could just set the ID.. and leave it alone.

Currently, with my vehicles. I change the ownership back and forth. Buffering and clearing said buffer when needed. This works out great. But say I get in something. and its ViewID becomes 1003. If I get out of it, it goes back to ID 3, owned by Scene. All is fine and well in Photon Land.

If I instantiate something else, that automatically becomes 1003. because its the third thing I've placed.. and I get back in said vehicle, its Id still gets set to 1003. then, I'm sure by now you see the problem. We have duplicate view ID's. Then the matrix breaks down.

Thoughts?

Comments

  • Tobias
    Options
    The automated way is just the most simple way to get things done without effort for anyone. Most other systems would require more manual work/coding.

    The ViewID is composed of player.ID + sequenceNumber to make sure they don't clash with other player's IDs.
    You can modify the factor for the player.ID if you think you need more than 1000 IDs per player.

    Editing the subId per object is not highly important in most cases, so I have to focus on other stuff. But you have the PUN source and can work on it!
    There is a way to manually allocate view IDs. You should take a look and modify it so you can allocate viewIDs you define yourself. They just have to be stored somewhere to avoid duplicates (and matrix breakdown).