This is a screenshot of the first run of MMORPG Tycoon 2 running under Linux. It’s built via a cmake setup — the same script which builds on Windows and Mac. And it’s building from a VectorStorm library trunk that’s shared with the Testbeds samples.
The big troubles all came from the fact that MacOS X and Windows don’t care about the case of filenames, while Linux does. So the three compile errors I had were all from files #including other files, and making a mistake about capitalisation.
In terms of game itself, the Linux build mostly — mostly — worked straight out of the tin.
- Input works (although the cursor — particularly the right mouse button — feels a bit sluggish to respond. This may be due to running in a virtual machine; must try this on a real Linux box).
- All current game mechanics appear to work.
- Loading and rendering of textures work.
- The bloom rendering shader works.
- Secret game mode #3 works.
- The first thing that pops out at the viewer is the trees, which seem to only have a ring of foliage at the end of each branch, instead of a full canopy. It turned out to be, again, a naming issue; I have a file called “Foliage.block” which describes the shape of tree foliage. And in the code, I was trying to load “foliage.block”. Since Linux considered that file not to exist, I just got a default cylinder shape approximating the desired size and positioning for foliage.
- Something really weird is also going on with the scene lighting. It looks normal enough on the trees, but the mountains all look flat; they don’t look like that on either the Mac or Windows builds. As it turns out, this was because the terrain had specified that it wanted to load a material called “Terrain.mat”, when the actual file was “terrain.mat”. And so when it failed to load that file, it merely rendered with a default unlit simple material.
- Another thing I notice is that the grass effect is not working; the grass is not blending into the terrain the way that it’s supposed to. This also turned out to be related to the scene lighting not being applied to the terrain, but being applied to the grass.
- Not visible here, it is also failing to load an ogg vorbis music file which it should be able to play. I know it supports the file format, because the Testbeds applications play one. So I’ll have to do some digging to track down what’s going wrong here. But as I type this, I’ve realised what you dear readers probably long ago suspected, that this is another case of a filename which has different capitalisation on disk than what the game is looking for. And (a few minutes later), sure enough it turns out to have been that. So I’ve got this working now, too.
So. I now have MMORPG Tycoon 2 compiling live on Windows, Mac, and Linux machines, with equivalent graphics and sound, and compiling from the trunk of the VectorStorm library, so any changes I make to that can immediately be picked up by other projects using it, instead of needing to be manually ported back and forth between projects.
Now I need to figure out where I’m going to host these repositories. For a while, I was hosting them on gitorious, but from where I am in the world, that’s pretty slow (although I quite like the gitorious software). I might try on github, and see if that’s a little more tolerable. Or if not, I’ll just make them publicly accessible directly from this site, the way that I did for the old subversion-based code repositories.
Once I have that bit sorted out, I think I’m going to do another “game in a week”, just to shake out the kinks from the new system. More news later in the week.