How many photonviews can a room have max? Please read my scenario!

Im developing a game where you can shoot high speed bullets. very fast. and a lot. But there are 2 scenarios:


I Photonnetwork.Instantiate each bullet (with transferred ownership) and it has very good position synchronisation even on high speed, I destroy each bullet from the network after 3 seconds. But the Photonview ID still keeps counting up. For example Ive shot 50 bullets, all 50 get removed from the game, it continues counting from 51, is that bad? is there a maximum amount it will reach? like 1000?? I have a lot of photonview components in my game so I really must know.


OR


I have a stash of 200 bullets already as scene objects (outside the player's sight). and everytime a bullet is going to get ''shot'', the bullet quickly goes to the player's gun in one frame and gets shot starting from the next frame, after 3 seconds that bullet gets (destoyed, not really destroyed but gets back into the invisible stash ;)) but this method of quickly going from point A to B to C (from Stash to Gun to the hit position) is very very laggy because it happens so fast (it happens so fast that it actually goes from point A to C, skipping B !), photonview cant keep up with it, but if I didnt use this stash method and instead instantiated (first method) it would be OK.

Method 1 would be perfect, but im afraid theres a photonview limit? is there a limit? or is it OK if the bullets get destroyed and basically removed the photonview ID from the game, or is it a problem that it still keeps counting up?


Please help and thanks!

Comments

  • S_Oliver
    S_Oliver ✭✭✭
    I think the Photonview Limit is 999. You should use Pooling, dont destroy bullets, deactivate them when not used and activate when needed. You also could use Raycast instead and add some particle effects so it looks like you shooting bullets.
  • DavoMyan
    DavoMyan
    edited April 2018
    S_Oliver said:

    I think the Photonview Limit is 999. You should use Pooling, dont destroy bullets, deactivate them when not used and activate when needed. You also could use Raycast instead and add some particle effects so it looks like you shooting bullets.

    That is what I do in the 2nd method but that is laggy, I keep them in a stash and then re-use them when needed. But I just realised something, maybe instead of putting them in a stash I should put all of them invisible in front of the player, that way it doesnt go from A to B to C anymore but instead straight from B to C!

    Also yeah I have to figure out how those particles work, I was thinking about that and that seems like a great idea