Blog from the developer of FortressCraft

Blog from the developer of FortressCraft

A brief history of Voxel games.

As I continue to write Indie games, and thus actually interact with the public; my AAA-game protective shields of ‘DON’T TALK TO THE PUNTERS’ now removed, it never ceases to amaze me of people’s ignorance – “But Notch worked on Infiniminer!” being one of my particular favourites, closely followed by ‘But Notch invented procedural landscapes!’

So, as you all know, FortressCraft is a VoxGame. Sadly, this more defines it in terms of rendering than gameplay – but what is a voxel and why do I use them?

Well, let’s look at Wikipedia:

A voxel (volumetric pixel or, more correctly, Volumetric Picture Element) is a volume element, representing a value on a regular grid in three dimensional space. This is analogous to a pixel, which represents 2D image data in a bitmap.

That’s pretty good! Now, I’ve seen people say “But you use polygons!”, which is rather missing the definition. Think of a pixel – if you have a white dot moving around the screen, is the pixel itself moving? Clearly not. Pixels can only change colour. What happens there is that a series of pixels light up in turn, thus creating the illusion of movement.

The same applies to Voxels; a voxel cannot move, or rotate, or scale. It is a fixed size (FortressCraft uses 1m3 voxels, for a vast range of performance reasons)

This is explained nicely using this video:

The landscape is voxels, rendered using polygons; the flying cubes are instanced objects, also rendered using polygons. I could use a software renderer, to do raycast, scanline rendering; they’re still voxels!

The first game I’m personally aware of to use voxels was Comanche Maximum Overkill, an arcadey helicopter game from 1992.
It’s hard to look back on that game, and realise that the landscape rendering presented there was nothing short of mind blowing. The reviews called it photorealistic. Nothing like it had been seen before. And it ran wonderfully, even on a 486!

(by the year 2000, voxel landscapes looked like this, albeit only in tech demos:)

Interestingly, the terrain generation techniques used here are almost identical to that of FortressCraft (or Minecraft); a combination of Perlin noise and/or fractal fault techniques.

Voxels are fast, really, really fast; as they don’t scale or rotate, your renderer can make many assumptions about rendering, and assumptions leads to fast rendering. (Also making an ASS out of U and… mptions.)

Voxels also have one other incredible advantage over traditional heightmaps or mesh worlds; deformation and alteration. You can alter them easily; an explosion can carve out a crater, vehicles can leave treadmarks, And unlike heightmaps, you can have caves and overhangs.  Magic Carpet shows how far you can really push traditional mesh-based landscapes, and voxels sail past that level of quality.

FortressCraft *could* have gone with a landscape system like Comanche’s; the engine would certainly do it; but the user experience would be awful. Building anything out of tiny cubes would take forever! Comanche also didn’t support any sort of terrain alteration; the voxels were like a blanket, floating in space; if you could have scraped away the top layer, you’d have been left with void.

Now, as far as I know there’s a gap between ‘92 and 2000, when VoxLap was created. VoxLap is probably best known these days as ‘The Ace of Spades Engine’, but it’s been around a long, long time: Here it is in 2000:

VoxLap brought one major innovation to this; if you have, say, a diving board in a swimming pool, and you cut the base off the board, the remainder will collapse and fall. (The cut off piece disappears, it doesn’t maintain physics)

Work has continued on VoxLap to this day, and it really can look rather nice!

Again tho, a creative-style game using this level of detail would be utterly beyond most people’s time – generating this stuff by hand would be dozens of hours of work.

Whilst not VoxGames in the tradional sense, in 1997, Blood and Shadow Warrior were released; both of these games using the Build engine; traditional Wolfenstein-style raycast walls for speed, but the objects were high-detail voxels:

I recall being amazed at the level of detail that you can squeeze out of voxel objects (This was 1997! That was detailed!), and actually began work on my own renderer at the time.

Sadly I soon came to realise that the limiting factor wasn’t rendering speed, nor the complexity of the rendering, but the creation of the objects was an utter nightmare. I believe Shadow Warrior used a tool to convert high-resolution objects into voxel objects, much the same way that Unreal3 (Gears of War, etc) generates it’s normal and detail maps from super-high resolution source objects. The newer Westwood games (Red Alert 2, Tiberian Sun) also used voxel-based vehicles, tho I’ve really no idea why!

Of course, I didn’t know that at that time. Games programmers, engineers, programmers in general – we have this desire to see how things work, to take them apart and rebuild them our own way.

I just want to write that bit down on it’s own, for future reference; I first started work on a voxel engine in 1997.

