|
|
|
|
|
|
|
|
netboats
|
|
|
|
|
|
Since very long ago, I've wanted to make a proper networked multiplayer game. Several attempts have been made but it always ended up performing badly or just bugging out for seemingly inexplicable reasons. Muchly frustrating.
In fall 2007 I started taking a course on computer networks though, and it covered things such as sources of packet loss, details about various protocol stacks and ways to implement reliable data transfer. I felt that I gained enough useful knowledge and insight to give it another go, and this is what came out.
First step was to write a general network class that would be useful for any game, with UDP base for unreliable "snapshot" packets and optional custom RDT/retransmit for critical messages. After that I had to come up with a simple game to test it, so I figured some small vehicles skidding about firing at each other would be allright. Boats for instance.
The game is a lot of fun, at least for a few minutes with good company. Gameplay is very shallow though and gets repetitive after a while. There are some issues with the networking stuff that remain to be solved, mainly due to latency and player/player collisions. That's a very tricky problem though, and I should probably have chosen a less twitchy style of game for my first serious attempt at multiplayer.
For trying the game out on your own you can just launch netboats.exe and hit return to play locally. Your firewall will probably pop up and let you choose network permissions for it, doesn't matter what you pick for local play.
Multiplayer requires that one computer runs netboats_server.exe and the others edit their config.txt to use the correct server IP address (or computer name, if on LAN). It's ok for the server computer to also run the client executable and join in on the game (use localhost or your own IP for server address).
Some people keep pestering me about adding more to this, and I might some day... the network code is pretty clean, but the actual game part of it is more of a mess. It's not a very attractive idea to get down and dirty with it again.
netboats_build9.zip (749 kB)
Latest version, client and dedicated server
Back to all projects
|
|
|
|
|
|
|
|
|
|