Kaiser_Kun
Green Slime
help me please ;---;
Not sure why this happens? Lol as for me the bottleneck is ALWAYS the Host/upload side.
Which means if you are hosting a Multiplayergame for 3 other people then your DSL should better be damn good.
What also is to say that you have to update each tick in the game for everything. (meaning every other players graphics every enemies graphics the life vars etc.
Simple example, you are host and you have 1 k/bytes upload and 3 Clients are connected.
On your map are 3 Enemies.
Each entity has 2 Variables for the coordinates (16 bit*2)
Each entity has 4 Variables for HP/MAXHP EP/MAXEP (8bits*4)
Each entity has 1 Variable for the Grahpic number which is showing and the animation state (16bit+8bit)
=> For each entity you have to calculate 88 bit per tick. (and thats just the basic of the basic information needs to be updated)
The game runs at 60 FPS so per second 60 Updates meaning (88 bit * amount of entities*60)= k/bytes which a client needs.
Now comes the tricky part if you have 3 Clients then you have to multiply by 3 => 88bit*amount of entities*60*3=k/bytes
On our map are 3 enemies we have 3 clients and therefore summed up 7 Entities. And we divide by 8 for getting bytes not bits and divide by 1000 for getting k/bytes not bytes
=>
88 bit *7Entities*60Frames*3Clients/8/1000 = 13,860 k/bytes = 0,01386 M/bytes
So as you can see even trough this small data which has to be transfered the host is the bottleneck because the Upload on normal internet accesses is very much smaller than the download.
I once wrote for this problem a feature which only let the host update entities that are in range of twice the screen of ANY Player (only NPCs and enemies are updatet which can be seen by a player)
This saved a lot of bandwith for the host but i think teddy already implemented such a thing and more tricks.