So I was watching the LP's of Terraria and I realized the various joys one gets from venturing a cave full of deadly blobs together with your comrades, carrying only a pair of pickaxes and a piece of wood. Naturally, my logical response was to open up Visual C# 2010 Express and hit New Project.

Of course, I knew it wasn't going to be simple. And XNA only offered Microsoft's silly Live service for networking, which was unacceptable. So I looked around for alternatives and everyone seemed to recommend the network library Lidgren. The first thing I did was to learn the basics of networking by making a simple chat server/client in WPF, which I got working after some irritating hours of programming.

So now I'm working on implementing it in XNA. I've got a simple client/server project going, where the clients connect to the server and send data, which the server processes and then sends back to the clients. This works pretty good. When you're running the server and the clients all on the same computer that is... Getting everything updating properly over a network that isn't localhost is a bit more difficult (alright a lot more difficult).

So, now I'm thinking of creating a simple 2D platformer/puzzle game, where you can CO-OP with 3 other players. One player would be the host and set up the server which clients will connect to. The clients will all update their movement and logic locally, and at the same time send their data to the server, which will then be sent to the other clients. That way your own movement is perfectly smooth, while the other clients' movements might lag. Then again, because I only started with network programming two days ago, I have no clue if this is a good idea or not.

No comments:

Post a Comment