The People Problem

And now for something a little different. No, don’t be alarmed yet- we’re just letting Chris write the blog post this week!

When developing an early-access game, you have to make a lot of choices about what to prioritize. Do you fix that bug, or implement this new feature? There’s an endless list of things to do and only so many people to do them. Sometimes things that work ‘well enough’ get left alone for long periods – until the time for a rework finally comes around. And this month the time has come to address Immigration.

Stop looking at this alt text, you!

Time for a bracing game of “Where’s Waldorf?”

The initial immigration system was one of the first events we added to the game so that population would grow over time. Getting more people ​is a pretty fundamental part of playing a colony simulation game, after all. The system, however, was built on many assumptions that made sense during our earliest-access period, where starvation was the biggest threat – and that’s not how things work anymore. Gaining 3 prestige for taking 3 people is basically a win-win situation, and no-brainer choices like this don’t make for interesting gameplay. Prestige favours only added to this imbalance, as it was possible to more than double your rate of immigration by constantly “buying” new colonists – not at all what we intended when the system was first implemented.

{ read this article }

Posted in Clockwork Empires | Tagged , , , , ,

World Generation And You

I am super happy with Revision 40, and how it turned out. We have had only one reported Windows crash that was a true crash, apparently due to very elderly AMD drivers, and a couple of OS X issues (apparently in the OpenGL driver stack for OS X.) The new problem we have, of course, is that people are now able to produce very large colonies. Consequently, we have had some issues where certain parts of the game (stockpile management, work crew menu, jobs menu) start freezing up under the strain. The new UI code that Daniel has been diligently working on should help fix the problems with the job and work crew menus; this has necessitated a complete rewrite of how UI widgets are resized, a job that is labour intensive, gross, and involves rewriting code that I first wrote back in 2001 or so. Still, I’m very happy with Revision 40. So happy, in fact, I took a tiny vacation for… well, for the first time I can remember. It was really, really weird.

Above: artistic depiction of Nicholas' vacation based on description provided.

Above: artistic depiction of Nicholas’ vacation based on description provided.

For Revision 41, we’ve basically gotten two messages. First, there is a large portion of the populace who want to see us doing more work like we did (from a technical side) in revision 40 – continuing to build on and refine the features that are in the game right now, and fixing long-standing issues with things like military units and stockpiles. There is an equally large portion of the populace, some of whom also belong to the first portion, who are desperately after new content. From the perspective of a game developer, you have to push on with new content in early access because, otherwise, it never gets done. Plus, there is a feature cost. The sooner you get a feature started, the easier it is to retrofit the existing code to support the feature.

So, we’re going to try to find a balance for this patch: cleaning up a bunch more outstanding issues, now that stability seems to be taken care of, while also trying to finish more of the systems that need to be done in order for us to get the game done. There are two big, BIG technology pieces that need to go in right now that don’t exist yet, and which we need to deal with with some degree of urgency because the cost of retrofitting the game to support them gets increasingly higher as we continue development. The first of these is multiplayer, which I’m not working on right now. The second one of these is the global world, because – let’s face it – we’ve all colonized New Antipodea and New Sogwood a million times right now, and it’s time to go fail Make The Empire Proud somewhere else!

{ read this article }

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

Clockwork Empires June update: THE REACTIVATION OF ASSEMBLAGE 14538

A Clockwork Empires update has been awakened from its aeons-long sleep! We present for you:


This update will go live to every Clockwork Empires player via Steam!

We have also updated our Clockwork Empires: Development Progress Report!

(Don’t own the game? Clockwork Empires can be purchased on via Humble or from Steam.)

Want to hear about all sorts of updates via email plus receive silly images from development? Sign up for the newsletter here.

Patch Notes:


  • Obeliskians! (What are they? Find out for yourself! It might take some digging.)
  • Foreign military units!
  • Massive save/load stability improvements
  • Deathwurm shoving

The Engine

  • various stability improvements!
  • windows: Screenshots are now saved into My Documents\Gaslamp Games\Clockwork Empires.

Human Characters

  • butchered humans will now leave a skeleton behind
  • cults now form with a specific object of worship (“theme”) based on eldritch interactions & personality of cult leader
  • added a bunch of new actions for colonists experiencing Madness
  • morbid colonists are fascinated rather than horrified by fishpeople butchering humans
  • yield added to butcher corpse jobs (so they don’t get cancelled forever in certain cases)
  • FIXED: scripterror in “hearExclamation”
  • FIXED: scripterror when cult leader died under certain circumstances
  • FIXED: upper class should no longer bury corpses (it’s beneath them)
  • FIXED: confessions are no longer a hollow charade
  • FIXED: vicars no longer preach from unfinished altars
  • FIXED: “sleep due to sadness” now requires a character actually be sad (AND is now weighted correctly)
  • FIXED: all lower-class colonists are correctly auto-placed in workcrews after immigration
  • FIXED cults with no name will no longer be formed (39C)
  • FIXED: “Butcher Human Corpse” job should no longer be confused between Fishpeople & Human version (this led to problems)
  • FIXED: colonists don’t recognize airdropped item stacks as valid items

