• Advertisement
Sign in to follow this  

Becoming a network programmer

This topic is 3872 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was interested in focusing my programming towards network programming and was wondering if anyone could list possible programs that I could code to help develop my understanding and skills.

Share this post


Link to post
Share on other sites
Advertisement
A direct chat client is a good one to start with. After that, a simple game like multiplayer networked Tetris would give some good experience. Next, a simple server of sorts that allows (and supports) lots of connections without becoming too bogged down. Doing the server before the game might be better, depends on a few things. Umm, after that... Not sure, maybe someone else can provide some more insight.

Share this post


Link to post
Share on other sites
Multiplayer pong.

That's probably the most intuitive game you could do, it's simple to code (2 paddles, a ball), and it's not really performance sensitive (you need 4 ints to synchronize full game state). Good introduction to UDP.

Web server.

If you use Java or C# (to take care of string parsing and memory management) basic web server is trivial to implement. Reading the HTTP RFC is also a good introduction into the material you'll be dealing with. Introduction to TCP/IP.

Reliable UDP.

That's more advanced, but developing reliable data transfer over UDP makes for nice introduction to low level networking and the real world issues you'll deal with.

Each of these, if you have programming experience already, are 1-2 day tasks, possibly a day more to read the documentation.

Share this post


Link to post
Share on other sites
Quote:
Original post by rajend3
I was interested in focusing my programming towards network programming and was wondering if anyone could list possible programs that I could code to help develop my understanding and skills.


1. A text-only MUD that you can edit live from inside it

(makes you learn how to load/save live from inside a server, manage multiple connected clients connecting and disconnecting arbitrarily)

2. A multiplayer-racing game with fast moving cars and tight corners

(makes you write fast network code and synch-management)

3. An RTS with 100% replayable recorded matches

(makes you write deterministic gameplay and network code)

Share this post


Link to post
Share on other sites
A fast multiplayer racing game is among the most challenging network applications you can create. It's probably not the second kind of program you should write while learning :-)

All the three games you suggest have their own important challenges, and after writing all three, you're probably ready to start thinking about an MMO. However, there's a long path to that goal. I second the recommendation to start with a networked pong -- it has enough of the nasty problems to keep you occupied for a while.

Share this post


Link to post
Share on other sites
Thanks for all the suggestions, I'll probably start of with a messenger program and pong before I try any of the advanced programs like multi-player racing.

Share this post


Link to post
Share on other sites
Quote:
Original post by hplus0603
A fast multiplayer racing game is among the most challenging network applications you can create. It's probably not the second kind of program you should write while learning :-)


By reference to the OP:

Quote:
Original post by rajend3
I was interested in focusing my programming towards network programming and was wondering if anyone could list possible programs that I could code to help develop my understanding and skills.


I assumed the OP could already program perfectly well, and had done some book learning. They didn't say either way :).

If all you want to do is learn how to write basic network code 101, you'd be better off with a book.

If you want to "develop your understanding and skills", you need to write something challenging. The three games I listed are not hard, just challenging - because you're making them for your own learning, they're much easier than if you're having to make a specific game *work* - you can change your requirements dynamically until you come up with a game that you're able to make work.

You will learn a vast amount that way.

Quote:
Original post by hplus0603
after writing all three, you're probably ready to start thinking about an MMO.


Not really. There's many other things you'd want to learn first.

Apart possibly from the "fast cars", none of the things I listed are that hard per se, although you can of course make them extremely hard (sign a publishing contract for a 32-player racing game using ferraris with real-time car deformation and full physics with deformable terrain would be a good start ;)).

Frankly, any normal competent programmer should be able to make a basic mud, a basic racing game, and a basic RTS. The only thing I added beyond the core requirements of the simplest forms of each of those genres was the "fast cars and sharp corners". And even that isn't particularly hard, unless you make them extremely fast and sharp.

Share this post


Link to post
Share on other sites
Have you actually made a networked racing game that felt good? It turns out to be one of the most latency sensitive game types I can think of, second only to a button-masher fighting game. I stand by my assertion: making a fast-paced racing game that works well for all involved, even when racing across the world, is really hard.

Of course, if you have implemented it, and it worked well (even in head-to-head track racing), and you thought it was easy, please let us know what secret sauce you have access to!

Share this post


Link to post
Share on other sites
Quote:
Original post by hplus0603
Have you actually made a networked racing game that felt good?


Yep.

Quote:

Of course, if you have implemented it, and it worked well (even in head-to-head track racing), and you thought it was easy, please let us know what secret sauce you have access to!


4 players limit, top-down 2D. Never got someone to play from the US against someone in australia.

But I still *learnt* a heck of a lot from doing it, and from trying to get increasingly further-apart friends to play it and see if it still worked.

I've seen commercially-released (and apparently profitable) networked racing games that only work with players on the same continent (although from what I heard it was touch-and-go even from one end of europe to the other :)). Making it work isn't hard. Making it work well is. Making it work well in all situations is a task I'd rather not be responsible for.

Network code isn't something you can just pick up and be brilliant at by being a brilliant coder, sure - but it's not rocket science either.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement