Conserving Msg/sec in movement

Options
Hi all,

I should start out with some backstory on the game I'm making. It's an arena-based mech shooter that (we hope) will be able to support up to 8 players at once.

I've been trying to research as much as I can before coming to the forums for help, but I just can't seem to wrap my head around how I might go about meeting the 500 message soft limit when using 8 players.

When playing with 4 players, we sit comfortably under the message limit (peaking at 450 before much of my optimization, so likely around 300s now). I've written a script that stress tests the game with 8 clients in two scenarios:

1. Constantly moving with guns firing at all times
2. Constantly moving without firing any weapons

With 8 players, the first scenario yields 1210 max messages/sec, and the second yields 580. I have one more optimization that I plan to do that will make all code aside from movement use far less msg/sec soon.

If only movement itself (using photon transform views at 12 msg/sec sendrate) already breaks the 500 message limit, I don't think this game is going to be able to meet photon's acceptable message rate per room.

The only way I can see even just movement using less than 500/sec is to condense all movement code into one array and send it at 5 messages/sec (super slow!). By my calculations, this would put just movement at 320 msg/sec per room, leaving me not a lot of wiggle room for other functions. Network culling isn't really an options due to the close proximity of all players in the arena.

Does anyone have any other solutions to condensing movement code without extremely low send rates? Also, how much would it cost to run a game with a higher msg/sec? I've seen photon developers mention that this is a last ditch effort scenario, but I haven't seen any numbers on the subject.

Sorry for the long post, and thank you in advance for any replies.

Comments

  • Markus
    Options
    Optimizing your netcode is always a good thing.
    But, the msg/s limit is not a hard cap, so you can go over a bit.
    Keep in mind
    - mobile clients may get overwhelmed with sending too many messages
    - keep an eye on your used traffic (see pricing page for overage cost)
    - we might ask you to lower your msg/s rate, if your app starts to have any negative effect on the cloud due to msg/s rate

    That being said, if you already optimized most things and traffic usage is ok, you might be good to go.

    Checking further optimization options is of course a good thing - maybe you can get in 10 players.