Scripting System

  • FIXED: crash in gameRequireToolUses if user not holding a tool
  • FIXED: crash trying to set up a nuked locked job instance

Combat & Military

  • balance: slightly adjusted morale threshold for retreat jobs for military trained soldiers vs. untrained

Non-Human Characters (Animals, Monsters, Vehicles)

  • added Obeliskian horrors (in-progress)
  • added 3 foreign factions: Stahlmark, Republique, Novorus
  • added foreign military characters, soldiers + NCOs
  • added foreign military squads w/ mission logic
  • bandits will now fight back against hostile animals
  • fishpeople leaders now wear hats
  • fishpeople will now eat dead bandits
  • butchered bandits will turn into skeletons
  • balance: reduced # of tents that bandits spawn with
  • balance: adjusted Foreign Military mission pathing to be less boring
  • FIXED: Stahlmarkians given correct uniforms
  • FIXED: foreign military units now reload like properly trained soldiers
  • FIXED: error when fishpeople groups are wiped out
  • FIXED: foreign military will properly retaliate against hostile animals & obeliskians
  • FIXED: allied military soldiers immediately bayonet each other upon arriving in colony
  • FIXED: friendly fishpeople will no longer attack your gabions for no good reason
  • FIXED: foreign military & bandit weapons will no longer show up in commodities window
  • FIXED: conscripted Vicars will no longer do vicar stuff
  • FIXED: fishpeople now spawn correctly with gifts/weapons depending on group’s mission (39D)

Buildings & Building Creation

  • added volumetric blueprints
  • workshops: All workshop logic completely rewritten from scratch. Workshops are now evaluated as part of the C++ job loop; we create a workshop assignment when/if we can do the job, and we will now always actually obey the ordering in which jobs are given to the workshop by the user.
  • mineshafts will now output ore based on what oreNode clusters were nearby (mining the surface nodes doesn’t affect the underground ore)
  • balance: weighted mine output slightly more toward ores, if available
  • FIXED: smoke now consistently turns off when an oven is complete or a module has finished production
  • FIXED: a second, totally different issue with oven smoking not finishing; this time after a load and save
  • FIXED: demolishing a farm zone did not correctly clear the farm assignment
  • FIXED: stockpile deletion crash
  • FIXED: Brewery foundation texture set to bricks
  • FIXED: Beetle steaks now produce correct number of cooked output
  • FIXED: various issues when deleting a stockpile, including crashing
  • FIXED: workshop owners will set bad/good workshop names again depending on their madness

Economy & Logistics

  • general overhaul of jobs code for stability & optimization
  • also overhauled assignment system over to use flat arrays (this makes everything more stable, better, faster, stronger)
  • surface ore nodes will leave a mineralogical survey beacon which can be surveyed by a Naturalist to tell you what product it will output (this is pretty direct right now)
  • made ingot textures shinier
  • farms now output harvest in stack rather than two individual units
  • (most) starting items will now arrive pre-stacked
  • balance: moved “Make Gunpowder” from Metalworks to Chemist
  • balance: when a module breaks, it should become inoperative immediately rather than having an intermediate broken but still working state.
  • balance: tripled beer production (huzzah!)
  • balance: smithing forge now requires iron ingot rather than iron plate
  • balance: higher skill no longer changes amount produced in any workshop – just time to perform work
  • FIXED: memory leak when a job has a dependency which we later fail to do anything with
  • FIXED: game-side commodity count not being saved and loaded correctly (probably causing standing orders to go berserk)
  • FIXED: lingonberry preserves are now edible again
  • FIXED: workshop job counter not incrementing correctly for “Finish Production” jobs (in 39B)
  • FIXED: workshop job ordering buttons (in 39B)

Biomes & Terrain

  • balance: Deathwurms on start position are now shoved to the side
  • balance: Deathwurms are now shoved much further
  • balance: Dearthwurm balance pass #3 – removed Deathwurms from tropical biome spawn (a handful are spawned via script now, well away from the start location)
  • FIXED: foragables (ie. Coconut Palms) can be cleared from any state of harvest

Events, Metagame, The Overworld

  • added foreign military intervention event to spawn foreign military squads
  • added “fishpeople butchered human” crisis event
  • fishperson crisis events will no longer fire if you’re hostile w/ fishpeople
  • bandit corpse decision event only fired if their bodies are in the bounds of your colony (near buildings & zones, basically)
  • colonists w/ certain traits can now object to fishpeople status quo & propose alternate policies
  • balance: fewer foreign troops will show up early in game (& now require it be daytime to arrive)
  • balance: immigration event has been revamped to reflect the value of colonists to the player
  • FIXED: scripterror in bandit joining colony event
  • FIXED: error in bandit_wants_to_join_colony
  • FIXED: some character events not firing
  • FIXED: various minor typos in events
  • FIXED: Script error during “Research Science Crate” event
  • FIXED: non-existent bandit gang attempts to give you stuff
  • FIXED: fishpeople marked for execution can’t trigger further crisis events
  • FIXED: incorrect ticker message sent when deciding to execute fishperson for assault

