Nilorea Reborn: Finishing the MMORPG We Never Shipped

Nilorea is finally playable. The free MMORPG my friends and I started years ago, and never finished, is now online. You can create a character and play it in your browser or with the desktop client.

A game that never let go

Some projects stay with you long after you stop working on them. For me, Nilorea is one of those.

It started as a group of friends with a big idea: build a free MMORPG, our own world, made together. We drew maps, wrote lore, argued about classes and spells, and wrote a lot of code late into the night. Then life happened, as it does. Jobs, moves, families. The project slowed down, then stopped, and Nilorea stayed unfinished.

But it never really left. Every so often I would think about that world we had imagined, and about how close we had come.

Digging up the pieces

Before I could finish Nilorea, I had to find it. Nothing was in one place anymore.

So I went digging:

  • My own hard drives, old disks and long-forgotten folders included.
  • The Internet Archive, which had kept snapshots of pages we had long lost.
  • Friends' backups, from the people who had worked on the project with me and still had a copy somewhere.

Piece by piece, things came back: fragments of code, background stories and lore, sound effects, and the music that gave the world its mood. Some of it was complete. Some of it was half-written, or written three different ways by three different people. Each piece was a small memory of the time we spent building it.

A little help from Engvee

Some of the art we needed was missing or had never been made. To fill those gaps, I used free sprites by Engvee on itch.io. They fit the world beautifully. Thank you very much, Engvee, for sharing your work so generously.

Putting it all back together

Once everything was gathered and sorted, the real work started. I had a pile of fragments and a clear memory of what we had wanted Nilorea to be. What I didn't have back then was the time, or a team, to finish it.

This time I had Claude. Over some pretty long sessions, we went through the old code, the lore and the assets, and pieced together everything we had planned. Old systems were repaired or rewritten. Stories that only existed as notes found their place in the game. Sounds and music went back where they belonged.

It felt less like starting over and more like finishing a sentence we had left half-said years ago. That is something I could not have done alone in the time I have today.

Play Nilorea today

Nilorea is open. You can:

  1. Create your own player.
  2. Play online with the desktop client, or directly in your browser, no install needed.

Everything you need is on the apps page nilorea.net/apps/nilorea.

To the old team, and to new players

To everyone who worked on Nilorea with me back then: this is your game too. Your code, your stories, your sounds and your music are all in there. I hope it feels a bit like coming home.

And to everyone discovering it for the first time: welcome to Nilorea. It took us a long time to get here. Come and see the world we dreamed up.

Easier pthread mutex deadlock detection

Thread programming is fun, starting a tons of process and syncing them on a task, or asynchronously process a bunch of data. But that fun is having a cost: data sharing have to be somewhat locked or well ordered when accessing it. Else you're going to face some seriously strange situations like time warping variables at the best and big crashes at worse.

On top of that let's add that the main tools to protect our datas reads / writes by threads can also lead to strange situations where only parts of the code is still running and the rest is in "deadlock" state.

On little examples detecting those deadlocks seems easy, but when scaled to a bigger project/api, it's a living hell.
Tools like valgrind may detect the problems at the cost of big performance loss which may lead to being unable to run into the problem before running into the machine limits.

I was searching for a good ressource to help me in my debugging quest when I stumbled upon that article from Aurelian Melinte which I think is very good (both the author and article): https://linuxgazette.net/150/melinte.html that provide some code samples to superseed the pthread functions with some that will make some checks during the calls.

There is also the gdb deadlock detector script by DamZiobro : https://github.com/DamZiobro/gdb-automatic-deadlock-detector

And finally valgrind- helgrind: http://valgrind.org/docs/manual/hg-manual.html

Now back to code and monitoring/debugging !

Cross platform correct socket error code

A friend using my networking code made the good point that it was not correctly reporting errors on some windows compilers.

I hope we got this sorted out.

Grab / update your code from the git repo: https://framagit.org/GullRaDriel/nilorea-library

Added:
-netw_unload() =>macro who calls WSACleanup . Call it before exiting (on OK or error). Does nothing on *nix/*nux

-netw_set_blocking(...) => set blocking mode on a network

Internals:
-neterr => WSAGetLastError or errno
-netstrerr => FormatMessage or strerror (strerror_r wrapper is quoted because not working on redhat)

This has caused a full revamping of all error management, but now it's ok. Valgrind checked.

#nilorea-library #networking #winsock #socket