Things went quite quiet on the Voxel front for some time; like the Realtime Raytracing scene, it’s really a dead-end technology; video cards are getting faster at such a rate that utilising techniques like this simply doesn’t work. (As I put it upon seeing the latest state-of-the-art Realtime Raytracting demo, “That’s awesome! It looks almost as good as pixel shaders!”)

Then, in April 2008, something wonderful happened; the seed that was to spawn the biggest Indie smash hit of all time.

Woaah there Nelly. Not Minecraft. Infinifrag.

You could run around, fight other people, and build blocks.

Never heard of it? It grew and grew, and spawned a sequel. I’m sure you’ve heard of the sequel.

It was called Infiniminer.

It’s important to note that this game doesn’t use any sort of texture filtering and no mip-maps. We’ll come back to that.

I’d also like to take this opportunity to link this, official, image:

I’m beyond tired of people telling me that it’s bad for me to rip off Minecraft, as it’s still in progress, but it was perfectly ok for Notch to rip off Infiniminer, as it was abandoned. It was what we like to call ‘finished’.

Ahhh, Minecraft. How could we ignore the elephant in the room? (No offence meant, Markus)

Notch was inspired by the tech and look of Infimininer to write the game we now know as Minecraft. Which is incidentally a better name than Cavetest, even if half of it was nicked from it’s inspiration (Yeah, I went there).

Minecraft has proved to be so ridiculously popular and successful that it’s catapulted Voxel games back into the limelight. Lots of games only exist now because of Minecraft; FortressCraft being one of them – but games like 3D Dot Heroes, LootFest and Terraria only came into being because people realised ‘Creating is fun’. Well, creating with 1m3 blocks is fun. Creating with 1cm3 blocks would be like pulling teeth. Minecraft also achieved the mass of sales that allowed people to look past the visuals to the game underneath; no mean feat in these days of gorgeous AAA games.

Sadly, FortressCraft and it’s success has been the catalyst for a dozen crappy VoxGames on the XBLIG service; and at least 2 really good ones. Voxels were last year’s Zombies, and for that I do apologise. I can see the comments already : ‘OH BUT IT WAS MINECRAFT THAT INSPIRED ALL THOSE!’. I can certainly see how it could look that way, but for months before FortressCraft’s release, the XNA forums were full of ‘How can I do a Minecraft-style renderer?’.

They were told it was impossible, too hard, and that no-one would even buy a game like that, because Minecraft existed (Hell, some of the people I worked with on FortressCraft told me that!).  It took FortressCraft’s crazy-ass commercial success before the clones started to pour in, and the face of XBLIG was changed forever. (If you would like to argue this, feel free; however, if you’re not a member of the App Hub forum, and don’t follow the XBLIG community as a whole then, please, don’t bother; the internet is already full of uninformed comments on forums)

But I digress. This post is on technology!

So, both Minecraft and Infiniminer don’t use any sort of filtering or mipping.This is something that I have seen a million people attribute to ‘style’, but the truth is actually a long way from this.  Solving the mip-bleed issue is a *really* difficult task; it’s something we pretty much cracked on FortressCraft, leading to it not suffering from the nasty distance shimmer that plagues both Minecraft and Infiniminer.

That shimmer in action! Not retro; ugly. (shimmer being the texture equivalent of jaggies; high alias textures exhibit temporal artifacts when scaled down. I don’t really have a simpler way of phrasing it!)

Yes, ‘retro’ is a style, and I’ve no problem with the lack of bilinear filtering; that could be considered part of the art style (the truth is probably much more in the realms of technical difficulty and programmer art tho!), but not having MSAA and bi/tri/anisotropic filtering isn’t an aesthetic choice, it’s a technical one.

So what of the future?

Well, certainly not that! Whilst it’s cool, there’s so much smoke and mirrors going on to make it practical for a real game! (For instance, in that demo, if you were to cut both edges of a beam, it would continue to hover in the air; FortressCraft already has physics like that! Look in the top left of that pic to see what I mean)

However, that only holds true for this generation. My brain has already worked out the necessary algorithms needed to allow you to cut the ends off of diving boards, and allow them to become 3d objects, and collide correctly. Doing this current generation hardware would be unfeasible. Give me a computer fast enough, long enough dev time, and somewhere to stand, and I can move the Earth.

But what of the past? What started all this off? What was the FIRST creation game?

1991, 3d Construction Kit. Build and share your own worlds. Sound familiar? :-)

The scary thing is that 1991 doesn’t seem that long ago. I wonder where we’ll be in another 21 years?

One Response to A brief history of Voxel games.

  1. Haha, 3D Construction Kit! Damn, I’m old, because I still remember it :D That was a nice overview of the genre, thanks for sharing.

  • dinamic_sidebar 4 none

©2015 DjArcas's Blog Entries (RSS) and Comments (RSS)  Raindrops Theme