Maximum Photon Views

Options
I see within the documentation that there is a maximum of 1000 photon views. Can this be changed without going to on-premise?

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @RillyBoss,

    Thank you for choosing Photon!

    I don't know where you read that info (could you point us to it?) but here is a "very old" docs snippet that is now removed (sharing it for reference but it would help if you tell us what you need exactly and what are you worried about?):

    For performance reasons, the PhotonNetwork API supports up to 1000 PhotonViews per player and a maximum of 2,147,483 players (note that this is WAY higher than your hardware can support!).
    You can easily allow for more PhotonViews per player, at the cost of maximum players.
    This works as follows:

    PhotonViews send out a viewID for every network message.
    This viewID is an integer, composed of the player ID and the player's view ID.
    The maximum size of an int is 2,147,483,647, divided by our MAX_VIEW_IDS(1000) that allows for over 2 million players, each having 1000 view IDs.
    As you can see, you can easily increase the player count by reducing the MAX_VIEW_IDS.
    The other way around, you can give all players more VIEW_IDS at the cost of less maximum players.

    It is important to note that most games will never need more than a few view ID's per player (one or two for the character...and that's usually it).
    If you need much more then you might be doing something wrong!
    It is extremely inefficient to assign a PhotonView and ID for every bullet that your weapon fires, instead keep track of your fire bullets via the player or weapon's PhotonView.

    There is room for improving your traffic performance by reducing the int to a short( -32,768, 32,768).
    By setting MAX_VIEW_IDS to 32 you can then still support 1023 players Search for "//LIMITSNETWORKVIEWS&PLAYERS" for all occurrences of the int viewID.
    Furthermore, currently the API is not using uint/ushort but only the positive range of the numbers.
    This is done for simplicity and the usage of viewIDs is not a crucial performance issue in most situations.