Suggestions on compressing data, lowering traffic

Options
eyewitness4560
edited July 2013 in Photon Server
Hi guys, we are in the later stages of our game demo, and we came up on some figures in our traffic that seem a bit excessive, and would greatly appreciate some input regarding it. :)
As it stands, we are building towards a 2D SciFi MMO RPG, where in we pilot spaceships in various solarsystems (AKA rooms), where we have simplified PVP and PVE vs NPCs.
We put together the demo in order to get a gauge on what we'll need server wise, when we go live. We only implemented quite simple things like movement, shooting, regenerating shields and so on. Aside from minor technical mishaps, everything is running quite fine, but we found the underlying data traffic is quite high.
While we have not implemented any kind of "interest area" yet, we send data from everything and everyone in the room to the client.

For the most part, our outbound data consits of movement;
In our movement algorthm we define movement states, and only transmit said state changes towards the clients by and event which looks like this:
1: player assigns target destination and sends it to the server
2: server processes and calculates the movement required (rotation, acceleration, uniform linear motion ), then transmits it to the client
3: client does the animation
(NPC's skip the first one, or rather have their AI do it for them inside the server)

With this in place, we opted to test with 3 players and 2000 NPC's in a room.
(while we're not planning on having this many elements visible at any given time, but it's irrelevant in our findings anyway) Since every client gets movement data from 3 players and 2000 NPC's our client recieves approximately 30 kilobytes of data every second.
What kinda scares us is that with a big user base, and even a bit toned down numbers, this still adds up to a pretty wicked amount of data transmission over a month.
At 40K userbase => 4800CCu => lets say20kbytes/sec/user => 240TB/month => 20 000 $ of outbound data (on amazon's webservices)
We are not planning to run on amazon indefinitely, and this is obviously a pretty skewed data set(2K npc's for god's sake), but is'nt that a bit much even if it's scaled down by a factor of 10?

Any input is appreciated ;)

Comments

  • BesoC
    BesoC ✭✭
    Options
    Traffic should decrease dramatically when you'll implement 'interest area'

    Also, you can try to use json and some compress/uncompress library. We're using Json.Net and ionic.zlib
  • Yep. In this kind of scenario, with large amounts of players (either real players or NSCs), you definitely need to implement interest management.

    Some samples are in our "MMO" project that is part of the Photon SocketServer SDK, you might want to check that out and see if it helps. Any other interest management implementation should work as well.
  • Sweet, we'll try and rely on as small data packets as we can!
    Thanks to both of you :)