Music & Sound

  • animals can make more sounds now
  • made & implemented Obeliskian sounds
  • FIXED: some explosion sounds were only using default sound


  • workshop job currently being done is now displayed in the workshop panel
  • workshop output that the current work party will produce using the current equipment is now displayed in the workshop when mousing over the product
  • added icons for foreign flags & troops
  • added new icons for Xenophobe, Brutish traits
  • redrew Bucket of Raw Opium icon
  • some events will auto-zoom camera to their location (polishing in-progress)
  • FIXED: incorrect icon in recipe for Blunderbuss & broken icon for Musket
  • FIXED: various misspellings of words
  • FIXED: jobs not correctly removed from assignments in jobs UI window after saving and loading a game; can cause “jobs that are never completed”, “multiple people doing the same job”, etc.
  • FIXED: random autosave crash and/or memory corruption caused by machine expression timing error
  • FIXED: progress bars and nametags appearing through windows during gameplay
  • FIXED: emotions and speech bunch up when zoomed out, and all display at once when visible
  • FIXED: small typesetting errors in “wrapped text renderer” (putting a period by itself at the end of a newline, etc.)
  • … and the giant UI backend overall is almost done aside from some edge cases; we’re holding off making this available until after revision 40 so that we can ensure stability in the public branch.

Have fun and let us know through our mysterious portal or forum if anything goes wrong!

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

Hunting the Pointer Wumpus

First, a bit of scheduling news: the monthly update of Clockwork Empires, revision 40, will be released next week. Due to E3 and a giant Steam sale there’s not a lot of point in releasing anything this week.

Last time I wrote a blog post, I had written half of the Clockwork Empires codebase in order to fix various issues with autosaves being reported by users. Naturally, these things never happen when I am playing the game; instead, we got DMP files and sorted through them. (I wrote a little in house tool to process these for me; now I can run a batch file and it runs all the DMP files we get through a little script which automatically outputs their call stacks and other pertinent information.)

The moment of truth.

The moment of truth.

To try and fix these issues, I rewrote the entire jobs system in order to move everything into nice, flat arrays, and to get rid of direct references to pointers. My original hope was that this would fix the save game crashes we were experiencing, which were due to various instances of dead pointers to jobs being left in Lua space. Well, it fixed *some* of those crashes. Once Revision 39A came out, we got a bunch more crash reports: various people’s assignments were crashing, due to assignments being held in Lua after they were dead. Well, it wasn’t part of my original plan, but they got the same treatment – assignment handles are now first class citizens, and we can now actually tell if an assignment handle exists or not, and is deleted or not. Starting from Revision 39B, all the workshop assignments were also moved over to a new system where they were controlled by C++, and we were able to remove huge chunks of broken Lua code. Now the workshops were starting to feel good, in a way that they hadn’t felt since… well, since we first put them in – but yet, we still had save game crashes.

{ read this article }

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

Political Change Through Faction Crises

“Begin with a function of arbitrary complexity. Feed it values, “sense data”. Then, take your result, square it, and feed it back into your original function, adding a new set of sense data. Continue to feed your results back into the original function ad infinitum. What do you have?”

– The Clockwork Empires game simulation! (Thank you, Academician Prokhor Zakharov.) Specific acts in the simulation itself may provoke crisis events. Crisis events allow a player to change their settlement’s policy toward certain factions. I’ve talked about this subject before a little in “Event Design Using Twine”. Let’s pull a newly implemented example: A Fishperson finds a source of meat and butchers that meat, then consumes it. Perfectly natural, but in conflict with the pseudo-Victorian values of the player’s faction. What do you do?



{ read this article }

Posted in Clockwork Empires | Tagged , , , ,

You have to refactor all the jobs!

Practice makes perfect; once you have a system, you can improve it and you can refine it, but the hardest part is getting the system up in the first place. As a wise man once said:


Case in point: I’ve spent the period since the release of Revision 39 and today rewriting a good part of the jobs system.

{ read this article }

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

Fishy Foreign Faction Missions

Players order their colonists around in the grand bureaucratic tradition by creating assignments which are claimed by workcrews with the appropriate filters toggled. This is all very appropriate, hierarchical, and Victorian. What about the other factions in the game, won’t somebody think of the Fishpeople, the Bandits, and the Foreigners?

The first goblin-level implementation of Fishpeople involved spawning a whole mess of ’em and giving them the desire to rush the player’s colony and murder everything in sight, human or cabbage. The second level implementation of this sort of thing saw Bandits spawn with a notion of a group that has a home camp. The improvement pass on this gave bandit gangs names, leaders, and connected the morale state of bandits to one another.

Worthy allies or anti-monarchist revolutionaries?

Worthy allies or anti-monarchist revolutionaries?

{ read this article }

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

Clockwork Empires May Update: We Built This Colony With Hugs

Once more, a stack of Clockwork Empires updates appears in a neat pile. We present for you:


This update will go live to every Clockwork Empires player via Steam!

We have also updated our Clockwork Empires: Development Progress Report!

(Don’t own the game? Clockwork Empires can be purchased on via Humble or from Steam.)

Want to hear about all sorts of updates via email plus receive silly images from development? Sign up for the newsletter here.

Patch Notes:

{ read this article }

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