Dungeons of Dredmor
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.
One of the things that I did recently was to fix the shadow code up a bit. Shadow code, you may recall, was one of the first things I did for CE, simply so I could figure out where people’s feet were. We rendered a shadow map from a fixed view point, and so you got chunkies like this:
Note that this picture looks fine – until you zoom up close, at which point you’ll see the problem. Shadow artifacts like that occur when the shadow map in question – which is basically a texture – stretches so that more than one pixel on the screen are covered by the same texel of lighting information. The end result was that – in addition to the chunky artifacts you see on the rim of the shadow, as you moved around the map close up, shadows would shimmer like a heatwave as you moved about the map. The first type of artifact can be described (loosely) as spatial aliasing; the second type of artifact is what I would call temporal aliasing (that only appears when you move.)
The general solution is to implement what are called Cascaded Shadow Maps, where you have multiple shadow maps in a big stack; areas of the screen that are closer to you are rendered in one shadow map, areas further away are rendered in another one, etc. Well, that’s no use for CE; everything on screen is about the same distance from you at all times.
I didn’t want to just change the zoom level of the shadow map as you zoomed in with the mouse wheel. In particular, I worried that it would be a shimmering mess of jaggies that would look awful, just awful, when you zoomed in and out; in other words, we’d be replacing one sort of aliasing with another sort of aliasing. I considered more and more dramatic solutions, including having enormous shadow maps that we updated sporadically and doing all kinds of other wacky stuff, until finally I wondered if the temporal aliasing caused by just zooming in and out on the shadow map would really be all that bad.
In fact, it was totally fine. Shadows now look like this:
with no noticeable change in performance, and look just fine zoomed out as well. If I had to name a reason why this works, I’d say that any possible changes in which sample we pull from the texture as we zoom in and out are masked by the small 9-tap percentage closer filtering we use on our shadow maps to give them nice, soft edges.
Moral of the story: good programmers challenge their assumptions constantly.
Some Rubbish Screenshots
Radical notions about “the Natural Environment” are not given much thought in The Empire and rightly so. Indeed, those who profess “Misgivings with respect to the effects of Unbridled Industry and So-Called Progress in our Nation” are dismissed as debased spiritualists that can be assumed to gather in Laudanum Dens to associate with Poets who fill their heads with rambling apocalyptic screeds.
When all is quiet, the Rubbish Beetles scurry from their burrows and perform the duties Nature has seen fit to assign to them.
Continuing forthwith: All et up from that tin of Doctor E. Sanin’s Patent Tinned Meat* Slurry Product? Just toss it aside with nary a care. Divested the shipping crate of its contents of finely enameled bric-a-brac (including a set of commemorative plates featuring portraits of our fine Prime Minister)? Toss it on the heap with the rest of the rubbish. The world provides its obviously limitless bounty to us to be used, dear reader!
Ms. Tortoise (centre bottom) is unimpressed by progress on the new Autopneumatic Lumborium while Edwina Cogwright (centre left) is confused by the floating mechanical eye looking down on her.
In darker news, rumours surrounding the matter of shadows appearing, as Mr. Zedekiah Swinglever’s letter to the Empire Times put it, “most vexingly angular and wrongly geometried” is in perfectly capable hands. It is had on good Authority that Her Majesty’s Ministry for Investigation into Affairs of the Unnatural & Occult has one Mr. Nicholas Vining – an expert in theories & applications of matters pertaining to Luminous Aether – consulting in the investigation into what is clearly a Cultist conspiracy.
We are assured that the issue will be resolved before the week is out and that any cultist rioters, labourist agitators, or suspected Republique Mechanique spies will be shot. Cog save the Queen!
Designing Combat for Clockwork Empires
Yes, we’ve finally got to that point where we had to put together a comprehensive design for how combat works in Clockwork Empires. So let’s talk a bit about it.
Not an in-engine screenshot.
We’ve all played lots of games and almost all of them are about combat in one way or another so this seems like it should be a fairly straightforward problem to solve. But CE is not like most games; Not at all. Combat is not the central game mechanic and focus for the game, merely one possible component in a much larger system. It can’t be allowed to take over the game and unduly tax a player’s attention, nor should it be irrelevant or some kind of tacked-on side-game as seems to be the pitfall of combat systems for a number of classic city-builder games. In CE, combat should tie in with as many other game systems as possible so that it supports the other mechanics in play and in doing so enriches the overall experience. Simple enough, eh!
With those requirements in mind I tried to sum up CE’s take on combat in a sentence: “Combat should be slow, mostly positional, and have its outcome determined by supply and setup instead of tactical micromanagement.”
The pace shall be deliberately slow so a player can take the time to properly assess the effects of their decisions and have time to adapt their strategy to failures. (And besides a slower pace, the game can be paused outright in the manner of tactical combat in classics like Baldur’s Gate or Darklands.) Outcome determined by supply and setup instead of moment-to-moment Starcraft-style micromanagement means decisions most important to the outcome of combat can be made well ahead of time. This makes it a game of strategy over tactics, and tactics over twitch. To further that point, as is proper in a city-builder game, thoughtful positioning is everything: just as it’s important where the mines are built in relation to the middle class housing and the metalworks, just so it is important to be mindful of the placement of your defensive wall, the artillery squad, and Steam Knight patrols. Rather than a reflex AWP shot, think of it more like gardening, albeit bristling with barbed wire and Redcoats.
The Chain of Command & Command Disposition
Mjr. General Ogden Cogsbold’s timid manner is reflected in the behaviour of the entire regional military.
Clockwork Empires is a game about characters, not just the cold mechanics of supply chains and industry. Therefore the character of your soldiers must be essential to the outcome of combat. In the post about overseers and work crews it was implied that the character of an overseer is reflected in the performance of the work crew they lead. It’s just the same for military squads with NCO and officer leadership of military squads having an even greater effect which we call “Command Disposition”. And I daresay, the hierarchical theme of top-down leadership fits nicely into 19th century military doctrine.
Now, the Command Disposition — in addition to how a squad is manned — can act a bit like scripting orders for squads like some kind of really lightweight version of Dominions 3 tactical combat. Assign a bookish and stubborn NCO to a squad and they’ll tend to be defensive and stick to their trenches. Assign an aggressive, violently-inclined NCO to the same squad and they become more likely to order a bayonet charge against the enemy. There’s a bit more to it than that of course; equipment has an effect, so Steam Armour equipped squads will be used for the role of assaulting defenses and artillery equipped squads will stay back and merrily bombard the enemy.
(I will also admit here that the random leader personality trait generation of Paradox‘s Victoria as well as Hearts of Iron III’s command structure system have had a good bit of effect on my thinking.)
It is worth stating of course that the personalities and interactions of characters is a whole system unto itself which has effects that are felt in combat which is a subject which deserves a post of its own.
Managing Defeat
For many combat games, once the sequential play-through has its reloads trimmed off, the timeline looks like a straight line of victory after victory after victory. The player has power over some kind of quantum multiverse which allows them to select the timeline in which they won every battle. In contrast, we want players of Clockwork Empires to be able to fail, but we want it to be a rewarding experience to fail. As we keep saying in interviews, “Things going spectacularly wrong makes a great story.” Remember the Alamo, the Charge of the Light Brigade, the Battle of Isandlwana, and Dredmor’s planned release date!
Defeat should be a bloody good story. A player who keeps a stiff upper lip and endures defeat should be rewarded with narrative richness. And that said, we game designers should be nice enough not to punish them by making their entire game collapse because a squad of soldiers had a bad day. So we must soften defeat from the traditional red mist and bone chips model that’s had such a strong tradition in games.
So: Combat won’t be a meat-grinder. The Starcraft-style RTS has its soldiers eagerly fighting to the death – and always to the death. In CE an individual character’s willingness to fight affects whether they will actually stick around to fight. Sometimes a coward is a coward, but a player can stack the odds in their favour by choosing the right military leadership, setting their squads in good defensive positions, keeping troops well supplied, and doing everything else they can to keep moods positive.
Concepts for field fortifications based on American Civil War era gabions which I spelled “galbion” and know is incorrect so no one has to correct my spelling now, thanks.
It must be said that with all the character-driven action in mind, there’s very much a balance to be struck between characters’ willingness to follow orders and the player being able to actually play the game in any meaningful sense. This goes for civilians as well because if your lumberjacks are more interested in dancing jigs and drinking gin than ever getting to work, this game is going to get really frustrating.
Pictured: Steam Knight pulling on invisible rope.
Back to the subject of defeat: Even victory can be made expensive to slow down runaway success. Combat actions wear down characters’ stamina, and suppressing fire saps willingness to act – perhaps in the manner of Jagged Alliance 2 in which suppressing fire would actually reduce action points. When in a tight spot, buy some time with ammunition! (Though supplies are limited and must be properly restocked.) Further, the best combat positions are of course immobile defensive works in the grand tradition of something between the American Civil War and World War 1. Anything strong enough to punch through those static defenses, be it artillery batteries or Steam Knights, requires a solid supply of fuel and munitions which in turn requires careful use of terrain, guarded flanks, and measured advances. (By the way, these logistical themes are explored elegantly in Unity of Command. Hi Tomislav!)
Not pictured: the Lightning Gun.
Right! Well, there’s more to it than all that: equipment, types of soldiers, the exact personality traits which affect combat, types of units via squad equipment attachments, the role of armour and artillery and static defenses, psychological effects of combat, and of course how the heck the UI for all of this is going to work. It’s all very early in the design process and what we’ve got here is largely a statement of goals & high-level plans for how to meet those goals using the other systems in the game as a framework. The details are very much subject to iteration as the game hits testing so there’s not much use in getting into the gritty specifics. But in all I hope this has given you an idea about where we’re planning to go with combat in Clockwork Empires.
Q. What, no cavalry? A. Not on horses, no. The Gaslamp Way does not involve doing anything so mundane. Plus it’s actually really hard to animate horse cavalry properly in limited space. The Mount & Blade or perhaps Total War series are about the closest you’re likely to get at this point. That said, keep in mind: Nothing So Mundane As That.
Q. Are there tanks? A. Of course, because what else would Steam Knights keep their high-pressure steam in? (Surely you’re not referring to those burdensome Stahlmarkian Landkreuzers?)
Q. Can you fight your friends in multiplayer? A. Naturally, and didn’t we cover this already? Every Gaslamp Games Press Release is Totally Serious About Everything.
New Methods For Extracting Surplus Value From The Labouring Classes
Salutations scientific Colleagues & curious Dabblers!
Welcome to another edition of The Gaslamp Games Games Development Weekly Heliograph Circulation. Today we discuss the manner in which the Middle Class is employed to oversee the labours of the Labouring Class by means of organization through the newest methods of Scientific Management.
We shall demonstrate this week’s study in the field. First, a sampling of tools has been laid in careful rows on the ground. Each tool is associated with certain Jobs, as documented by our associates of the Royal Society of The Clockwork Empire for Improving Natural Knowledge, Misters Vining & Whitman (which you may recall have recently described various phenomena including studies on Plebeian Collision Avoidance In The Common Mob & an investigation into so-called “Animal Jobs”).
So, proceeding: tools at-hand, the Colonial Bureaucrat must initiate action by stamping a properly filled work order which designates a site on the landscape. This task can range from “Chop Trees” to “Flatten Land” to “Find Nature” (wherever it’s hiding). This order is then directed to a work party overseer (who is implicitly of the Middle Class and therefore of correct Station to command a group of Lower Class labourers). The work party overseer’s squad collects tools fit to their assigned task while the overseer heads directly to the work site.
In the heliotype below we see a work crew gathering axes for their “Chop Trees” task:
A feller needs a chopper that’ll hack it. (Meanwhile, the only tool the Overseer needs is Management Skills.)
Don’t mind the Wrong shadows of those flowers; That’s obviously the work of cultists. You’re not a cultist, right? Right, good. So pay them no mind. Every loyal Subject of the Empire sees only what they need to see to perform their Duty, so help them Cog, hip hip huzzah and all that.
Equipped with proper tools, the work crew proceeds to the designated copse. The overseer begins the task of hand-waving — the essence of management — while the labourers get to the chopping.
“Umm we need these trees all chopped down so if you could go ahead and come in on Saturday that’d be great.”
Indeed, our sample case in no mere anecdote. The entire range of toiling can be described & efficiently executed by means of this new method of Scientific Management.
Take for another example the flattening of land: the chaotic encrustings, crude hills, and savage mountains of Nature must be cleared and prepared by hand for proper Civilizing by means of vast constructions of factories, roads, tenements, walls, and pipes! Observe in the heliotype below the collecting of shovels by a work party named “The Pleasant Flies” for some unknowable reason:
Steampunk Charles Darwin oversees the collection of shovels for certain Digging Experiments.
And look at our boys go! The vigours of frontier life are a sight indeed and their fruits shall enrich our Betters while, surely, embiggening the spirits of all.
A great trench is dug; Naturalist looks on vacantly from exceedingly & increasingly awkward vantage point.
To review our Study:
- A work party is overseen by a Middle Class person whose relevant skills influence the disposition & efficiency of the tasks being carried out by each labourer.
- Jobs for work parties are created by the Colonial Bureaucrat.
- Labourers will see to their own collection and use of appropriate tools to the task assigned to them.
- Hip hip huzzah and all that.
- It is important to chop down all the trees, tear down every mountain, fill in every valley, and cover the world with Progress.
TODAYS BUG: There’s a Hole In The World
Upon firing up the current build, and er, stepping from the research zeppelin? Something something. Regardless, I was confronted with an irregular black void, a Scar on the face of the World. It sat there, being-not, doing nothing, filled with nothing. I peered in to see only blackness staring back, accusingly.
Don’t look directly at it!
I sent the above heliotype attached to a report of the phenomenon to one Mr. C. Whitman (suspected Wizard, freelance), hoping he perchance knew of some method of magicking the fabric of the world back together before anything comes out from this Void — or the Investigators catch wind of this. That wouldn’t do at all. It’s such a fine colony we’re building, it’d be a shame if it had to be burned to the ground all over again to root out cultists.
A Troubling Account of Doubles in Certain Regions of Colonial Antipodia
“Adventurers, Seekers of Fortune, Desperate Paupers, Stout & Industrious Working Folks”
Emigrate to Inviting and Delightful shores of Pristine WEST ANTIPODIA untouched by Civilization & Cog-fearing subjects; Vast PROPERTIES await Discovery Taming and Exploitation by Enterprising & Energetic Persons of Business & Family yearning for Open Land and the famed Vigors provided by the Savage Airs of
COLONIAL ANTIPODIA.
Dear reader, do forgive this writer’s indulgence in excited quotations, but our bored copy-clerk producing grist for his Pewterbolt & Daughter Automated Typesetter must in turn be forgiven his Penchant For Flights of Imaginative Fancy, for he knows only a small gray desk in a small brick office in one of the more homely quarters of The Capitol. Yet this clerk dreams of a transformative life on the wild Open Frontier; Why, in such a life a humble office clerk might remake himself in the crucible of the Sublime! It is among the higher callings heard by those who go to the Colonies.
This is not his story, however, for it may be presumed that he remained a humble copy-clerk for many years.
The clockwork of our narrative is driven by one of Mme. Cordelia Philomena Tinsrife who, at the time of these events, held the title of Chief Bureaucrat of the Royal Charted Colony of New Sodbury Market.
She was a decorated veteran, a former sergeant hardened in battle by many conflicts on the Frontiers, including the most formative and ultimate experience in her career to do with “The Unpleasantness At Tarsmoke Fells” which we of course know is Not Spoken Of. Nonetheless, without Speaking Of It, medals were awarded to the few survivors and each was politely but firmly asked to Never Speak Of It Again cheerio each must do their duty good show Cog Save The Queen and all that why not sign on with the Royal Charter South-Southwest Antipodian Trading Company? Why, they’ve need of solid soldierly folk like yourself in their ranks it’s a grand opportunity if I daresay and one might not expect to find much better what with the way things turned out (punctuated here by a Very Deliberate Look given by the Investigating Commissioner over lowered spectacles) and so forth.
We must credit Mme. Cordelia Philomena Tinsrife for she took that sound advice from the Investigating Commissioner and sought her fortune & career with the Royal Charter South-Southwest Antipodian Trading Company.
Let us travel together, dear reader, on the steam-locomotive, coal-burning airship, & turbine-propelled sea-steamer of Imagination. We fly from that stuffy little office in The Capitol past the great booming Engines of Wealth and Progress bellowing forth that happy Smoke of Industry, across the verdant home counties Improved by the latest Acts of Enclosure & construction of Great Mills astride each river, to the gray sea crashing under the rust-red cliffs & their sanguine effluvia we love so dearly and then away from our native shores across the Oceans on journeys of days turned to weeks.
We set the scene of Mme. Cordelia Philomena Tinsrife’s assignment from The Company on one somewhat harried bluff selected for its commanding presence above those “inviting and delightful shores of pristine West Antipodia”. The hinterland forests are not quite so “untouched by Civilization” as they were that day the Royal Charter South-Southwest Antipodian Trading Company established its latest enterprise of New Sodbury Market, but they are still impressive nonetheless and provide valuable timber for the Empire.
It must be noted at this point, dear reader, that there was and is no market established in New Sodbury Market – no, not yet – but one cannot but admire the spirited ambition our settlers established in a stroke of Mme. Cordelia Philomena Tinsrife’s pen.
And just so Mme. Tinsrife occupied herself from the hours of six ’til four on each day in her office, a right and proper place for a bureaucrat, flanked by cabinets of files and papers, smelling of ink and wax and all the reassuring reagents of her craft. Entrenched so, she stamped and signed and sent-away-for all the good things which a bureaucrat summons from the body of our great Empire: shining copper plates, clever & intricate machine parts, fortified brandy, chemical explosives, matched boots (forty pair), brass fittings, a sampling of the latest in fashionable hats, sheets of tempered glass, pungent sacks of coffee (50 stn.), and all the multitudes & the many things the growing colony of New Sodbury Market required.
“Madam! It’s, I do apologize madam, it’s -but there’ve been events most troubling!”
Mr. Gideon Millchock, assistant clerk to the Colony’s Chief Bureaucrat, had burst through the door of the office of Mme. Tinsrife, setting forth a gust of that Vigorous Air which in turn upset certain consignment orders leaving the Business of the Empire slightly askew and smudged with ink. Mme. Tinsrife lowered her spectacles and gave the wheezing Gideon Millchock a Very Deliberate Look.
Gideon continued, uncowed: “I — sightings, Madam, Mister Brazenton’s workparty? Timber duty? They’ve reported sightings, Madam. Sightings!”
Mr. Gideon Millchock wrung his large hands as if they were a beached sea serpent tangled with itself and gasping its last and generally in a manner most Annoying and Low to Mme. Tinsrife’s eye.
“What manner of sightings, Mr. Millchock, the details of the matter please.” said Mme. Tinsrife.
“You, ma’am, but not you. And me, but not me, with a party of soldiers and labourers.” said he.
Gideon proceeded to describe a meeting of Brazenton’s work-party with himself-but-not-himself as well as her-but-not-her, dressed oddly in garb not befitting their proper Profession (though Brazenton had not inquired for it might give to unseemly Implication). Much confusion was had for these doubles claimed to be from a Royal Chartered Colony just over the hill and inquired quite forcibly what Brazenton was doing in the middle of what was clearly indicated to be Uncharted Wilds in the Zone of Exclusive Exploitation granted to the Royal Charter South-Southwest Antipodian Trading Company.
Amidst the argument, Brazenton managed to have a runner sent, hence Gideon’s interruption.
Mme. Tinsrife frowned, for this was feeling like just the sort of thing which was Never Spoke Of Again. But duty is duty and Cog Save The Queen and The Glory Of The Empire and all that; forms must be filled and once questions are raised they must answered.
“Gideon, send for Sgt. Bellwethers. Have him assemble his squad and accompany us to meet these… visitors. Now, if you please.”
As you know, dear reader, it is The Bureaucratic Act – of putting seal to official writ – by which things are made Real in the Empire. This Reality is the Truth of Ministries and Notes and Records and Documents confirmed as real as is ever to be needed to any Cog-fearing subject of The Queen in this Modern Age of Empirical Discovery and Scientific Order which rests the solemn weight of Knowledge in Recorded Facts. By writ and seal the Empire is Built!
But, it must be conceded, it is by musket & cannon that the Empire is Kept. This Mme. Tinsrife knew very well.
Cordelia, if we may be forgiven presuming a rapid familiarity with the primary subject of our narrative, pulled open the drawer of her bureau and drew forth her old service revolver. She brushed the stack of consignment forms to one side and took a moment to re-check the oiled clockwork of the pistol. The device – a Coalburn Royal Arms patented 4-shot revolver – had served her well in the Siege of Kolesograd and saved her life, though not her military career, during the events the Times had referred to obliquely as the “Unpleasantness at Tarsmoke Fells”.
It should be noted here, dear reader, that while the Empire Writes the Real, it too can Unwrite what it deems Ought Not Be; notably to our narrative Certain Events at Tarsmoke Fells & any hope of Cordelia Philomena Tinsrife’s having a future in the Army. She knows this very well too. But in a small act of rebellion she remembers to herself what happened there, years ago. It is Real to her alone, at least, for she has Written it all down in a very small diary hidden beneath the floorboards of her accommodation, just in front of her cabinet of dishware & teas. Do not worry on her behalf, dear reader, for her secret rebellion is quite safe between your treasured company and this writer.
Cordelia loaded four cartridges into the Coalburn then rose from her desk to begin a proper Investigation.
[CONCLUDES PART 1 OF A Troubling Account of Doubles in Certain Regions of Colonial Antipodia FROM THE SECURE ARCHIVES OF HRM'S MINISTRY OF INVESTIGATION INTO MATTERS OF THE OCCULT & EXTRAPLANAR AFFAIRS, PREPARED BY LIEUTENANT-INSPECTOR EZEKIAL LELAND STEELBOLT]
April Technical Status Update
It’s April! There is a Technical Status Update. You know the drill.
When last we left the programming team, I think I mentioned that Chris Whitman was working on Animals. Well, we now have Animals. The Common Aurochs wanders the fields and streams alongside its more robust wooly cousin and the occasional family of plump deer.
Shadow Aurochs brood mooily in darker portions of the landscape.
Aurochs and deer travel about in herds, and will look for food. A large part of their behaviour comes from ‘not wanting to move to new areas where there are things that they don’t like, namely humans’; by default, wild aurochs and deer will attempt to avoid humans and civilization. Since animals do ‘Animal Jobs’, or as Mr. Whitman put it, ‘Animal… Jobs?’, we extended this system to provide a preference for, or against, things that your in-game population may like or may not like. For instance, it is possible that a work crew’s overseer does not like aurochs all that much, and therefore will look less favourably on jobs that will put him near the smelly things.
Characters also got the start of rudimentary steering functions. Here we see forty characters aimlessly wandering around without tasks:
Here is a scene consisting of one hundred and fifty characters, moving from place to place, at about twenty frames per second:
I’ve turned on character steering debugging mode, which shows velocities (cyan), paths (green), and collision spheres (green, or red if colliding). Characters forward project their velocities using swept spheres to try and evaluate if there is a collision; if so, they will attempt to move away from things. They also try to maintain good separation from each other in general, similar to standard flocking algorithms. Right now things still need tuning, but characters in general make a pretty good attempt at steering around each other when they are about to collide. I expect I will end up spending more time on it as the game progresses.
It is worth noting that the 150 characters are all fully simulated, and will do things like feed themselves, perform tasks such as tree chopping and building creation, and generally bumble about from place to place. We are far from done optimizing – in particular, character skinning still occurs on the CPU – but this makes me feel pretty good about the game’s eventual performance.
Mr. Whitman has also been busy working on what we should call ‘dependency resolution’ – making characters smart enough to put things in stockpiles if stockpiles exist, putting things not in stockpiles if there are no stockpiles or no full stockpiles, and generally knowing what to do with themselves when they’ve picked up something. Jobs now have requirements blocks, and lists of requirements that they fill; if a character wants to do a job, but has to do another job to fill a requirement of their first job, they will now do so.
We now support Fog of War, like your favourite RTS games:
“We really need you to find that rock.”
Here we see a naturalist attempting to reach a pre-determined exploration point, designated by the small rock in the corner. (We’re using rocks to represent order points as a placeholder.) Orders are a new type of command you can issue to specify that you want somebody to do something at a certain geographical location that is not tied to an object, a building, or a person; examples of orders include “Explore”, “Flatten Terrain”, “Perform Geological Survey” and “Search for Nature”. Quite likely this will expand to include certain types of military operations, and other things.
We also put in some things from Creepy Week… but we’re not ready to show them to you yet.
The rest of the month looks to be occupied with workshops, building, and events. Exciting times! We’ll keep you posted.
PC Gamer Interview
You will note at the end that we give a new, intended approximate release date. We’ve decided to push our intended release date for CE back a bit, from “late this year” to “early next year”, around February/March 2014. Simply put, this is a large game and we need more time to do a good job of it and make it fun. (Also, we don’t want to compete with a bunch of console launch dates.) We hope you guys understand, and we promise the game will be better as a result.
GDC!
David, Nicholas, Mr. Dykstra and I were down in San Francisco for the annual Game Developers Conference (as you may have noticed from our impressively slapped together post from last week), and we thought it might be cool to give you guys a little bit of an idea what that’s like, why we were there, and what happened.
Sunday.
Daniel: Got in late in the afternoon, haggered after attempting to move myself to Vancouver (unsuccessfully) in 2 days by cramming everything in a minivan. Bought the most expensive public transit pass of my life for a 1-way trip to downtown ($9! thanks Bart). Found hotel, collapsed in a heap until the other guys arrived, then we went to eat dinner at the restaurant that David dubbed “Fleshy’s Steakhouse.”
Nicholas: Went for dinner – to the steakhouse in the hotel lobby, which was good and featured a great deal of bourbon. David watching me eat steak tartare, with a mixture of fascination and revulsion, will haunt me for about the next two weeks.
Vowed to put Fleshy’s Steakhouse in Clockwork Empires.
A Yellow Obleskian Monolithic terrifies the conference attendees.
Monday.
Daniel: Watched some talks given by indies and AI teams doing squad shooters trying to get some ideas for squad tactics in CE. Some neat stuff there, and if we ever get back to Dredmor development the XCOM AI system would work very neatly there.
Ran into Tomislav Uzelac of Unity of Command – awesome guy! We had lunch, griped about troubles with distribution and getting funding for games. I believe this is the point where I drenched myself in steaming hot coffee and seriously scalded my left hand. The coffee shop would later be dubbed “The Burning Hand”, and for some strange reason, I kept going back.
Nicholas: Watched more AI talks. In particular, the “future of AI” talk was interesting; the first half of the AI talk was about our message-passing system (well, somebody else’s version of it) and the second half of the AI talk was about our utility function system. The animation talk for the new Hitman game was both invigorating and terrifying, because we don’t have an animation controller yet.
Snuck into the Sony PS3 indie event. I was going to go crash another party (the IGN one) but I collapsed, in a heap, with mysterious chills.
I woke up later, trying to find somebody for dinner, at 10 PM. My good friend Avery, formerly of Popcap and now at, uh, Z2? – was up for it. Dinner, however, turned into “Drinks.” Drinks turned into “Drinks at the Goth Club. And dancing.” So that happened at “Death Guild” at the DNA Lounge. It was good. We ended up going for pancakes at 4 in the morning, and talking about the secrets of life and death.
Chris Dykstra, our business manager, found a note on his door when he arrived at the hotel: “Gone networking at goth club. Please wake for breakfast.”
David next to a statue of Transdimensional Zombie Reagan.
Tuesday.
Daniel: Met Jurie Horneman! We talked about how weird it is trying to find a job title that makes sense in an indie studio. Had a salad, sat in a great park near the conference with Jurie, Tomislav, Nicholas, David, and some new friends and talked about transmitting mechanical force over distances.
At this point I think we sneaked into a major “Announce Party” from a gigantic game publisher and drank as much of their beer as we could before we hurried out to a gathering of game developers at a weirdly awesome bar. We left when the people dressed as lobsters got on stage.
Nicholas: Somewhere in here we also went to the Spacechem talk, which was awesome. Zach probably has worse tutorials than we do. Another networking event took us back to the DNA Lounge, where we would spend three nights in a row out of a possible five. David ate vegan pizza at the DNA lounge’s attached pizza shop, and felt good about it.
The pizza was named after Morrisey. Or possibly Sting.
Daniel: Oh yeah, Zach! That guy is awesome, you should buy Spacechem.
Wednesday.
Daniel: Meetings day! We had the opportunity to meet our assigned Valve human for the first time! Very weird to have some great working relationships with some great people that are crucial to your business and never to have met them in person (this is a recurring theme across indie game development). That was really cool. Met our new (awesome) PR person for the first time too! We had a lot to drink in a hotel lounge that has windows like the Death Star.
Nicholas: Went to a very strange Indie Party. It was, frankly, kind of dead, so then we went to the Valve party and invited various people as our +1s. Our new PR person successfully bonded with the company, through alcohol. The Valve party was fantastic. After it died down, I went *back* to the Indie Party and caught the tail end of a DJ set by Phil Fish, who is… surprisingly nice and totally unlike his Twitter feed in person. A mystery wrapped in an enigma, like all good Canadians. At this point my very good friend James showed up, gave me a 12 year old Scotch in a shot glass, and we ended up going out for pancakes at about 4 in the morning and talking about the secrets of life and death.
David, dancing at the Valve party.
Thursday.
Nicholas: Breakfast, at 8:30 AM, with Alex Evans, the Technical Director of Media Molecule. He was, apparently, “impressed by my hangover control.” Alex and I talked about the joys of technical directorship and mainly just wanting to be left alone, and hashed out a cool thing for Clockwork Empires which you will see… later. Thanks, Alex, for supplying the missing piece!
Then: Meetings! First with AMD, then with NVIDIA. People want us to do things for them, and I got a handful of technical contacts for CE.
At some point, Chris Dykstra burned his hand at the Coffee Shop of the Burning Hand. Cue chanting – “one of us! one of us!”, etc.
Did not go to any of the night’s party invitations. We had a choice between either Skrillex, or Humpty Hump. I was going to choose Humpty Hump, and was disappointed that this was not something I could do due to Exhaustion.
Daniel: Received tiny bottles of artisanal Texan vodka from a guy named Eric. Thanks Eric!
Daniel assumes the Despair Position prior to our meeting with NVIDIA.
Friday.
Daniel:
Seriously dogmatic tea drinking. Sat next to the Path of Exile dev team talking about their upcoming features (which I can’t talk about, game developers / tea drinkers code and all that). Talked to Evan from PC Gamer about how the project is going, which we will tell you guys more about soon!
Nicholas:
David burned his hand at the Coffee Shop of the Burning Hand. “One of us! One of us! Burning Hand! etc.” I think the coffee shop staff were quite terrified of us by then.
We also showed Clockwork Empires to the first people outside of the office to have seen it – Matthew Steele, our composer; our new PR person, Stephanie Schopp; and Ash Matheson, a long-time friend of mine who is currently serving time at EA Bioware as a lead for a team of people doing some stuff. The reactions were exceedingly positive, and made us feel better.
Stephanie, in particular, went from “This game looks cuter than I imagined it looking when you described it” to “OH MY GOD THAT THING IS THE STUFF OF MY NIGHTMARES” in about 30 seconds. Well done, everybody.
Random encounters with Andrew Dice at Carpe Fulgar and Rob Zeboyd at Zeboyd (makers/porters of Recettear and the upcoming Penny Arcade game, respectively.) In the end, we staggered back to our hotel, and were too tired to do anything but get food at the restaurant that looked, in my words, “like somewhere my father would eat and where we should absolutely never go.” Terrifyingly efficient service ensued, in a fine and somewhat European tradition of being scowled at by a 70-year old woman while you eat.
Saturday.
Daniel: Went back home, cleaned entire apartment.
Nicholas: Played board games with editorial staff of PC Gamer, then stopped downtown to drop a stuffed Diggle off for a long-time Gaslamp supporter. In the process of doing this, I discovered that I was Very Late for my flight checkin at SFO and desperately hailed a cab. The cab driver, a calmly mustachioed man, told me that, quote, “on his honour, and on the honour of San Francisco, I would make it to my flight.” He then asked me if I like Zamfir. Why yes, yes I do.
Cue fifteen minutes of the cab driver yelling and navigating his way through traffic back at the hotel, listening to passive-aggressive pan flute music. At one point he pulled into my hotel’s taxi line up and yelled, “Bellboy! Get this man his baggage! The honour of San Francisco depends on it!” The Bellboy did so, and we pulled out into San Francisco traffic at approximately one hundred and fifty miles per hour.
I did, indeed, get to my flight. My one regret is that I did not burn my hand at the coffee shop. Now I will never know what it is to fear the night.
Blood & Steam: A Clockwork Empires FPS
We have finally returned from GDC! (Except David, who, lacking the smartphone that, apparently, every other 21st century human possesses, is wandering around the Bay Area stopping only to sleep & quietly feed in secret Vegan Safehouses.) We had a great time (except for that one thing), drank with a lot of people, and went to a number of fascinating talks about new opportunities in the Free-to-Play gaming market on mobile, Android devices.
We were also able to sign some deliciously long-simmering business deals at GDC, and have secured additional funding for our work from various interested parties, including a Major Console Developer. As a result, we are uniquely positioned to fully leverage our suite of intellectual properties in the next-generation console and mobile spaces. In order to uniquely leverge our leverage, we have “revamped” Clockwork Empires in order to make it more suitable for next-generation consoles. Market-driven research, made possible by our new funding, has revealed that gamers don’t actually enjoy complex simulations or sandbox-based gameplay. Instead, they want two things out of their videogame dollars:
- To be connected with, emotionally, at an intense, raw, and devastating level that can only be made possible by next-generation consoles.
- Gears, possibly attached to turrets.
As you guys know, we at Gaslamp pride ourselves in taking a genre and putting our unique, zany spin on it. To this end, uh… let’s just do a press release.
April 1st, 2013 – Gaslamp Games, makers of the popular cooking minigame Dungeons of Dredmor, is proud to announce:
Blood & Steam: A Clockwork Empires Game* * *
Join the ruggedly strong-jawed & generically handsome brown-haired twentysomething Corporal Lance Wingerstrong of Her Majesty’s 3rd Steam Knights Brigade on a quest for Queen and Country — and revenge. Lance must regain his family’s honour and in the process uncover the grand conspiracies of the villainous Stahlmarkian Baron known as Axel Helmut Kupferrad Von Schwarzezug as he attempts to find a shorter name for himself (the Baron, that is, Corporal Wingerstrong has a stout Clockworkian name that any upstanding lad of the Empire would be proud to bear) at any cost.
* * *
“Clockwork Empires is such a promising IP,” notes Gaslamp Games’ CEO Daniel Jacobsen, “that it would be a shame to just make one game out of it. It’s a natural step to expand the adrenaline-pumping, city-building action of Clockwork Empires into the realm of first person turret sequence shooters.”
“Maybe I’ve just been huffing oven cleaner this week,” he added slyly from atop his throne made of human skulls, “but I am really excited about corridors. Corridors full of steam! And maybe some pipes.”
Technical Director Nicholas Vining has employed his experience working with The Goddamned Lithtech Engine to design photo-realistic, paradigm-shattering next-generation graphics. Mr. Vining was unavailable for comment, having accidentally dropped himself into a parallel universe in a paradigm-shattering accident, but a note on his desk indicates that he was very excited about “inflamed follicle rendering technology” and “glistening cubes of meat.”
With exciting new weapons powered by steam, aether, clockwork, and derring-do players will experience deep and long-lasting Emotional Stories about Characters and Things or Whatever as they totally blow away wave after wave of Stahlmarkian Blitztroopers.
David Baumgart, art director of Gaslamp Games explains: “oh god hrrrrrp” and then vomited, weakly, into a bucket of wine coolers. This is because he is an Artist and therefore Volatile during Press Release Writing Sessions (and at all other times generally), but we are trying to understand his intent; Possibly something about a “gyrocopter boss fight”.
GROUNDBREAKING FEATURES LIST:
- Nearly 6 hours of next-gen cog-spinning, steam-simmering high-pressure gameplay!
- Turrets!
- Deploy ten exciting new FPS weapons, including the Gear Spinfusor, the Portable Tesla Coil, the SimCity Authentication Server, and the Big ****ing Gear!
- Put Gears on Everything! Put Gears on your Gear! (Additional gears available through our Gear Store for reasonably-priced Digglebucks.)
- Deploy Zeppelin Strikes to Punish Your Enemies… With Zeppelins! (Tiny ones, driven by Diggles.)
- Realistic Steampunk Guns (which players can purchase through our partnership with Perfectly Ethical arms manufacturers!)
- Dynamic exploding organ physics!
- Day-1 Expansion DLC allows you to join Her Majesty’s Anti-Paranormal Invigilators For Horrifying Missions against the Selenian Moon-Fungus!
- Tap “Q” repeatedly at any time to snub rivals in your squad!
- Tap “Q” once to do other things!
- Turrets!
- Redeem organs for additional emotional devastation!
- Deep moral simulations allow players to define the character of Corporal Wingerstrong in keys areas of Uprightness, Temperance, and Forthrightness.
- Choose one of three endings by pulling one of three levers at the end of the game! (The levers are attached to gears. Also, maybe, turrets.)
- Over 10,000 procedurally generated achievements to unlock!
- Always-on Internet connection required to interface with the live Clockwork Auction House!
- Gaslamp’s unique dual key authentication system: two Gaslamp employees stand behind the player as the game is booted and must simultaneously insert and turn a pair of unique activation keys.
- New unit duplication technology reports that you have shot more Stahlmarkian Blitztroopers than we can actually simulate you shooting at!
- And the enemies that you do shoot at probably just teleport from place to place!
- Historically Accurate Simulation of Steam Powered Armour Combat created with an approving nod by actual veterans of the Great Antipodean Obeliskian Campaign raised from the dead by our team of wild-eyed Novyrus Volticians just for this purpose!
- Emotional devastation can be converted to Digglebucks!
- Turrets!
- Special Guest Star: Beyonce!
- Turrets!
Coming soon, exclusively to a yet-unnamed next generation console: BLOOD & STEAM: A CLOCKWORK EMPIRES GAMES GAME OF GAMES
Edit:
- Tacked-on Multiplayer!
Guide To Aristocratic Tableswares & Etiquette
In the interest of your Betterment, Gaslamp Games presents:
Another Lesson In Etiquette
Mr. Hamilton (a relation, it has been discovered, of one Lady Hamilton to whom has been ascribed Much Scandal), Environmental Artist employed by the esteemed Company of Gaslamp Games, demonstrates the mindful consumption of health-giving beet juice at a local “cafe” suspected to be frequented by poets and their ilk.
(Please dim the lights for the Magic Lantern Show.)
1. The Gentleman drinks.
2. The Gentleman is shocked by the vulgar flavours of unboiled vegetable known to Polite Society to be fit only to peasants and certain radical Whigs.
3. The Gentleman calls upon his Upbringing, summoning the Stiff Upper Lip to embolden his Spirit.
4. The Gentleman presents a can-do cheery attitude as befits the keeping of Pleasant Company.
5. “Death is the only release I shall know.”
(We’re at GDC and unable to be of much use talking about Clockwork Empires. Please accept heartfelt apologies from the management.)
CPU and GPU Run-time Profiling in Simulation Land
[Warning: This is a very technical post.]
It’s not easy writing a complicated simulation. There are lots of complex, interconnected moving parts to worry about and when something goes wrong, it can be hard to figure out where that small, broken thing is in the midst of a larger picture. We recently discovered that the game was running… unreasonably slowly, shall we say? My desktop was getting 15 FPS, and it wasn’t clear what the problem was. On Chris Whitman’s machine, which uses a slightly different graphics card than my computer, our FPS was in single digits. I don’t like optimizing too early – as Donald Knuth pointed out famously, “premature optimization is the root of all evil” – but something was going on. Finally, sick and tired of the problems, I decided to get some answers.
There were three solutions for profiling that we looked at: Intel’s VTune, what we might call a ‘classical’ profiler which you can download a 30-day trial of from their website, and Telemetry, a different sort of profiler made by RAD Game Tools (specifically by Brian Hook, who you might know from such games as Quake 3.) RAD Game Tools also provided us with a 30-day trial of Telemetry, and this gave me an interesting opportunity to compare two profilers. Finally, we tried our luck with NVidia’s GPU Perfstudio to see if we could figure out what was happening on the graphics card.
Three profilers. One slow down. Who cracked the mystery? Find out below.
These actually have nothing to do with what Nicholas is doing but It Was Decided that the post needed some more visual accompaniment. Think of it as a tenuous thematic connection.
Intel’s VTune operates from Microsoft Visual C++ 2012. I have worked with previous versions of VTune, most notably back in 2001 when I was trying (and failing) to optimize The Lithtech Engine. VTune integrates nicely into Visual C++, and you run the profiler from within the application. For the most part, VTune failed to tell me anything interesting at all. It may have been doing useful things with the data, but there was no real way to narrow down what in the world was actually going on. Also, it crashed a lot.
Telemetry takes a different approach. Unlike VTune, which tries to run on a codebase without markup, Telemetry asks you to manually label your C++ codebase with little snippets of code to indicate what different parts of your codebase do in context: “drawing skeletal animation”, “shaving the yak”, “flushing the pnorb”, etc. Integrating the library into our codebase turned out to be pretty easy, taking about half an hour of work to get good profiler coverage. Running your program with Telemetry causes it to output data to a stand-alone server application, which whirs away in the background recording what your program is doing.
You then open your recorded session in a standalone application called the Telemetry Visualizer, which is basically the coolest thing ever. Each frame is cleverly marked up with all the information you specified in your C++ code, and you can keep diving through a problem area until you hit the bottom level.
Because individual frames are annotated with what Telemetry calls “zones”, you can hierarchically profile your code. You can look at a frame and see that a certain function (say, “rendering all the widgets”) takes a certain amount of milliseconds in a given frame; you can then refine that by adding more C++ markup to narrow in on what, exactly, was causing the problem. In this way, we made the following exciting discoveries:
- Certain parts of the rendering pipeline really, really sucked. In particular, we were calling malloc() at one key point, when we really, really shouldn’t be. This was removed.
- All the things that we thought were slow, really weren’t. We had been operating on a sort of … well, implicit assumption… from day one that the skeletal animation skinning was being a huge bottleneck. (This is because it’s been a bottleneck on every other game I’ve worked on.) We still have to move it to the GPU at a certain point, because when you put 100 characters on screen at once it’s still a bottleneck, but it wasn’t causing our problems.
- Rendering our post-processing effects was taking 50% of our frame rate. This got cleaned up, and everything ran faster.
The most interesting finding, however, was that our frame rate was highly intermittent. Two consecutive frames were having radically different frame rates, but the content being drawn was identical. Slowdowns were appearing in different functions, for different reasons, and seemingly at random. What the heck was going on?
Shamelessly taken from the RAD Game Tools Website because, well, it shows all the cool markup including the bits we don’t use.
After some thought, I decided whatever was going on wasn’t going on in our code, but somewhere in the graphics card driver. Clockwork Empires uses a renderer that is heavily designed towards processing batches, but it was looking increasingly like something we were doing was occasionally causing the GPU to stall in random areas to catch up. We use OpenGL, and at the time Telemetry didn’t support OpenGL profiling (although I understand this is in the works.) To get answers, I turned to NVidia’s GPU PerfStudio.
Rather annoyingly, GPU PerfStudio is an integrated plugin for Microsoft Visual C++ – but for Microsoft Visual C++ 2010. It does NOT support MSVC 2012, which is what we use (due to support for C++11), and so running our code through GPU Perfstudio required me to launch MSVC 2012, compile Clockwork Empires, and then run it from MSVC 2010. Cumbersome. People, make your tools stand-alone!
What GPU PerfStudio mainly does is tells you where the graphics card and graphics drivers are spending all their time. (I believe Telemetry can do this for Direct3D, and now supports GPU timings in OpenGL as of last October.) This struck paydirt fairly quickly: in order to debug rendering issues efficiently, I had stuck little functions throughout the renderer to call glGetError() and report if, in fact, I had screwed up. Being an idiot, however, these a) ran every frame, and b) were always enabled. Turn them off, and the GPU stops stalling all over the place trying to check if anything has gone wrong. Success.
GPU PerfStudio also revealed that certain functions were spending too much time doing render state switches – turning blending on and off, changing textures, that sort of thing. Via some clever rearrangement of code and a handful of macro functions, we were able to clean this up quickly. It also turns out that our UI rendering code can be quite slow, especially for complicated scenes; fixing this is a TODO to be taken care of later in the development process.
It is worth noting that sorting out the cause of our lag required multiple strategies. GPU PerfStudio told us how much time we were spending in error-testing functions, but Telemetry’s Visualizer told us that we needed to be looking at the GPU in the first place, and also let us confirm easily that certain things were, and were not, bottlenecks without us wasting our time optimizing something that we only thought was slow.
It is really nice when you find a new piece of software that you can add to your toolkit. We’ve had similar experiences with a few other products – 3D-Coat has massively improved productivity on the artist side, and Visual Assist X has been a favourite of mine for years. After begging and pleading with Daniel, I am pleased to say that Telemetry gets added to this list. I haven’t even figured out all the things it can do yet, and I haven’t started profiling our game thread with it yet, but I’m pretty confident that it will be able to take care of our few remaining mysterious frame rate drops. Since we can also mark up memory allocations, we can also use it to deal with the Horrible Memory Leak that is plaguing us this week. End result? Less time spent tracking mystery bugs, and more time spent coming up with hidden fun stuff and entertaining new features for everybody.
Disclaimer: Brian Hook gave me some bourbon once. It is 62.35% alcohol by volume. I’m still working on it.
A Little Something For The Pipe Fanciers Out There
From just about the beginning we’ve been into the idea that Clockwork Empires should involve running giant assemblies of pipes and cog-laden axles across settlements to transmit energy and water and completely harmless high-pressure superheated steam between various machines and factories. The basis for this came early: if we’re to embrace the aesthetic we desire we need to fully embrace the visuals of mechanization, of machines and factories and the wonders of technology of this Age of Progress & so forth. If we hide the machines inside the factories then you won’t be able to see any of the Fun gears and pipes. So, the breakthrough: put the machines, the pipes, the gears on the outside of the factory.
For the sake of simplicity we’ve rolled pipes, axles, and anything else that falls into this category of things-that-connect-to-machines into a category we call “dynamics lines” (whereas “dynamics” are water, mechanical force, steam, voltaic energies, nourishing goo, etc).
Very, very old concept art playing around with the idea of exposed pipes & axles.
This has not been without controversy in the Gaslamp Games Design Discussion And Knife Fighting Arena because this is both intrinsically insane and poses some really difficult problems with being able to clearly express what is actually going on in the game.
Yes, other games do this sort of thing, but look:
On the left, a computer build in Dwarf Fortress. On the right, some confusing factory or something built in Minecraft with the Tekkit mod pack, which is horribly enthralling. Please send help.
You can see, perhaps, how digging greedily and deeply into such systems is somewhat inaccessible to most players; It’s more the sort of thing you’d read about in a Let’s Play than do yourself. So yes, neat, but from a perspective of making a game for lots & lots of people to play, problematic. We’re an isometric game with a fixed camera perspective. If there are pipes all over the place, they’re going to get in the way of seeing what the heck is going on. For example, a long while ago I sat down with how the then-current pipe system was supposed to work and drew a sample settlement:
What the heck is going on! Who am I but a cog in this horrible machine?
It’s a bit rough, but surely you see how this could end up being a bit of a mess. We had some more knife-fights then cooled off by working on trees for like a month, or something.
(The one bit I like that I’ll mention is the use of material cues for pipe type: iron pipes are water, copper pipes are steam, and axles use brass cogs to transfer force.)
Stare into the cog. Become the cog. What do you feel? What do you desire? What is your ultimate Being? This is despair.
We’ve had a lot of discussions about how exactly to run this. Obviously, for pipes, we don’t want to do any kind of pressure simulation, nor force for axles, though some limitation should be necessary. If all a player must do is hook up each structure to set X of dynamics lines, we might as well be making something like the Sim City 4 water pipe system (which was effectively a rather boring side-game that you’d have to play from time to time and otherwise ignore).
So we want the dynamics lines to be simple, but also to matter. For the dynamics lines system to matter, they need to involve the player being required to make choices, to make some trade-off of, say, material resources for convenience. Or material resources now invested into a greater productive capacity in the future, or … hmm.
Well, here’s another way not to do it:
Look at ‘em go! Unfortunately for Sean, we completely changed our plan for how axles work.
The original conception here was to have multiple optional input and output points from machines. Over-complicated; Kill it. The cry of pain you hear is from Sean, our extremely patient environmental artist, mourning another casualty.
And there are plenty. Check out this stuff we cut:
Piece of cake, right? (The full image – in our internal wiki – comes with an associated guide to identify all the parts.)
Ouch. Didn’t look bad in-engine, either:
The Mists of Ravenloft were particularly thick that day.
Art is pain.
The latest iteration, pictured below, is promising but I’m sure it’ll be changed further and thoroughly through the process of further iteration and refinement, to say nothing of the entire process of creating a UI system for placing and assessing the damn things.
This is how Invisible Geometers see the world.
In short, it’s game development: getting things horribly wrong over and over until they’re not.
… And making Sean redo all his hard work.
(Sorry Sean.)
(He’s also sick today. Let’s all let him know that we’d like him to feel better in the comments.)
Of Beginnings & Landing Craft
There’s a very particular feeling that you get at the beginning of a good game. It’s taking the first step into a unexplored world, secrets hidden by fog-of-war, operating on rules you have not yet learned, filled with dangers you’ll only know how to overcome after they’ve beaten you the first time around.
“Strike the Earth!”
It’s very important to get the beginning of a good story right, and with our goal in Clockwork Empires being to have the player create stories through the gameplay, well. It’s an obvious point of importance (to say nothing of game design in general requiring a strong ‘hook’ – it’s just good design). Getting this right is going to be iterative by necessity so I’m not going to indulge in discussing our pile of speculation on approaching the problem just yet. It’s wrapped in some dreadfully unfinished UI anyway. So, rather, I want to talk about a personal approach to a very particular detail that I’m trying to slip into the game.
(Shh; Don’t let the other guys know about this. Daniel might insist on putting lutefisk into the bloody game again, and don’t get me started on Nicholas’ creepy poet obsession.)
“Moving out!”
To me, personally, getting the beginning right is a bit about capturing what I felt back when I was playing games as a kid with no knowledge of how they were made. Certainly my memory is flavored by a heavy helping of nostalgia but the experience was, I think, something very much more than the sum of its parts because the processes behind the game were completely magical to me. Before I knew how scripting worked, how computer graphics were made, how to program a UI, I could reasonably expect anything to happen after that first step into the game-world.
Though we may not manage quite that, the simulation-centered gameplay of Clockwork Empires is going to be a damn good attempt at enabling players to feel something like that when they make landfall at behest of the Queen onto an unknown and Perfectly Safe shore.
(Especially with the Fun we’ve been cooking up in the art room during the last couple weeks. Examples of key phrases: “stretchy tentacle rigs”, “like a malevolent blob of phlegm”, “head should come off about half the time”, “the glow needs to be more unnatural”, “figured out how to make it fold into itself”, and so on. )
As for my own little indulgence, it’s this:
(From a standpoint of technique I’ll only say that it bugs the hell out of me that I did the correct perspective on the paddlewheel while somehow botching the giant drive-cog by doing the exact wrong thing. So, it’s wonky; let’s all agree that the matter is settled and that there was a gross error in Mr. Ambrose Dorian Chainsly’s — not to be confused with the Lower Bilgestreams Chainsleys with their indecorous ‘e’ — patented process as detailed in “A New And Curious Method Of Arrangement Pertaining To Gearspring’s Cog Manufacturing Autodynamo”. We shall send a strongly worded to Mr. Chainsly immediately, but for now you’ll have to make due with these landing craft, self-annihilating drive-wheel vibrations be damned!)
It’s surprising what you can find stewing in your head for eighteen years.
(Also: not a half-bad punchline to the old “An Overseer, a Selenian Polyp, and The Cog Pope walk into a pub … “)
Yet Another Technology Status Update
Last time I wrote a programming team update about Clockwork Empires, I made a comment that was somewhere along the lines of “the game is starting to hit that point where it transitions from a bunch of technology bits to something that looks like a game.” Well, we’re a lot closer to that goal than we were last update. Some of the edited highlights:
The Lua code, which has been a major time investment, is now starting to pay dividends. Pretty much all the old code has been moved over, and every job is now represented by a mix of XML markup and Lua scripting. Some of the XML may not be flexible enough, and may suffer from the same problems as Dredmor’s old spelldb.xml, so we’ll see what format this ultimately ends up in. Nonetheless, progress is being made: people can now harvest berries, clearcut forests, and construct their own buildings. This represents a lot of infrastructure that hasn’t directly translated to gameplay; at some point, though, somebody will start banging in gameplay using this existing infrastructure and all the assets that David and his crew have been working on, and it’ll start to feel more like an Entertainment Product.
Hunger is now in the game. Since we don’t have starting colony loadouts yet, if you don’t start harvesting food in the colony something like this happens to everybody…
… with the exception of one poet, who managed to get to a berry bush. Rather than harvesting berries, however, he was inspired by its beauty and attempted to create a magnificent work of poetry. He failed, however – and then died of starvation:
Shortly after that, we got people actually eating food. This created the usual cavalcade of bugs: people eating the same food, people eating invisible food, people eating food in somebody else’s hands and in one case inside somebody else’s body.
Biomes are in a “done-ish” state for now. You can now define distributions of in-game objects across the world, using various sorts of noise kernels and types to determine their clumping and sparsity. Here, for instance, we see somebody hanging his head in abject disgrace in a marsh terrain full of bamboo – probably due to an inability to create poetry:
Incidentally, we have poetry in the game and it is wonderful.
Here is a forest scene, again all specified procedurally by the biome generator.
Mr. Whitman, having completed the task of biome generation, is now working on Animals. We expect to have capybaras savaging the population shortly. Naturally, now that we have trees, we have the ability to cut them all down:
When a job is created, it has the option to create an “assignment.” This is hidden from the user, but the engine uses it for book-keeping. When a tree falls in the forest, if another tree is nearby, it will post itself to the first tree’s assignment; the work party responsible for tree cutting (or individual, or whatever) will then move on to the next assigned job in the assignment preferentially, which is assumed to be as useful as the original job. In this manner, we can have useful behaviours like workers repeatedly harvesting berries, clearing mines, or cutting down an entire forest. These all represent cases where you want to think of something as an individual job, but in our system it is really a system of individual jobs glued together.
People can also haul things back to stockpiles if a stockpile exists, and if the object in question requests it. Right now we are definitely using Dwarf Fortress’s model of “leave the log where it is, we have more trees to kill.”
Finally, this happened.
I swear, I was nowhere near the poet at the time.
Micah and Ryan are busy working on networking stuff, which is fairly boring and which we don’t want to talk about. I also spent a certain amount of time last week optimizing things and fixing bugs in the rendering engine, which we did using a really neat software package called Telemetry that deserves its own blog post in a couple of weeks.
Tales from the UI Skunkworks: Military Management, Episode One of A Gazillion
User interface design is, honestly, one of the most difficult parts of creating a game. Every button has a profound impact on how people will be motivated to play (or not play) a game. I suspect this is why so many games seem to almost consciously decide not to experiment too radically with UI. It’s so much easier to just build it the way people are used to rather than building it the way that perhaps it should be. We’re no different; Dredmor’s UI has a lot of flaws that we didn’t see at the time of development. For instance, it turns out that Inventory Management isn’t actually a super fun mini-game. Even then, we completely overhauled the Dredmor gameplay UI some 4 or 5 times before we settled on a system which is still flawed, and to this day leads people to play the game in a way that detracts from the experience. Such is game development.
Not like this. Never like this.
We are doing our best to apply the lessons learned from Dredmor to Clockwork Empires. Not all of these lessons are applicable, of course, as CE isn’t a Roguelike — and there are a lot more moving parts to control. Granted, there are also a lot more strategy/management style games with real-time mouse-based UIs to draw from, and we have played a ton of them; however, by virtue of making a game that crosses the genre-streams a bit, none of these systems perfectly fit the needs of CE. For instance, dropping a Starcraft control scheme on the game would be inappropriate because Starcraft is (arguably) about competitive micro-managing, optimized build orders, and a bit of gambling on the current “meta”. In contrast, CE is ideally about creating stories within its simulation.
The messy beginnings of a UI design for placing buildings & associated machine modules. (Then someone said, “Why not just rip off The Sims?”)
To do that, we try to draw almost all of the systems somehow into the personalities of the people. You don’t order a person to go make a house as in Starcraft; Rather, you let them know that you’d like one and if they’re not drunk, or busy fighting capybaras in the swamp, maybe they’ll do it. We decided early on that we were going to try to make all interaction with the characters a step removed from the characters themselves to allow their personalities to be demonstrated through their actions. So rather than directly controlling units, CE will have players create orders as distinct objects which will be carried out to the best of the simulated population’s ability. These orders are generally tied to the world itself in the form of buildings and points on the landscape (“Chop down that forest”, “Build a Brick Factory with three chimneys here”).
Tying orders to geography has its limits though. If you need to select a barracks to tell a military unit where they need to be, but the barracks is on one end of the map and the soldiers tied to that barracks are on the other end, you’re going to have a bad time. So there are situations when it is necessary to break the purely map-based scheme by introducing abstract UI constructs – in this case, a globally accessible control frame that allows you to select different squads, load them out with available gear (more on that later), and give them orders regardless of where they are on the map.
A totally fake mockup for an order-creation dialog.
The decision to split UI metaphors can be a dangerous one and requires careful consideration. If we’ve got a building-tied interface and a global floating interface, people now have to guess which of the two places they are likely to find the controls to do what they need to do unless we find a very clear line to differentiate what kinds of orders go where. Power users can learn to use any system we design, but I want my mom to be able to play Clockwork Empires.
So let’s talk a bit about this global control frame: think of it as your settlement’s RPG character sheet, but instead of skills, stats, and equipment you’ve got different people with their individual qualities who, when organized differently, affect how your settlement works in different ways.
Within the scope of the military side of the system, people who enlist or are enlisted in the military will form themselves into groups. Lower class military will just form squads of soldiers, middle-class characters will act as NCOs who supervise a squad, and if you eventually assign an upper-class individual to a military position, they will become an officer in charge of organizing platoon-sized groups. What’s more, the personality traits of the officers in the chain of command will impact how your squads undertake various tasks (and if you have really poorly trained units, their own whims will have a stronger priority).
We also need to consider things like vehicles and special equipment. Specifically steam-armor, artillery pieces, perhaps some sort of mechanized steam transport, et cetera. Having to equip these to individual soldiers would muddy the interface like crazy. Every character will have equipment, but if you could actually optimize loadout for a military of 25 or so guys – that might just throw their musket in a ravine anyway because they’re mostly autonomous and/or mad – would be an infuriating optimization problem.
So, you ask, how do we give out that lovely steam-armor?
Our current solution is to give every squad it’s own “inventory”, of sorts, which consists of just one slot. You can choose one special piece of equipment they can use, be it a Gatling gun or a steam-armor suit, and they figure out how the squad is going to use it best. This collapses a problem of potentially hundreds of inventory slots to maybe 10 at most, while giving your military the ability to specialize squad roles.
More poorly-crafted UI scheme sketching: Unassigned unit pool on the left, Civilian crews on the right, and the poor, poor military units in the middle.
Civilians use the same system, but instead of combat squads, they form work crews for the various job assignments (making beer, building walls, chopping wood). Their equipment slot items will be a bit different: things like an auroch-drawn cart or a steam powerloader.
So now we have one UI scheme to in-the-darkness-bind-them and allow players some control over which units are assigned which tasks that’s mostly opt-in, has a few choices for customization, and can be accessed from anywhere. Buildings are now the place where you go to designate which commodities you wish to turn into which other commodities (and other behaviors for things like fixed artillery turrets), and jobs that have no specific building for their functions, such as an order to collect lumber from a forest, will be tied to “flags” on the map which will have all of their direct functions attached to a menu specific to each flag. The buildings menu and the flag menu will both have some version of a hyperlink to the global unit control frame that shows the characters actively working on that task.
We’re running with this until we hate it, as always, this is very subject to testing and ruthless iteration. If it’s something we’re happy with it, we’ll make some prettier pictures for you guys.
The Sad, Strange Tale of Josiah Nutpin
Bachelors and bachelorettes! Are you alone this Valentine’s Day? Do you crave romance, and find yourself unable to obtain it at your local convenience store, bar, or motorcycle repair shop? Fear not, we’ve got you covered, for Gaslamp Games knows what you like. We present, for your Romantic Indulgence:
THE SAD, STRANGE TALE OF JOSIAH NUTPIN
THE SCANDALOUS TRAGEDY THAT IS UPSETTING THE NATION
a work of Salacious Bawdy-Fiction Composed on the Type-Writing Device
with Erotic Daguerrotypes by Mr. David Baumgart
Ah, yes. New Smugbuffer, the latest frontier in the ever-increasing expansion of the Empire. Out on the edges of the world, the air was thinner and the gentle coruscations of mysterious dust from space burning up in the atmosphere could be observed by the aid of the Number Three Telescope; underneath this aethereal glow, and watched only by forces not meant to be studied by man, New Smugbuffer was the epitome of peace and tranquility.
Well, perhaps this is a bit of a lie. New Smugbuffer was, at least, as peaceful as any town on the rim of the world can be; that far away from Civilization, the wilds run untamed and the influx of moon-fungus can prove to be a baleful one. Not many people came to New Smugbuffer, save for desperate citizens eager to make a new life for themselves far away from their criminal records, and the odd Noyvrus trader seeking a new market for their goods. As Noyvrus trade these days mainly consists of a) tattered fur hats, and b) wax cylinder recordings of depressing Noyvrus Male Choral Music, the constant badgering of New Smugbuffer by seas of trade boats and the constant sound of extremely depressing chanting playing from enormous gramaphone horns was seen by many in the Empire as a clear sign of weakness in the Noyvrus economy.
When Josiah Nutpin stepped off of Her Majesty’s Official Colonization Zeppelin, he knew that New Smugbuffer was exactly what he was looking for in a colony. Here, at long last, he could find the inspiration he so desperately needed – for Josiah was afflicted by poetry, and had come seeking fertile ground for his fevered brain to plant the seeds of creativity in. Poetry was his life. Poetry was his cause celebre. Poetry was what caused his father to kick him out of the family house, with nothing more than a speech questioning his very existence (also touching on a) why a man would idle his life away, and b) that there was always good money running the family Tesla Coil, an honourable trade, and c) not something that his wretched poet son would know anything about.)
Josiah had abandoned it all in pursuit of his life’s dream. Soon, he would produce his masterwork, like a butterfly shedding its cocoon. Then, he would meet a grisly death, and instantly become famous throughout the land. Josiah knew full well that a poet’s life was one of inspiration, dependencies on various chemical substances, and a somewhat ghastly demise – but it was all in the service of art, and so it was worth it. One day, he would die, and on that day his poetry would be famous. There was nothing more beloved in the Clockwork Empires than a dead poet, and nothing less wanted than a live one. In the mean time, he needed inspiration for his works, and inspiration was what he would find in New Smugbuffer.
Why, simply look at the place, he said to himself. The bracing snow! The giant, towering fungoids with their enormous balloons full of Fun! The sea – so cold, bracing, and strangely inviting and comforting. The strange, quaint locals with their disquieting headgear. The ramshackle buildings and disquieting tenement housing! Here were things to write about.
Three weeks later, having secured the cheapest housing he could find (a bed at the Zebulon Cogspring Memorial Boarding House), Josiah was starting to wonder if he was cut out for this poetry thing after all. There were no decent couches for him to faint on, he was running desperately low on gin, there wasn’t a drop of laudanum to be found anywhere, and top scientists in the colony were still trying to unlock the secrets of Modern Brutalism. Sighing, he got up from his chair and went outside to try, yet again, to find sufficient inspiration. Then, his eyes fell on Elsie Moonwidget and all was lost.
Slender and pale, Elsie Moonwidget was a mysterious entity in New Smugbuffer. She flitted from place to place, concerning herself with tasks whose purpose was known only to herself. It was impossible not to be struck by her pale skin, delicate features, and menacingly fashionable hat. She had other admirers, and Josiah scowled at them on his daily walks.
That disreputable scientist Runcible Ironscrew, recently arrived from Old Mushroomhood in disgrace and unusual headgear, had inscribed a number of papers to the Royal Society in her honour; furthermore, he was planning on naming his new experimental cure for Glowing Bones in aurochs to her as a sign of his love. There was August Brasstack, a former Overseer from the town of Greater Ponysparkle, who refused to comment on the latest article in the Empire Times to claim that the town of Greater Ponysparkle was not, in fact, on fire, and that any reports saying otherwise were likely caused by indigestion. Lambert von Cogsworth, a recently arrived member of the aristocracy whose two interests in life were the acquisition of dangerous curios and frittering away all of his reputation at the pigeon races, had been seen calling on her and occasionally taking a walk with her under the light of the inhuman, ghastly moon-dust. Even Jonathan Whelkbuffer, humble fisherman as he was, always saved her the best catch of the day. Still, Josiah knew, as a poet his case was the most romantic. Provided that she was of sufficient Romantic Inclination, Elsie might be more amenable to his suit. It was, in fact, his only hope.
Fervently, he dashed off a poem about Elsie. It was not one of his best works, but perhaps when he died it would bring some fame to the colony of New Smugbuffer.
Josiah’s first opportunity to present his suit came at a party thrown by Lambert von Cogsworth, to celebrate his discovery of a new piece of bric-a-brac from the ruins near the colony. The party was by the perfectly safe and exceedingly normal statue that Lambert had found at the ruins some time earlier, and had made an enormous fuss about until it was installed by the colony’s bureaucrat in the center of the colony. In general, people had two opinions about the statue. Most people in New Smugbuffer believed that the statue, in the form of an enormous obelisk with one eye carved into the rock, was perfectly safe and exceedingly normal; therefore, it was totally unnecessary to spend any more time in its rather upsetting presence than absolutely necessary. A certain other kind of person felt that the area around the statue was a natural place for meetings of a clandestine nature, especially when seeking to trade certain goods or discuss certain topics that might, otherwise, be considered unsuitable for public forums.
Somebody had named the statue Quaggaroth, and nobody was entirely sure why.
It was in the shadow of Quaggaroth that Josiah found Elsie Moonwidget, sitting by its base and clutching a parasol. It was under the unblinking eye of Quaggaroth that he pressed his suit and made his intentions known. Elsie, upon hearing the poet’s pleas, smiled. “Well,” she said, “As you know I have many suitors, and clearly the one who bestows upon me the best gift should win my favour.”
“What sort of a gift?” asked Josiah, his heart sinking. “Poetry, perhaps?”
Unfortunately for Josiah, Elsie Moonwidget only had one thing that she liked: mysterious artifacts. Her father had been an avid collector, and Elsie continued the family trait of having a Strange Interest in unusual things. Surely, she explained, she would be more likely (although not totally likely, for there is never a totality in matters of love) to pledge her troth to a man who could… indulge her little hobby. Sighing, Josiah said that he would do his best. In the distance, he could see Lambert von Cogsworth mincing about the town with glee upon his moustached features and a pigeon in his hand.
The next few days, for Josiah Nutpin, were spent sitting by the ocean, looking at the sea with a hitherto-unknown longing. Perhaps it was being smitten by love, or perhaps it was simply the comforting nature of the waves. Perhaps it was his imagination, but the ocean seemed to whisper to him, making him long to cast off all his clothing on the shore and descend into its watery depths, preferably when nobody was looking. Still, he said to himself, he would resist the urges to end it all, or something else.
Perhaps, he said to himself, the sea would be his deliverance. Yes, whispered the sea, it would help him.
It was not, in fact, the sea that presented him with his first opportunity to find a gift for Elsie Moonwidget. It was another new colonist, who descended from the Colonization Zeppelin carrying a mysterious little packet with a furtive look. Josiah, always searching for new sources of inspiration and being Naturally Friendly, went up to the stranger and inquired what he was in the little packet.
“Oh rather,” said the stranger, one Graham Woodlathe by name. “Cigars wrapped in human skin, what? Been in my family for generations. Had to take them with me to the colony, wot? Never smoke the damn things, myself. Never smoke the cigars. Ever.”
Upon seeing the little package of cigars, Josiah knew that he must have them, at any cost. It was simple enough to plot an ambush; he simply waited until nightfall, when Graham Woodlathe was walking to the local middle-class pub and the colony bureaucrat wasn’t looking, to bash his head in with an Improvised Weapon (in this case, a handy croquet mallet.) The cigars were his.
Eight hours later, at daybreak, Josiah could be found staring at the sea again. He’d just killed a man. It must be something in the air, or the water supply, or perhaps simply the unblinking eye of Quaggaroth, but it didn’t seem like such a bad idea. And he had a present for Elsie! A wonderful present! Just the thing.
Perhaps they were too good for her? Perhaps he should just keep them himself? Yes, he thought, that might be better. Besides which, the sea had promised to provide something, and he trusted the sea. It loved him. It was full of delicious things, his friends calling out to him, and kelp. And so, he sat by the sea and gazed at it, and clutched his little package of Human Skin Cigars.
He could never smoke the cigars. Ever.
It was then that something floated to the shore, as the water released its precious bounty. Josiah stepped to the shoreline, being careful not to go into the water just yet, and gently collected a small, bronze egg. He wasn’t sure what it was, being a poet and not a scientist, but he immediately felt inspired by his discovery and cranked out another poem, “Ode to a Small, Unknown Bronze Egg Found At The Ocean Front by Josiah Nutpin.” He thought it was rather good.
The Colony Bureaucrat indicated that the egg must be identified, and Josiah Nutpin reluctantly handed it over to Runcible Ironscrew for analysis (while making it very clear that it was still his egg, and he wanted it back.) Runcible Ironscrew, a man with some interest in the collection of strange artifacts, considered the egg thoughtfully.
“It is,” he proclaimed after some thought, “the Columbic Egg, previously thought to have been lost. It is, at present, inert, and it would probably make a nice paperweight. Its properties are unknown. It is, perhaps, mildly maddening.” He added that he, personally, thought it was a very nice egg, and that Josiah was invited to the next little meeting of some like-minded people who might be interested in such things.
The Colony Bureaucrat read the report and noted that it was, in fact, completely useless. He resolved to complain to somebody, perhaps in the form of a scathing letter, about unclear descriptions of items and how he was supposed to run a colony when nobody would tell him how to do anything and without clear documentation and tutorials.
News of the discovery soon reached the Empire Times, and elevated both Josiah’s reputation and the prestige of the colony of New Smugbuffer. Perhaps, he thought to himself, fame would be his without dying. He felt happy, and excited, and his skin itched and flaked with anticipation of the day when he would finally cast off his worldly cares and step into the sea, with Elsie as his blushing bride. How beautiful her eyes were, and how radiant her gills would be under the water. Josiah decided not to pursue this line of thought at this time, and instead sought out his paramour.
He found Elsie Moonwidget beneath the Statue of Quaggaroth. It was a beautiful day; the air was crisp, the investigators hadn’t figured out who had killed Graham Woodlathe, and a small orphan was selling matches beneath its Baleful Eye. “For you,” Josiah Nutpin said, and offered up a wedding dowry consisting of one (1) Columbic Egg and one (1) carton of Human Skin Cigars, obtained through murder. “Elsie Moonwidget, will you marry me?”
“Yes!” she exclaimed. “Yes, yes, a thousand times yes! In the name of the Holy Cog, Josiah Nutpin, you have made me the happiest woman in the Empire.”
Well, thought Josiah Nutpin, this is the life. The love of a good woman, a menacing and mysterious egg, and a carton of the world’s finest and most terrifying cigars. Poetry spewed forth from his soul, and his heart sang. For a moment, he even forgot about the ocean.
Perhaps it was the presence of the Human Skin Cigars. Perhaps it was the somewhat unsettled mental state of Josiah Nutpin, which could have been managed better had the Colony Bureaucrat devoted sufficient trading resources to the acquisition of alcohol or laudanum. Perhaps it was the Columbic Egg, menacing in its ovoidness, that was not as inert as certain disreputable scientists may have previously thought. Perhaps it was a combination of all of these things, but it was at this moment that tragedy struck.
A low rumbling came from the Statue of Quaggaroth, and its eye slowly opened. “AREA 35-712 DESIGNATED FOR CONSTRUCTION PROJECT 9-71X,” it intoned. “NOW PROCEEDING WITH CONSTRUCTION SITE MANAGEMENT.” Josiah Nutpin turned to look at the Eye of Quaggaroth, and the Eye of Quaggaroth turned to look at him.
“BUILDING MATERIAL ACQUIRED,” intoned the statue. With a flash of light, Josiah Nutpin suddenly found himself converted into one (1) Pallet of Human Flesh Bricks (not to be used for the manufacturing of cigars.)
Elsie Moonwidget felt her heart sink. Her joy turned to despair. She ignored the Statue of Quaggaroth rising from its plinth, ignored the frantic panicking of the Colony Bureaucrat, and ignored everything other than her own desire to get into the sea as soon as inhumanly possible. There was nothing here for her any more. Blowing a kiss at the pile of bricks that was her former love, she fled for the ocean, abandoning the Columbic Egg and the Package of Human Skin Cigars. Pausing only to discard her parasol, she surrendered to the call of the sea and flung herself into the water, never to return – or, at least, not in her current state.
A somewhat frazzled Colony Bureaucrat noted in passing that Elsie Moonwidget had walked into the sea, never to return. Runcible Ironscrew was apparently distraught, and threatening to build some kind of machine. Furthermore, Josiah Nutpin had disappeared under mysterious circumstances; last but not least, the colony’s stock of building materials had increased by a small, disturbing quantity. Josiah Nutpin’s ten poetic works were suddenly famous, and had brought sufficient enough prestige to the colony to arrange for the rapid deployment of a Steam-Powered Heavy Weapons Unit and a number of Voltaic Defense Coils. Perhaps, he thought, it might yet be possible to avoid bringing this unfortunate matter to the attention of Her Majesty’s Anti-Paranormal Investigators after all.
(It wasn’t, as it turned out. But that is another story.)
Shrub Week
Shrub Week. The words echo through the blasted hearts of the Gaslamp Games art team. After the last week, they know no love, no joy; only hand-crafted foliage assembled in the no-man’s land enduring a tense ceasefire between Haste and Artfulness.
We need shrubs. Lots of shrubs.
It all began several weeks ago on a rainy day in Vancouver (which, admittedly, could be any day in Vancouver). My proclivity for punctuality and organization was goaded by the Stick of Management through the bars (of Necessity) which walled the Cage of Fixed Deadlines. The wielder of this device of torment? Everyman-by-night and notorious beer-sampler Gaslamp CEO Daniel Jacobsen fixing me with an executive gaze through that smug little webcam perched on my leftmost monitor (the one with the strange hydraulic arm which may someday unleash its blind, hateful power). The challenge? Complete the entire “non-tree plants” section of the Project Odin Minimum Viable Product Art Asset List.
Challenge Accepted.
Who doesn’t love wheat? Micah J Best, that’s who.
Break down the requirements, derive the assets from the general design. We talked about this before. Every biome needs ground-cover and some happy little bushes; each zone on the vaguely defined temperature/humidity matrix needs some agricultural product(s). And we damn well are getting coffee plants. You, dear player, may well end up scratching Dire Cabbage from the permafrost on the Cliffs Of Frozen Terror (a mountainous sub-glacial high-horror biome of but middling humidity rating), but at least I’ve given you a chance. Remember me for that much, at the end of it all!
Now, each shrubbery has its own technical requirements. A barrel cactus? Little more than a malevolent cylinder bristling with standoffish loathing. Disc fungus? No problem; Sean practically lives on disc-shaped fungi (a lie). Grassy Things, though technically not shrubs, fall into the “non-tree plants” category and therefore being within the purview of Shrub Week are particularly troublesome due to the thinness of their bedeviling leaves/stalks which are visually lost when viewed from afar, at an angle, with our orthographic game camera. Further, said camera can be rotated, potentially revealing the invisible geometries which only Invisible Geometers ought be privy to. (And if you look, it seems that they’ll confiscate your brain and put it in a jar for safekeeping. It’s all for the best of an unfortunate situation, really. Stiff upper lip now and all that. Yes, jars sometimes get mixed up, but it’s not their advanced filing protocols for which they are best known and there’s a reason for that.)
This is a very small, occasionally very colourful tree that looks like a shrub and lives in the tundras of deepest Hyperborea. It also consisters of between 3 and 5 texture cards, therefore excessively and unreasonably low-poly.
Sean and Joseph have been coming up with some tricks to address this issue (yes, my tangent perhaps threw my dear reader off: the issue at hand being that of portraying grass and small bits of foliage)– altering card normals, using card facing and playing to the known camera angle directions to construct a facade of reality from Wrong Geometries. It’s no grass, it’s actually four cleverly arranged one-sided 2D planes! Speaking of which, Nicholas has been implementing some Perfectly Safe rendering options on our asset importer to make life easier for the artists (not often done): some texture cards won’t cast shadows, others shall, and we may get billboards if we decide that DOOM really was on to something special back in 1993.
There may also have been experimentation with stacks of card textures to create small plants and flowers relatively cheaply; these have also run into issues with shadow rendering, but I’m sure Nicholas will get it all sorted out before the Geometers come for his brain. I, for one, am counting on them being distracted with turning the coffee maker inside-out.
Left: Shrubs. Center: Pillar of rock; not a shrub. Right: Other shrubs.
In all, Shrub Week was pretty good. We got lots done, suffered together, beatings were had, lessons learned, friendships made and broken. But I think we’re glad to be moving on from shrubs and I’m about through with writing anything at all on the subject for at least three days. Next up: a couple weeks of miscellaneous trees and animals with a machine module or two thrown in with that set of pipes before we do Creepy Week. I probably shouldn’t tell you much about Creepy Week because that’d make it less Creepy. Perhaps you can tell that we’re getting excited about it already. It’ll be Fun.
(Best of all, I’m still allowed to have the artists create land-coral, urchins, and giant anemones because they are all technically animals, not shrubs. Another victory for Science!)
Dungeons of Dredmor: The Game: The New Website
The new DungeonsofDredmor.com now exists in this world! And it’s new! And Brax would very much like you to buy things from it, why don’t you. The prices are absolutely subterranean! (In, say, a series of dungeons, if you will. We all got that? Good.)
Brax does not agree with Batty’s business sense regarding certain expansion packs.
In all, we’re quite pleased to finally have this all put together. You can buy the game from our distribution partners, including Humble, Steam, and Desura, or perhaps pick up an expansion, order up a t-shirt, the game soundtrack, or perhaps your very own adorable stuffed diggle who hates you so much, but not that much. For those of you who bought Dredmor during our placement in the Humble Introversion Bundle, you can now enjoy high-quality, DRM-free expansion packs purchased directly from us (well, via the Humble Store.)
Props to the good folks of Chestnut St. Pixel Foundry for doing the design (drop them a line if you have need of some sort of graphical design — they also did this site, gaslampgames.com, and the Gaslamp Games company logo). Props as well to our own Derek Bonner for doing the coding and smart server type things.
Hooray for Scripting! (And Other Things We Did In The Past Two Weeks)
Way back in December, we had just implemented a bunch of the character logic for going through the world and doing things using our Finite State Machine model and utility functions. What we discovered was that writing the code for the FSMs themselves was, to put it frankly, a huge pain. Additionally, non-C++ programming members of the development team could not easily add new items and new behaviours to items (mines, buildings, trees, and the like.) Micah J Best, at the end of December, decided that we should use scripting to wrap some of the complexity and hide it from the end user, while simultaneously letting our development team create new objects and FSMs without requiring a programmer to go thrashing about in the codebase. I said, “Fine. Show me a proof of concept and then we’ll talk.”
Fundamentally, Gaslamp’s programming team operates based on spite. If somebody says “oh, well, we’ll never get that done in time”, or “oh, well, it’s too impractical”, somebody usually says “no, it well isn’t” and will jump to the bait. (I did this recently with a pipe system test.) Saying “Well, show me a proof of concept and we’ll talk” is equivalent to putting a red cape in front of a bull.
Over the holidays, Micah found himself stuck in Quebec. With nothing but inlaws, a language barrier, two laptops (one of which was destroyed by a cat), a turkey stuffed with poutine, and spite, he put together the first build of what is our new scripting system. It does, indeed, encapsulate all our programming decisions and is fairly powerful and flexible. We took apart all the character code we wrote in December, ported it to the new scripting system, and have now started using it to implement new things in game. It’s very powerful and, after some back-and-forth, I’m quite happy with how it’s turned out. We’re still fixing bugs and fine tuning how it all comes together, but let’s see how it all works…Our system is built on top of Lua, the happy interpreted language you may know from World of Warcraft and, if you’re a sysadmin, nmap. Each object type has a .go file, containing a name, a list of its variables, and a number of messages that it receives. Objects in Clockwork Empires (more properly, objects in our engine) communicate with each other in a given game frame by message-passing; this is the same framework that we use to communicate with the renderer, and between the renderer and the gameplay and networking layer. One advantage of this approach is that it’s very, very threadsafe; no object can get out of its sandbox except by messages, and we control the messages. This makes it possible to do some… interesting optimizations. For those of you familiar with early game creation toolkits, this is the same programming idea as the languages exposed in Tim Sweeney’s ZZT game, and later on in Greg Jansen’s Megazeux.
Whenever an object gets a message type that it knows how to handle, it runs the corresponding Lua script. For instance, here’s the chunk of code for a mineshaft that, if you click on its interactive menu object and select “Mine”, registers a new mining job:
receive InteractiveMessage( string messagereceived ) << print ("Message Received: " .. messagereceived ); if messagereceived == "Mine" then send( "gameCitizenRequestBlackboard", "gameObjectNewJobByNameMessage", SELF, "Mine" ) end >>The mineshaft gets a message from the renderer saying “Hey, you just were selected and told to perform mining!” It then sends a message to the jobs request blackboard (the object responsible for managing all player jobs in the game) telling it to create a new job, “Mine”, from the jobs list with itself as the originating object. Jobs are still stored in XML, as are item definitions, character information, text strings, and the like.
Each message has a type. Message types can either be defined in C++, or on the fly in Lua scripts.
FSMs, for characters and Other Entities, are separate Lua files. Each FSM runs on a character, and cycles through a list of states. At each stage of execution, the FSM can remain in the same state or advance to a different state depending on where it is in its execution. For instance, here is the “pick up an item” FSM:
pickup_item = { ["start"] = function(state, tag) print("pickup_item") -- FIXME: if I have a currently picked up item, I should drop it. if state.curPickedUpItem ~= nullHandle then FSM:abort( "Hands full." ) return; end -- As far as we are concerned on the game side, the transition is instantaneous. We remove the item from the grid, -- we put it in the character's inventory, and we let this elapse some number of ticks. resultROH = query( tag.target, "ROHQueryRequest" ) name = query( tag.target, "HandModelQueryRequest" ) state.curPickedUpItem = tag.target -- de-register from spatial dictionary send("gameSpatialDictionary", "gridRemoveObject", tag.target ); -- Start the animation send( "rendOdinCharacterClassHandler", "odinRendererCharacterPickupItemMessage", state.renderHandle, resultROH[ 1 ], name[ 1 ] ) state.animationTickCount = 0 return "animating" end, ["animating"] = function(state, tag) state.animationTickCount = state.animationTickCount + 1 if state.animationTickCount == state:getNumPickupTicks() then return "final" else return end end, ["final"] = function(state, tag) print("Done") return end, ["abort"] = function(state, tag) print("Aborting") return end }The query() function actually sends a message to other objects involved in code execution (in this case, the object being picked up), and halts program execution until it returns. We support this, internally, using Lua’s coroutine functionality.
There will also be a third type of Lua file, for “special events”, which will be responsible for governing Interesting Discoveries.
Unlike in Dredmor, where scripting using our XML system causes hideous silent failures, both our XML and our Lua code will scream at you, furiously, if anything is broken or incorrect. Modal dialog boxes will appear as soon as your Lua script breaks, and won’t let you advance the game until you have acknowledged all the Lua code that broke in this rendering frame. “Hot Loading” and resumption is Coming Soon, as well as some sort of a wrapper for Lua’s debugging functionality.
To cool the heels of the invariable cries of joy from the modders: we have not decided how much scripting, if any, we will end up exposing to the mod API and, if so, when we expose it. There’s a pretty good case to be made for doing a launch of the game without modding and turning it on later, like we did with Dredmor; amongst other things, this will ensure that we get the core game right and resolve any post-release issues (which hopefully we will have none of this time, knock-on-wood) before we start letting other people modify it.
In other news, Chris Whitman, Terrain Wizard, has finished rewriting the rendering code for our terrain. Our new terrain implementation doesn’t use a standard heightfield; instead, it uses an algorithm called Marching Cubes (thankfully now patent-free) in order to generate terrain from a scalar field. With this rewrite comes support for improved texture blending with Interesting Edges, and also the ability to raise and lower terrain. Support for terrain modification is necessary in a game like CE to ensure sufficient buildable space; additionally, we can use it (at our discretion) for things like Impact Craters from the Space Fungus Meteor.
Where the desert meets the swamp, the Aurochs bull shall call at eleven then the Obelisk shall show you The Pathway.
Biome selection is now in as well, although the biome generators themselves are only filler right now. Here you can see a “grass and plains” biome with a giant cliff for whatever reason featuring smooth texture transitions, a swamp biome with various swampy things in it, and whatever the heck is going on in that desert place with the obelisk and jolly little campsite.
So, yeah, humming away here quite happily. Now, back to work! I’ve got overseers to fix!

