Category Archives: Programming

Decision Tree Rewrite and Requirements Code Cleanup

First off, a status update: we will not be releasing Alpha 44 this week. We will do an Alpha 43C at some point, and will aim to do Alpha 44 next week. This is due to a number of non-work factors, and we apologize for being a little out of sync. Alpha 44 will be better for it.

Business as usual.

Business as usual.

Last time I wrote a blogpost, I noted that we were redoing the barracks to use a new user interface. Well, the interface code was written, but disabled, because we needed to set the AI to use all the new goodies (and, also, to make sure that we fix some of the long-standing military bugs that make our soldier friends less than effective.) The issue here is that we have a big block of decision tree code which should drive military decisions, as well as your hierarchy of Maslowian needs. Right now, this code doesn’t really have a unified mechanism; there is a big block of code that is hard coded for colonists which evaluates their military tree, and that’s sort of a big ugly mess. There needed to be a mechanism to evaluate a decision tree – a series of requirements and “do I succeed at this requirement or do I fail at this requirement?” decisions, which we can run through consistently and without touching the scripting system. I planned on doing this – and even blogged about it! – a few months ago, but kept putting the rewrite off because I knew it was going to be terrible, and because there we always other things that needed to be done first. Anyhow, I finally ran out of things I could meaningfully do before doing this horrible rewrite, so I finally said “ugh” and started in on it.

{ read this article }

10 Comments

The Joys of Video Card Compatibility

With David taking a quick getaway vacation, and Micah off recovering from not doing anything in academia recently, Daniel and I are quietly holding the fort. By quietly, I mean “stirring up trouble.”

As you may have read, we sent out several builds of Clockwork Empires to various parties recently. Six such parties, in fact. Of these six parties, three of them were able to play the game, and three of them were not. This is what happens when you take code that runs very nicely on your office machine (Windows 7, a Lot Of RAM, a fairly recent video card of Good Quality and Character by NVIDIA, with a Fan Attached To It) and try to run it on somebody else’s machine (Windows XP laptop, 1 gig of RAM, and the video card driver is actually just Bonzai Buddy.)

black

Output of the game on the Intel HD4000.

{ read this article }

44 Comments

How to Debug an Exploding Building

Things are afoot. As part of these things, we have had to do a few things that we have been putting off for awhile now here at Gaslamp HQ. One of these things is fixing pathing so people do not walk through each other; the other, which is what I have been working on, is a thorough shakedown of the building code.

As long-time readers are no doubt aware, one of our interesting pieces of technology is the code for procedural buildings. In Clockwork Empires, you designate a building footprint, feed it some style information (“brick walls and gabled roofs, please!”) and the engine churns out a building to your specification. There is significant Technical Devilry in our building code to do this, as it is a fairly hard problem to take somebody’s blueprint and get a building out of it.

As part of upcoming Things, one of the things we have been working on is a rewrite of our code for procedural buildings. The new code has a few key features that were requested by our art department:

1. It should not explode. (See this picture, arranged by David Baumgart and sent to me, of roofs exploding, set against a backdrop of early 2013 art.)

big_book_of_british_rooves2. Support for other roof types. (Roofs come in a number of different styles, and we should not blow up when we handle them.)

3. Less fragility when handling cuts in buildings (for things like modules, doors, windows.)

4. “Good” edge beveling for roof flashing. What this means is that when a roof faces the player, and has complex geometry, we should bevel it appropriately.

5. A litany of other, minor artist complaints.

Accomplishing all of these things requires a certain amount of very tricky programming, and some very skilled debugging. How do you debug an exploding roof?

{ read this article }

8 Comments

Technical Status Update: Empire Shutting Down, Whigs to Blame

Late breaking news from the Clockwork Empire, delivered by heliograph: The Empire is Shutting Down!

