ultimately, i wish to argue how peer-to-peer model is faster, much faster, than currently popular server-client model... and in fact, it has so many advantages over S/C that it is mindbogglingly unexplainable why in the world no online multiplayer game use it. why, why, why? but, if there are any games to use it after all, then please let me know about them. ok, here it goes...
THE TRUTH ABOUT SERVER MODEL
- central server collects all the input from all the clients, calculates movement/collision then sends to each client the new machine state, ie. new positions of each entity, velocities, orientation and such, which then each client renders, perhaps utilizing some extrapolation to fill in the gaps from, say network refresh rate of 20Hz to their screen refresh rate of 60 FPS.
to put it simply, games on the internet today run only about 10-20FPS of real server-computed data and clients input samples, regardless of how many FPS your client renders, but those extra frames are only "smooth-candy", and even worse, they may itself be the source of another set of visual artifacts since they can easily mismatch with server's next update.
it can be better, and it's rather simple actually,
but this is not news, p2p is nothing new as we all know, tho most will be surprised that no game actually use this as a main network model for the game, only for chat, patches and some side-stuff. so, one thing is clear, p2p works... but does it work better than server-client model? can it host the whole game? you be the judge!
1.) first let's consider round-trip traversal with the best case scenario for S/C model, where server is in the middle. -- shortest route should yield fastest path.
B C s 30km 20km A D
AB=BC=CD=DA = 30km
As=Bs=Cs=Ds = 20km
*** P2P, one frame loop, per ONE client
round-trip: ~33km (2x 30km, 1x 40km)
packets sent: 3
packets received: 3
total packets per client: 6
*** SERVER, one frame loop, per ONE client
round-trip: 40km
packets sent: 1
packets received: 4
total packets per client: 5
2. second, let's consider bandwidth...
packet overhead= 30 bytes
packet client input= 10 bytes
packet full entity state= 20 bytes
----------------------------------
C/S, client upload per frame: 40 bytes
C/S, client download per frame: 50 bytes * N_clients
P2P, peer upload per frame: 50 bytes * N_peers
P2P, peer download per frame: 50 bytes * N_peers
*** 16 players, per one client, per second, 60Hz
C/S: upload= 40*60 = 2400 bytes/s
C/S: download= 50*16*60 = 48000 bytes/s
P2P: upload= 50*16*60 = 48000 bytes/s
P2P: download= 50*16*60 = 48000 bytes/s
*** 32 players, per one client, per second, 60Hz
C/S: upload= 40*60 = 2400 bytes/s
C/S: download= 50*32*60 = 96000 bytes/s
P2P: upload= 50*32*60 = 96000 bytes/s
P2P: download= 50*32*60 = 96000 bytes/s
3.) third, updates are asynchronous, there is no FAST/SLOW here, no waiting - you only have FURTHER and CLOSER, and further is not SLOWER it is only more behind in the past, but the rate of update is NON INTERRUPTED, has CONSTANT streaming flow. theoretically working on FULL 60Hz and more, where frequency only depends on upload bandwidth, size of packets and number of peers. there is no lag, no glitches, no slowdowns, no waiting on server... only time dilation, depending only on DISTANCE.
CONCLUSION:
- P2P can not only allow for far better update frequency, but asynchronous, continuous updates will smooth many visual glitches automatically and the streaming nature of incoming data would even further make the whole experience more fluid.
1.) does p2p have shorter traversal path than server-based model?
2.) would parallel computing even further speed up latency by getting rid of serial computation server does?
3.) can p2p run on much faster frequency (60HZ and more) due to the nature of uninterrupted, streamed, asynchronous updates?


This topic is locked









