Game Development Community

P2P style network on TNL

by Chris Kim · in Torque Game Engine · 08/04/2006 (1:38 pm) · 1 replies

I'm new to TNL and I'm about to start a project that require p2p style network, that is, game continues after host player leaves the game.
Is this feature supported in TNL or has anyone implemented it?
I would really like to hear about it before I jump in.
If no one has attempted it before, how difficult to support it in TNL, perhaps adding this feature to Zap would be super awesome!.
Regards,

-ck

#1
08/04/2006 (9:53 pm)
You may want to think this through again. I am not saying it can't be done, and I am NOT saying it wouldn't be awesome...

However the implications of this should be a concern. These are the ones I can think of off the top of my head:
* Host drops...when the host drops, every client is going to get a loss of information which the server knew about, but did not have time to send. The last packet that a client gets from the host will be, at least, the ping-time in miliseconds behind. Assuming 80ms ping time, which is pretty good, you just lost 80ms of simulation time. _This may not be critical to your game!_ A turn based game would totally work.

* All players must know about the simulation data for all players, since they could become the host at any time. That means that all clients need to get sent...all the information. Scoping goes right out the window. Any kind of data security goes out the window, unless you do some kind of perodic information checks or something in which the acting-server would tell all clients to send information and compare it.

* This has the potential for huge network usage. (I'd say 'requirement' but I have been wrong about a great many things in the past.) Basically, since any client can become the server at any given time, it's critical that any client must be able to create a server which would be the-same-enough to any other client that it doesn't matter who becomes the new server. This means a lot of information synchronization, across a network.

In a game like Risk, or something, than this is not at all impossible to do. A game like Zap, however, would be very, very, very, very difficult, in my opinion. I'd love to see it, don't get me wrong, but there is just a huge can of worms waiting for people who try it.