Yes, at the behest of the thrice-damnable Whig Party, the iron gates of the Panopticon are shuttered, the Lord Palmerstoke Institute for Structurally Interesting and Extremely Sensitive Science has turned off the fumic extractor, and the mysterious clicking noises at the Empire Times are getting louder as the Editorial Board reviews its position on the events of the day. The Prime Minister is furious – all of this over the new healthcare plan, which his political enemies decry as Novyrus-Style Medical And/Or Beard Care. False rumours abound that a stout worker cannot choose his or her barber/chirugeon any more, and that death panels have been instituted to ensure that people die by any means necessary. Big, steaming government, encumbered by needless machinery, is interfering in the relationship between a doctor, his patient, and his leeches.

Lies, we tell you! Lies!

This brings us nicely to a Technical Status Update – what’s new this month? And how are the brave folks of the Clockwork Empires handling this upheaval?

{ read this article }

11 Comments

I SMOULDER WITH PROGRAMMER RAGE

Have you ever had one of those weeks where everything seems to go wrong? Work is being done. Oh yes, work is being done. But at every step, we are beset upon by mystery and woe! ARGH.

Loading doors! Mr. Triolo animated them. They are lovely:

Good, well-behaved shutters. (Seen in Maya.)

Good, well-behaved shutters. (Seen in Maya.)

Let’s put them through the same process that we use for importing everything else into the game, la la…

{ read this article }

20 Comments

Particles; The Homicidal Aurochs

Daniel and I are crunching a little bit this week in order to meet an internal deadline. (“El Dorado”, named after the mystical city that doesn’t really exist and has never been found; we only chose that codename because “Titanic” was apparently used for a Microsoft product.) We try to avoid it as a general rule – after Dredmor, which was released after we  crunched for about three months, non-stop, the old batteries need time to recharge – and were more or less successful doing this for the Dredmor expansion packs; however, we’re a little bit behind where we want to be and we need to do a little sprinting until the end of June in order to get everything back on track.

Daniel is hard at work on aurochs this week – killing them, and butchering them for their meat. This led to twenty-five homicidal aurochs immediately rampaging your settlement and killing everybody before you have a chance to collect your firearm.  He has subdued them… for now.

It also turns out that the singular form of “aurochs” is, actually, “aurochs”. Who knew? David, apparently.

You may recall me mentioning back in May, or so, that I’d started work on a particle system and editor for Clockwork Empires. At the end of last week, I had some of the particle system done but very little editor functionality, having promised that I’d “get to it, yes” – and then ending up doing things like, say, combat or more work on dynamics lines or any of the things that I would rather spend my time doing other than a particle system.

Finally, David started holding things hostage. FINE. Particle system. Right. Good. Editor? Writing? Blech.

{ read this article }

10 Comments

May Technical Status Update: Building Interiors, Workshops, Outlines, Hidden Work

Things are slowly coming together. Some new developments have occurred in programmer town, and we are delighted to finally show you what we spent the past month-and-a-half doing.

Bluntly, things are coming together at last. People can harvest resources, process them in workshops, and convert them to other resources. People have their own actions as well; if people can’t eat, for instance, they’ll die. Poets still wander the hills, trying to be inspired by things. The noble aurochs plough through the land, and so forth. Want to see a sneak peek? Read on for some new features…

{ read this article }

18 Comments

A Day in the Life of a Programmer

The programming team codenamed our current milestone El Dorado after the mythical city that doesn’t really exist. Most of the stuff that we have been doing towards El Dorado… well, it isn’t ready yet. Also, a lot of it is systems which are transparent to the user (networking, refactoring, serialization, etc.) It’s all important, but it’s not glamorous. We should, however, have a few interesting things to show next week. We (well, mainly Micah) wrote up some of the work that we did on our threading and messaging system, and submitted it to an academic conference; I am pleased to report that HotPAR ’13 (the Usenix Hot Topics in Parallelism conference) decided to accept our paper, which will be presented at some point in June. I should figure out when that is…

So instead of the big Technical Status Update, which we’ll probably do next week, let’s look at a very small slice of life that makes a big difference. A lot of people ask me what it’s like doing game development, as a day-to-day process as opposed to the big picture; this is a good example of what it’s actually like on a given day, what graphics programmer thought processes are like, and so on and so forth. Also, I’ve included the picture of a tortoise next to a pile of ammunition that David refused to last week.

{ read this article }

18 Comments