A small idea has been bugging me for months, lately.

The idea of making a small client/server application (possibly a multiplayer game) and try out how to program it consistently, find out which metodologies to use and so on.

I started working on it during the week of Easter. I actually also brought my laptop at a friend’s party on Saturday, and started programming something regarding memory allocation at late night, when I realized I wasn’t gonna talk with people anymore.

Do not do that. Do not program memory allocation stuff at 4 am at a party.

It was so lame. I’m honestly surprised (and glad) my friend didn’t kick me out that night.

me at parties

After Easter I managed to polish a lot of code, turned some god-awful dynamically allocated arrays into a decently organized struct, made some decent decisions about the whole architecture, started thinking about the game concept (went from original platforming fighter game to ToS clone, to Haxball clone. Think I’ll stop and never settle for anything at the moment).

More importantly, I’ve found a lot of relevant papers online, for example some regarding performances of UDP vs TCP and so on. These helped me take decisions about the architecture and gave me a better vision of what I was going to make.

Two amazing concepts I’ve learned are client prevision and time warping, but there are many more things I have to dig through.

I’ve read a book called Networking and Online Games: Understanding and Engineering Multiplayer Internet Games, which seems to provide a lot of useful (though mostly basic) knowledge and concepts regarding the design of an online game.

So far I’ve implemented just basic connecting and disconnecting, movement of players and a really basic chat service. The project is developed in POSIX C (server-side) and LOVE2D (Lua, on the client side).

I’ve tested the current version with some friends, hosting the server on a VPS, and it seemed stable, though maybe not optimal.

If you want to check out the project, this is the Github page.