Author Archives: Nicholas

Well, That Happened!

Launching a game! It’s a thing that happens – I, for one, am still recovering. (I went to the gym for the first time in three weeks today and it was awful. Please, just somebody put me out of my misery.)

For those of you who have bought the game, we thank you for your patronage and appreciate it. We are currently working our way through the usual list of bug fixes and improvements that you discover are necessary as soon as you launch a game; those of you who are sending us crash dumps or bug reports, we’re reading them all and are working our way through them as fast as we can. For those of you who have written to let us know that you’re enjoying the game, we really appreciate that too.

Pictured: Gaslamp dev team fighting bugs.

Pictured: Gaslamp dev team squashing bug reports.

{ read this article }

Posted in Clockwork Empires | Tagged , , , ,

Technical Director Vining Versus THE VOID

A bug that’s been in the game for awhile, and which someĀ of you may have encountered (albeit very rarely) is the following peculiar circumstance: You start the game, you load up a new map… and suddenly, everything slowly starts to drift into the corner of the map. Finally, you end up with a giant frothing mass of dodos, and colonists, and monsters and who knows what else stuck in one corner of the map, apparently unable to move.

For those of you who haven’t seen it, you end up with the following scenario (screenshot thanks to a forum user):


So… what in the world causes this mess?

{ read this article }

Posted in Clockwork Empires | Tagged , , , , ,

Sundries and Minutiae

First off: as mentioned on a couple of other places, a hotfix was applied to Beta 54, replacing it with “Beta 54a.” This fixes a couple of major crash bugs that were in Beta 54; one of which had to do with the new tooltip system interacting badly with the code that was supposed to provide data to them for characters. I banished this very hastily, although it took me all of Saturday and a good bit of Sunday to figure out how to do it. The other crash bug was me forgetting to save something in the save game file, and the game being reliable enough to… kind of… operate without it. It’s patched up now and so far Beta 54A seems to have been really stable (except for on a few people’s machines; I’m looking into these now.)


Back when we said “Beta” the indication was that we were shifting towards completing the game and getting it out of Early Access into the next phase, which I guess you would call “Access.” A larger portion of this also involves finishing little stuff that I’ve been putting off and can put off no longer put off. I have been instructed to write about this stuff today.

{ read this article }

Posted in Uncategorized | Tagged , , , ,

Acceleration Structures

Clockwork Empires relies internally on a series of tags, as I think we’ve discussed on this blog far too many times. When you go to look for something like food, we check the game for every object with the “raw_food” tag, and then you go to eat it. Here is where the bad news happens: once you have a sufficiently long game, you can stockpile large quantities of food. Let us say that a player has 500 pieces of raw food. Let us also say you have 150 characters – so, to put it into perspective, the player has accumulated 3 days worth of food. (This isn’t even that large a number.) Every day, the 150 characters must go and eat 150 pieces of food out of the 500. The problem is – they want to eat the *closest* food. So now we have to check 500 pieces of food vs 150 players to see which piece is the closest, for a total of 150 * 500 = 75,000 distance queries. Well, that can be a bit slow, especially when our AI budget is very tight and we have a lot to do. However, we’re now seeing games where characters have huge amounts of food – 5,000 pieces of food, say – and the game slows to a crawl. Clearly, smarter programming is required.

A lovely sea-side desert colony sent in by a player as part of a bug report.

A lovely sea-side desert colony sent in by a player as part of a bug report.

Clockwork Empires stores all information about object positions in a spatial dictionary. The handling of tags is done by a “tag index” class, which is essentially a giant array of information consisting of the following attributes: “position, object, previous item with this tag, next item with this tag”. When a tag is set, we grab a tag index from a giant statically allocated pool of tag indices, so that we don’t have a memory allocation, and attach it to the linked list of tags. The problem is… there’s no way to easily find the “closest” tag to your point. What is needed is a spatial acceleration structure of some kind – a way of dividing the world into regions so that we can start in our region, check it for the closest whatever, and then move on.

{ read this article }

Posted in Clockwork Empires | Tagged , , , , , , ,

Technical Director Vining versus the Haxx of Planet Playsteevee

Most of what I’ve been doing these days is support code for various other people: adding missing functions, fixing bugs, adding new UI code when it’s needed, and just keeping the airship sailing. I’ve also been dealing with mysterious issues on user machines, which is always fun for a game developer. The process is simple: a user complains that the game mysteriously doesn’t work, and it becomes a game of trying to deduce what the problem is because, after all, you have no way of getting the user’s computer into the office. To give you an idea of the fun involved, here’s a recent example, as well as a few notes for other developers who might run into this particular fun problem.


The story starts with a user noting that “when I start a new game, it crashes.” Well, that’s interesting. Does it crash when starting a new game, or when creating the world? “Starting a new game. No, creating a world. No, both.” We get a crash dump, and it’s crashing in a completely random place in the renderer which it shouldn’t be able to reach during world creation. Neat. So I ask for a copy of the user’s console, and I get that too.

{ read this article }

Posted in Clockwork Empires | Tagged , , ,

I’m really awfully glad I’m a Beta

A society of Alphas couldn’t fail to be unstable and miserable. First off, hello new bureaucrats! We’re thrilled you could join us. For those of you new to the community and not in the know, here are some useful things to know:

  • We do a blog post here every Wednesday describing what we are working on this week and what we are thinking about. We even have a mailing list where we can send you this blog post, every week.
  • We post new, experimental builds of Clockwork Empires for testing and feedback to the “experimental” branch on Steam about once a week or so, and have a major release of Clockwork Empires pushed to the main branch on Steam about once a month.
  • We have forums, which are pretty awesome. If you have not yet discovered our forums, please do so! (Please also change your icon so that I do not have to look at a series of grinning, mustachio’ed men telling me that the game is broken. Seriously, it’s starting to haunt my dreams.)
"Keep those patches comin'"

“Keep those patches comin'”

{ read this article }

Posted in Clockwork Empires | Tagged , , , ,
1 Comment

Quick, Put More Logistics In It!

As part of the workshop->upgrade->Snoot->cover the world in progress cycle, we have an exciting series of new economics problems: how to make upgraded modules actually useful, and how to make workshops not terrible. The solution that we have elected to try, and which Daniel bullied me into writing (which took a week, and then I quite like the results so it’s not so bad) is to have workshop jobs assigned per-module, rather than per-building.



For Revision 50D, we let you explicitly assign a task to a given module (“Make Planks”, “Make Cot”, etc.) The # of workshop modules indicates the # of tasks. A worker will do the task assigned to the first module in a row. If the first module is busy, they will move to the second module; and so on, and so forth. Modules are organized in the workshop in terms of priority, and can be moved up and down (i.e. if your power saw is first in the queue, if it is empty people will try to use it first.) So if you have:

{ read this article }

Posted in Clockwork Empires | Tagged , , , , , ,

They’re Called Conduits Now: A Tale of the Pneumatic Conveyance Snoot

Now that the biomes are live in Clockwork Empires, I’ve switched gears to finishing another major feature: conduits. Formerly called “dynamics”, we are now calling them “conduits” because it’s a much better name. And these things have been nothing short of a blasted nightmare of complex proposals of various forms from the start.

So now what do we do?


Ceci n’est pas un pipe.

{ read this article }

Posted in Clockwork Empires | Tagged , , , , , ,