Thu 25 September 2014

Voxelands is a fork of Minetest which itself is a Free and Open Source (FOSS) reworking of the more famous Minecraft. I enjoyed Minecraft's immersive blocky world and there were lots of interesting mods to enhance and extend the game, but I found the process of installing them was far too troublesome. I even had a go at writing mods, but that was even more arduous. Part of the reason for this is Minecraft is closed source and wasn't originally designed for modding.

Then along rolled Minetest which was FOSS (GNU LGPL) and had a much better modding engine powered by a scripting language called Lua (Portuguese for Moon). My first experience playing Minetest left me with the impression of a relatively bare and empty world compared to Minecraft, but I soon realised that was because you really have to add in a few mods, such as one for farming or one with various creatures (known as mobs). Even better, I wrote my own mod which provided for a sort of magic tunneling machine. This may sound great, but in all honesty, I just wasn't enjoying the game. The reason was that Minetest lacked Minecraft's well thought-out and balanced gameplay that's squarely directed at one thing: letting the player have fun in doing whatever they want to do. That said, I remain open to the suggestion that I've not yet found the right combo of Minetest mods.

I wasn't alone in thinking this and some of Minetest's developers split off a fork of the game called Minetest-classic, which later got the much better name Voxelands. It dropped the modding engine of Minetest in favour of creating a game that is more fun. It's still got a way to go to reach Minecraft's maturity - most noticeably, Mobs aren't much fun yet. I understand these kind of issues will be addressed soon and there is certainly active development at present.

I also appreciate that it's trying to be its own game and not just copy Minecraft. One thing that irked me about Minecraft is that I had to keep leaving the game to search the wikis to learn the recipes (or else invest in a lot of guess-work-driven discovery that I simply don't have time for). But in Voxelands that's become part of the game: you arrange a few sticks into a crude question mark shape on the 3 by 3 crafting grid and voila, you've got a book with all the recipes. "Spoilers!" you may say, but then just don't look at the book.

After I compiled and installed Voxelands (and you don't have to, as pre-built downloads are available, including one for windows), I fired up a server on my laptop and posted a message online for folk to come and join me. The first person that did was Darkrose, the lead developer. I thought that was really nice of her to visit.

So, my thanks to Darkrose and others for creating it, and I recommend giving Voxelands a try - it's fun!

Warning: What follows is some technical stuff which you can safely ignore unless you're a bit geeky like me.

Compiling on Slackware

This was pretty straightforward, though I did hit a snag which I found the solution to immediately in the Voxelands forum. I wrote a slackbuild script which was you can get at Slackbuilds.org.

Compiling a server-only build for Centos

I'm running an old eee PC 1000H as a home server with 32 bit Centos 6.5. First, I needed to install generic stuff needed to build from source on Centos (equivalent of build-essential on apt systems):

yum groupinstall 'Development Tools'

and also cmake

yum install cmake

then install stuff needed for Voxelands:

yum install zlib bzip2-devel sqlite-devel libpng-devel libjpeg-turbo-devel
irrlicht-devel libXxf86vm-devel

Determining the details in the above command took a bit of experimentation as the yum install command in the README.txt in the Voxelands source specified slightly different package names, e.g. libsqlite3x-devel instead of sqlite-devel. This could be due to differences between Fedora and Centos.

I then set up the build with this cmake command:


And then started the build with just


but it failed to compile with this error related to type 'u64' (Note: This happened in build 1408, but did not in 1409.)

[ 20%] Building CXX object src/CMakeFiles/voxelands-server.dir/content_sao.cpp.o                                                                        
In file included from voxelands/src/serverobject.h:25,
             from voxelands/src/content_sao.h:23,
             from voxelands/src/content_sao.cpp:20:
voxelands/src/utility.h:48: error: reference to 'u64' is ambiguous
voxelands/src/common_irrlicht.h:72: error: candidates are: typedef uint64_t u64
/usr/include/irrlicht/irrTypes.h:100: error: typedef long long unsigned int irr::u64

I found online that this can be caused by compiling with an older version of Irrlicht. Indeed, on Centos I had 1.7.3 so I downloaded the 1.8.1 headers and source and tried compiling again, starting with

cmake . -DRUN_IN_PLACE=1 -DIRRLICHT_INCLUDE_DIR=../irrlicht-1.8/include -DBUILD_CLIENT=0

but I got exactly the same error. After a bit more investigation I realised that Irrlicht was defining u64 to be one type, but Voxelands was defining it to be something different. The above fix probably solves the problem on a 64 bit system, but not on my 32 bit system (the clue was WORDSIZE in irrTypes.h). To solve the problem, I just commented out this line in src/common_irrlicht.h in the Voxelands source code:

//typedef uint64_t u64;

and compilation worked fine.

The server ran fine, but I found I couldn't connect to it from other machines on the same network. I created an iptables rule to allow access to voxelands port, but that didn't solve the problem either. I started to look at SElinux, which always makes my head hurt, but even going into permissible mode didn't allow me to connect. At that point I realised that Voxelands, like Minetest, uses UDP not TCP. Doh! I deleted my previous firewall rule and added a new one with:

iptables -I INPUT 3 -p udp --dport 30000 -j ACCEPT

and I was able to connect!