Dev Log: Efficient data transfer and processing

Discussion in 'Developers Blog' started by Chris, Nov 18, 2014.

  1. Chris

    Chris Well-Known Member Staff Member

    • Stardale Staff
    • Developer
    Joined:
    Mar 29, 2014
    Messages:
    157
    Likes Received:
    354
    Trophy Points:
    78
    mooCow
    One of the things I've been working on is optimization of data processing and transferring from client <-> server. This is a huge component of ensuring that the game doesn't eat up all your bandwidth, or just as bad, run your CPU up 100% without blocking or properly managing the data stream. Things you have to begin taking into consideration is that the game could be running 60+ FPS, the player could be moving each frame, but do you really want to send out 60 position updates 60+ times per second to the server? If you have 10 players each at 60fps, that would be 600 updates per second for the server to manage. If you have 100 players at 60fps, that would be 6000 updates sent per second all sent to one server - clearly it would kill many lower end servers and pretty much burn them down especially if it isn't optimized.

    Another thing to deal with is how to send that data. For example, simply serializing with C# using the default BinaryFormatter is inefficient for high performance data if you use it out of the box. There are rewrites such as protobuf, which claim to serialize data approximately 12x faster than BinaryFormatter which I've been testing. Another option is not to serialize certain data which is also an option, although serialization makes it way easier to send and then deserialize and handle that data on the receiving end.

    So there you have it, I didn't think it would take so long to optimize but either way we'll work through it! It'll be lots of fun when we get there. I can't wait to blow up and take some resources from some unsuspecting space pilots :p. *evil laugh*
     
    #1
    Mahsa, Raeden, gnarvin and 4 others like this.
  2. baebos

    baebos New Member

    Joined:
    Oct 20, 2014
    Messages:
    8
    Likes Received:
    16
    Trophy Points:
    3
    But what if that space pilot actually is suspecting(mini nuke missile launcher comes out of top of space ship) *eviller laugh*
     
    #2
    Sh4dowWalker96 and Chris like this.
  3. OldNESJunkie

    OldNESJunkie Well-Known Member

    Joined:
    Nov 6, 2014
    Messages:
    23
    Likes Received:
    38
    Trophy Points:
    63
    mooCowmooCowmooCowmooCowmooCow
    "It's a TRAP!!!"
     
    #3
    Sh4dowWalker96 and Chris like this.
  4. Sh4dowWalker96

    Sh4dowWalker96 Member

    Joined:
    Sep 30, 2014
    Messages:
    24
    Likes Received:
    27
    Trophy Points:
    13
    "Commander! Ready the Ion Cannons! We found a target!" "Yes sir! Ion Cannons primed and ready to fire at your command!"
     
    #4
    Chris likes this.
  5. Chris

    Chris Well-Known Member Staff Member

    • Stardale Staff
    • Developer
    Joined:
    Mar 29, 2014
    Messages:
    157
    Likes Received:
    354
    Trophy Points:
    78
    mooCow
    "Sir we've just hit an EM mine, we're drifting in space without control."
    *Enemy ship decloaks*
    "Oh sh*t..."
    *In one bright flash of light, an array of missiles, laser cannons, and projectile weapons launch in your direction. You blink and find yourself waking up at a cloning facility on your home world. Your crew, a band of merry men you rescued from a labour camp, were not so lucky.*
     
    #5
    Sh4dowWalker96 likes this.
  6. Sh4dowWalker96

    Sh4dowWalker96 Member

    Joined:
    Sep 30, 2014
    Messages:
    24
    Likes Received:
    27
    Trophy Points:
    13
    "Sigh, third time this week. Let's see if I can find a crew that isn't entirely incompetent for once. But first to get a new ship..... again."
     
    #6
    Kane Hart likes this.

Share This Page