0

I'm following a trivial sample official Kryonet page:

https://github.com/EsotericSoftware/kryonet

And in Server I only send an empty class object:

MyEmptyObject object = new MyEmptyObject();
server.sendToAllTCP(object);

But I'm worry about the size of the Object that is about 44 bytes when I've catched with Wireshark. That's really hurt the network bandwidth because I'm trying to use Kryonet to create a Server-client multiplayer game. Is there something wrong with my setup or Kryonet is not targeted to game.

  • 2
    44 bytes is honestly less than this comment that I've written here. – EpicPandaForce Jun 15 '15 at 15:08
  • 1
    64k is a typical TCP window size. 44 bytes is 0.06% of this. Come back when you have profiled your and verified that 44 bytes overhead per object is indeed a problem. – aioobe Jun 15 '15 at 15:11
  • I want to minimize as possible, because a float number is just 32 bits and for example my GameObject contains 10 float numbers so it's just 320 bits(40 bytes). But the above is just an empty class. The truth that when I've try to catched some popular game such as Warcraft 3, they just send about 60 bytes per packet (20 packets per second). – Võ Hồng Kha Jun 15 '15 at 15:16
  • I want my server can send about 100 entity's snapshots to clients. Each entity has 10 float numbers, and the sending rate is 20 snapshots per second. So if I use kryonet, it should take 83 bytes* 100 * 20 = 166 000 bytes per second (I've try to send an Object with 10 float numbers, it take 83 bytes). Isn't it possible to transfer to 10 clients simultaneously? Thanks for your concerns. – Võ Hồng Kha Jun 15 '15 at 15:27

0 Answers0