Computer gaming was a big part of my adolescence. Wanting to make my own games got me into coding. My favourites are the usual suspects for a nerdy 90s kid: Morrowind, Ocarina of Time, Deus Ex, and later Thief.


The solid universe of Thief: The Dark Project

#

Thief is one of my favourite games. I hung around its modding community in the late 00s, as I was learning to code in order to make my own games. I heard all about its baroque editing suite, and the quirks of its engine, designed so that Thief’s all-important aural landscape would function plausibly.

Screenshot from Thief's Lost City level showing old stone houses inside a vast cave surrounded by lava

Something I continue to think about these years later is Thief’s solid universe.

In most game engines, “the world” of a level is inherently empty, and is filled up with objects by level designers. This can result in amusing bugs like “falling through the ground” into the void beyond, or visual glitches where you can see “nothing” rendered as a “hall of mirrors”.

https://www.reddit.com/r/gamedev/comments/n6bmh7/what_is_this_rendering_bugeffect_called_when_the/

But in Thief, the world actually started off as completely solid. It was full of “earth” until a level designer inserted a volume of air to make a room. The game’s artists carved out levels from this solid universe, tunneling away the rooms, gardens, streets and yes, actual caves, that the player experiences.

Sean Barrett, a lead programmer on the game, describes the process:

The entire space started solid, so one brush operation was “carve out a hole in this area”–in other words “change the area covered by this brush to open”. For example you would use this to carve out a room. Another placed solid matter; you could use this to create a pillar. Another placed water, and another lava. Because space could be of 4 types (solid, air, water, or lava – oh hey, the 4 classical elements!), each operation could be considered by which output type it produced.

Moreover, we allowed these operations to be selective. For example, the “flood brush” turned air into water, but left all other types alone. This made it easier to fill an area with water–you could construct it entirely with air and then fill the lower half with water. Because of the temporal aspect, you could then go and change some of the water to “air” if you needed to. It would have been possible to make brush types that were much complicated (air turns to water, water turns to solid, solid turns to air, and lava unchanged) but this wasn’t actually useful so I think all the brush types were of the unconditional-single-type or conditional-single-type.

https://nothings.org/gamedev/thief_rendering.html#csg

I find this idea somehow comforting to meditate on.

One of the effects in the game itself is that outdoor areas feel almost underground. Though you can see a sky overhead, it isn’t the infinitely-distant skybox of an empty-universe game; it’s a firmament, a surface you can gauge the distance of, painted with stars.

I may need to replay Thief.


Monster Mash: entry #2

#

Welcome one, welcome all to my third and final Monster Mash jam log. (Here’s the first one and the second.) Since I got busy during the week, this will basically summarise everything I did between Wednesday and the end of the jam last night. I’ll also write a bit of a post-mortem about the project and how I felt it went.

I have to report, unfortunately, that I didn’t actually make it into the jam, because a midnight I was fiddling with getting the game’s itch.io page up and working. However, I did make a game, and I had a lot of fun doing it. Which is kind of the point of doing a jam, so I consider this mission a success!

So, what did I get up to in the latter half of the jam?

Tourist thinks the water is safe

Bubble and attack particles

So that’s that! The jam is over and I have a finished product of sorts. But there was a lot I planned and didn’t get to complete. Like:

And much more besides. Now that the jam’s over, I’ve had time to bother creating a GitHub repo with my code in it. Feel free to poke around if you’d like to see a poorly-commented, extremely hacky example of a simple single-player game. How do I think it went? I guess I’m happy with how it turned out overall. Torque certainly held up, and surprised me occasionally with its ease of use. Like how easy it is to use a gamepad, once you’ve figured out which undocumented global variable you need to enable.

Writing this amount of code again confirmed to me how much I dislike TorqueScript as a development language. I ended up making heavy use of schedules in some of the code, which meant duplicating calls to schedule and writing temporary functions outside of where they were needed. It would have been much nicer if I could have used something like Javascript’s setInterval with an anonymous function. I was also bitten several times by the lack of name safety - if I made a typo in a local variable name, I’d get "" instead of an error. Not too difficult to debug, but debugging I really didn’t have time or patience for.

It had been a while since I tried to use the COLLADA art pipeline, and this time I found it much improved for some reason. Possibly because I wasn’t trying to make textures, simply using solid colours everywhere. I even managed to assign different materials to different faces on the same object! Tricky stuff. Also, I believe Blender’s COLLADA support has improved since I last used it, so that may have helped.

So overall I was quite happy with the engine, though I did discover a couple of bugs along the way. Which is good and bad. I suspect the engine is rarely used without the padding of the template scaffolds, so some of these issues aren’t immediately apparent. I also think that the engine is simply not used by many people, and those who do use it haven’t tended to share the massive amount of niggling bugs they’ve had to fix. Which makes sense, since T3D’s development was closed up until recently.

However, I also found that the engine is just very difficult to work with in script only. For example, I was writing my own spring physics simulator in order to make the camera work bask in my second post. Spring physics, honestly, is exactly the kind of thing I think a good game engine should handle - I should be able to attach a couple of springs between the camera and player, and it should jut work. I also found some inconsistency in the API and implementation of existing features. For example, the camera’s tracking mode does not alter the camera’s transform, so you can’t actually tell where it’s looking at any given moment without redoing the maths yourself.

So, I think we have some work to do before I would call T3D completely user-friendly - just fising lots of these annoying issues and providing a sane and sensible API with good documentation. I look forward to the challenge.


Monster Mash: entry #1

#

Welcome one, welcome all to my second Monster Mash jam log. (Here’s the first one.) I’ve got two days to summarise, since I didn’t do an awful lot of work yesterday. But, I:

And today, I:

Navmesh on island

Lakeside with tourists

Till next time!


Monster Mash: entry #0

#

The first day of my Monster Mash attempt has ended with some fortunate progress. Though I’m technically cheating (the jam starts tomorrow), I absolve myself by pointing out that I’ll be having a fairly busy week with several days off anyway - and I won’t be actually submitting the game, most likely. Since I had some time today while travelling, I thought I’d get some progress in early. I’m using Torque 3D and Blender for everything.

To compensate for my abysmal skills at 3D modelling or anything artstic, I’ve decided to play off the theme of the jam (monster protagonists) and make a game where you can’t see your protagonist. The idea is you’ll be a sort of ‘swamp thing’ or lake-dwelling lurker, but you’ll see the game from above the water’s surface. The gameplay will have you slinking around, trying to snatch tourists and park rangers unawares from the lakeside.

I originally wanted to work a mechanic into it where your view would lose track of where you actually were in the lake (gradually, the inaccuracy increasing), and you’d then have to blow bubbles to recalibrate yourself before launching an attack. The idea being that making bubbles would alert rangers and tourists to your location, so you had to carefully balance knowing where you are with everyone else knowing where you are, too. I ditched this idea pretty soon - it would be too hard to balance, and didn’t actually sound incredibly fun. Instead the game will be a little more straight stealth - get too close and you’ll be noticed, etc.

Anyway, here’s what I got done today, mostly in gaps between getting on and off aeroplanes:

Current level progress

Thoughts: