Prologue: Last month we divvied up tasks based on some Agile concept; I believe we’re “writhing” through the next “suffering revolution” on the “Wheel of Pain”, if I have the terminology correct. I proposed that we shove Mineshafts off the current month’s TODO because I didn’t think they were as important as other features. Naturally the task of implementing Mineshafts ended up being assigned to me, as is only correct according to the Iron Laws of Bureaucracy.
Subsurface mining is pretty straightforward because we abstract the details: the player builds a “Mine” building with a “Mineshaft” module (and at least one door! we’ve had problems with people not putting doors on things!). Once these are built, the player assigns a work crew to the Mine. Using the recent code done for Chapels and Laboratories, the labourers in the mining work crew are transformed into properly-outfitted miners wearing the correct uniform and everything – it’s great to finally get these occupation-specific models into the game properly!
That done, a Mine creates its own job order to start mining and pretty much runs itself automatically so long as you have a workcrew assigned – at least for this first implementation; we’ll get into additional complexity later.
The basic operation is: worker goes in, digs for a while, comes out with a random piece of ore/clay/stone/sand/weird artifact with distribution based on “David’s Gut Feeling”. We even very nearly had everything set up to do this based on the scripting done for our first preview trailer from like a million years ago, though code changes in the meantime resulted in the old script crashing, then a problem with floating pickaxes, then another crash and some confusion about “Animation Sticks” which was actually a typo (We’ve got Nicholas sorting out the last few pieces here while I write about him doing so. I often just hover behind his desk, narrating what he’s doing. … Nicholas squints and curses C++ again while his hands, by pure instinct, search for a coffee cup. He ponders refurbished synthesizers for a moment to settle his nerves …)
From there, there are obvious routes to add sophistication to the Mine building:
- Have the mine (slowly) take longer to output ore over time
- Require an input of planks after every X successful ore harvests to “shore up” the mine
- Allow mine upgrade modules (of which we have a handful to draw on) to make mining more efficient, to offset slowdown over time.
- Create unique ore distribution based on location on the game map, based on what subbiome is at that location, and more generally on the overworld colony location selected
- Have player be able to query ore distribution of a mining spot before mining by assigning a Naturalist to conduct a geological survey (remember Settlers 2? “Yippee!”)
- Digging too greedily and too deep, of course.
Now: having a (weakly) infinite source of mined resources begs some questions and the answers lie in the other feature I was assigned from the Wheel of Pain: module maintenance! No, really, this is cool!
Module Maintenance Costs
We don’t want to make this a choiceless choice. There should be an ongoing cost in resources and labour to maintain a high-efficiency, “teched-up” colony, with high-level machinery festooned with shimmering cogs and so forth.
How it works: After a workshop module is used some number of times (which can be easily balanced via data files) without being carefully maintained, it’ll need repairs. Or a module is damaged by some outside sources like Fishpeople, Bandits, or Explosions (thus tying modules to the ‘object damage’ system we’ve had for a while but only applied to a limited set of game objects, including commodities, crops, and gabions). Thus damaged, the module will create a “Repair Module” job that pulls as a requirement one (or more) random resources from those used to construct the module. That’s your repair cost, and someone should get around to doing it sooner or later or the damage state of the module will advance until it is destroyed.
Then, after some argument, I conceded to Daniel that I guess we shouldn’t make this system just cause Carpentry Workbenches to explode at people as if this was some kind of apocalyptic industrial accident-wasteland where only the diligent survive. We could provide a benefit to staying on top of repairs: if routine maintenance tasks are performed with appropriate regularity, then machines could operate faster and more efficiently, maybe we can even avoid material costs for repairs, though this is all subject to the demands of economic balance.
We’ll also need some kind of “mine” from which you can pull nearly infinite timber, as that resource is the major limiting factor after mined resources are accounted for…
… And yes, this means we should shove perennial agriculture and forestry back onto the Wheel of Pain in support for the above points. All in good time, dear colonists, all in good time!
What’s Really Going On
Internally we’ve been discussing the gameplay arc of a game of Clockwork Empires, of what distinguishes the beginning of the game from the midgame. In rough terms, the beginning of the game ought to be about sheer survival while the midgame is about opening things up a bit, giving the player more resources and more choices of where to apply those resources. These low-micromanagement/self-sustaining resource supplies are what lets a player stop worrying about, for example, finding some berries or malachite nodes over the next hill — we want players to worry about other things like special events, specialized construction projects, how to deal with factional conflict, and so on.
And to get there, you’re going to need a whole lot of bricks!