Network gaming?

Shade

New member
Joined
Sep 11, 2009
Messages
1
Programming Experience
3-5
I'll try to start easy.. I have 2 pc's in a local network (ip's: 192.168.0.1 and 192.168.0.2) and I want to make them play in a network game, for example, 2 player snake. I would want real time reactions and both players to be able to use the arrowkeys on their own keyboard. Hitting walls or other player results in death.

How would I, if possible achieve something like this? I've done some googling, but always end up with rpg's xD Anything would help, even small stuff, I'm not afraid to experiment on my own, I just have no idea where to start.
 
The fact that this is a game is pretty much irrelevant. There are lots of examples around of chat applications that use the TcpClient and TcpListener classes to communicate. You would do the same. The TcpClient sits on top of a NetworkStream, which you can send any information you want over. If you need a bit more fine-grained control then you might use a Socket instead of a TcpClient as it works at a lower level.
 

Latest posts

Back
Top