Category Archives: Game design

HUD improvements & Memory leaks

click to enlarge

This fortnight has been spent plugging all the memory leaks that had built up in the Free Company code base since the last time I went through and plugged them all. The work was considerably eased this time by the use of a new tool I discovered called Visual Leak Detector which makes the process of pinpointing where the leaks are happening fairly trivial by providing callstacks. It also runs fairly quickly in the background so I can leave it on permanently in debug builds to continue passively identifying new leaks as and when they spring up. VLD is super simple to integrate into any project as well so if you are still struggling along with C++ out there I recommend adding it to yours immediately. The only thing it doesn’t catch are Direct X memory leaks for which a more traditional approach, and the debug runtime, is still needed.

Once all leaks were deftly disposed of it was on to a HUD tune-up, something which is still ongoing and probably will be right up until the release. You can see some of the results of the changes in the screenshot above. I was aiming for less numbers & more visual ways of showing what is going on, as well as adding more widgets to give you better control over your whole party of mercenaries. The portraits added back in January now provide a handy way to select a particular mercenary and jump to his current position in the world, and they will  also soon contain a shrunken down overview of the bars on the main HUD for each merc. There are now special pointers for all of the various ways you can control the camera which possibly only I care about. Finally, I spent a bit of time tweaking the colours of various elements to tie the buttons into the HUD better, improve consistency between different elements and generally reduce the ‘primary’ nature of most of the colours I was using before. I’m still not very happy with the layout of the bottom HUD area ( a lot of spare/wasted space, the elements are a bit boring) nor the fairly crappy skill icons but it is coming along all the same.

click to enlarge

While I was fiddling with the HUD I also went through and ticked off a whole heaving heap of bugs with the skill system so that the handful of currently implemented skills now actually work properly all the time and give slightly better feedback when they are being used to boot. Implementing a host of new skills and improving their feedback is one of the big upcoming tasks so I wanted to have the ground prepared for when that is started. And as a final thing I’ve just now tweaked the post effects again to add a vignette.

To give a sort of general picture of where the game is at I have about a week or so’s more tasks listed on my current ‘polish’ to do list to get through before I start on one of the big three remaining tasks pre-alpha release. Those big tasks are; skills, AI & real-time play between combats. I’d welcome any feedback on the changes/look of the HUD in the comments. Or really, any comments at all. Speak your brains internet.


Skills, XP & Skyrim

Ok, I hold my hands up. Along with much of the rest of the internet I’ve been playing a lot of Bethesda’s excellent Skyrim recently. I apologise unreservedly to anyone who was holding their breath impatiently for my next missive from the wreckage strewn front-lines of indie game development. There were dragons and they just needed a really good killing. Repeatedly.

I think I’m over the worst of it now. Well near the very crest at least.

So, in the scant moments when I haven’t been inexorably sucked into the mountainous peaks of Tamriel, what have I been doing? Free Company wise I have mostly been setting up the UI flow, game logic and necessary data to allow your mercenaries to grow in experience and learn new skills. Which they can now just about do. The available skill pool is still sitting at a paltry four right now but I’m expanding it in my other code-a-tron window as I type this. So in not too long you’ll have a wide range of ways be able to specialise your mercenaries in meaningful ways and thus gain new and interesting methods of dispatching your opponents.

Other than that I have an upcoming feature list that I’m still pondering over. I plan to get it all in eventually but what should I add now and what should be moved to later on? Here’s a few of them:

  • Campaign mode – building structures in your base camp to unlock nebulous other ‘things’
  • Campaign mode – UI clean up + additional UI screens to fiddle with.
  • Dual wielding – look a sword in each hand!
  • More weapons – daggers, working spears, staves, bows
  • Sneaking focus – stealth related skill or skills, special animations and more stealthy looking outfits.
  • Buffed up encounters – featuring bosses that wear special hats and better initial positioning.
  • Undead focus – zombie shuffling animations, undead skills, rising from the dead ambushes, crypt tileset.
  • Demonic focus – demonic skills, occult decorations
  • Spidery focus – webs, spiders shooting webs, spider ceiling ambushes, more scary spiders.
  • Sewer focus – sewer tileset, more rat stuff.
  • Magic – particle system, magic effects, spells, mage clothing, magic staffs.
  • AI focus – improve AI beyond basic attack routines, navigating doors correctly, variety between monster types.
  • Current tileset layout focus – improve the way levels get laid out, place small objects on shelves, lay out rooms with more symmetry and less randomness
  • Tileset furniture focus – create objects that hang on walls,   more rugs, more ornaments, more debris objects
  • Combat rules focus – add more basic combat rules concerning positioning and the interface to support them (back stabs, flanking attacks, disengaging from hostiles penalties, zones of control). Consider unified, regenerating ‘energy bar’ governing attacking and attack parrying to try and avoid the problem of boring ‘whiff’ attacks as well as feeling of hacking away at a large health bar chunk by chunk.
  • Speeding up getting into combat focus – realtime movement when not in combat, group movement & group selection when not in combat.
  • Existing animation focus – improve the already existing animations and add alternates to create more variety.

And so on 🙂

Free Company has also had a bit of a musical boost recently with the help of indie game music supremo Stian Stark   (Whose work can also be heard in fantastic games like Solium Infernum). Stian has kindly agreed to supply an original piece of music in return for a bottle of indie game developer dreams and unicorns*. In fact, he already has supplied it and it’s a fantastic piece, doom laden and hopeful all at the same time which is perfect for the grime and black humour of a mercenary company. You should all go visit his website or buy one of the many other games he has contributed to so he gets some money immediately.

Outside of the soft embrace of games; the Robotic Shed recently had to take its newest inhabitant; a soft, happy kitten, off to the vets for a rather sensitive operation. The experience was quite traumatic, but I’m now fairly well recovered. The kitten took it all in his stride, at least once he was safely back at home and now has moved on completely to his latest nemesis; the grey cat from somewhere up the street. The Shed currently isn’t sure whether the kitten wants to play with, smell, fight or flee from the grey cat but will be sure to keep you all updated.


*May not contain unicorns

Variety is the spice of games

Surrounded by rats


One of the consumer selling points of randomly generated content is the infinite variety of potential situations it promises and that’s something I’m hoping to start to capture for the first alpha release of Free Company. Since last time I’ve been working on getting the existing content to be more data and randomly driven. The contract/mission generator now picks between available location layouts, picks a themed set of monster encounters to place there, then passes that information over to the renderer to load the correct tilesets and monsters needed for that mission. All of this is now almost completely data driven so I can dictate new tileset layouts and monster encounter setups with a couple of xml files and then they can just feed straight into the generator. Lovely.


It’s not all the way there yet though, while there is variety in the actors and the scenery so far the script for these martial plays is always following the same outline; namely ‘kill everyone’. I hope to gradually introduce the potential for new objectives by expanding what the mercenaries can do in the world and then have the generator setup more interesting situations than just indiscriminate murder.


At a lower level  of the game I’ve also been introducing variety by the barebones of a generic skill system to the game with a few starter skills to test it out. I’m hoping that I can eventually give each of the monster types a couple of interesting and unique skills (and the wits to use them correctly). I started with the rats pictured above; giving them the ability to greatly improve their ‘to hit’ percentages by attacking en masse (this is actually a generic rule across the game now but the rats skill makes them extra good at exploiting it). I haven’t given them any special AI routines, but combined with using the new encounter system to increase the average number of rats spawning in a room they now present a formidable challenge if you let them surround you.

Those were the main tasks but I’ve also added a bunch more items into the game that I built, mainly for the new monsters, so that the mercenaries can use them as well and hopefully fixed a few niggling bugs that were interrupting the flow of the game.


Off on holiday next week so it’ll probably be two weeks until I blog again. Try to keep going without me.

The infinite novelty engine

Dwarf Fortress Story

From Bronzemurder

Entertainment generally, and therefore games specifically, create a lot of their enjoyment through surprise and novelty. Rewatching a movie is usually less exciting than seeing the first time round as your memory is busy ruining the surprises for you. There isn’t much the movie makers can do about this, the film is what it is – you can bundle some special features on the DVD but if you want to recapture the magic of the first watch you generally have to just watch a different movie or get some kind of invasive brain surgery. Bad luck movies (and books); but what about games?

Games are often designed so that the same content can be repeatedly played – they can substitute for the lack of new things to see by introducing unpredictable elements like other human players. Team Fortress 2 is a great example, the arrangement of polygons and physics shapes on the map ‘2fort’ hasn’t changed in years but it can still provide new experiences or at the very least a chaotic new arrangement of old satisfying experiences. However, even with a timeless map like ‘2fort’ one can eventually tire of its rhythms; the possibility space is only so large and the human players are only unpredictable to a certain level taken en-masse. In the end players also want new maps.

Thus even in multi-player games, the demand for new content is near infinite and the capable creators of it in short supply. This is an especially acute situation if you are an indie game developer; the number of creators of new content for your games may be very small indeed. So the arrived upon solution is procedural generation, content generally obeys a set of rules which can be identified, codified and iterated until we have a machine that can generate new content for us quickly and tirelessly. It’s like the industrial revolution all over again, a future containing out of work artists and level designers but satisfied consumers – problem solved.

Or is it? Even with procedurally generated content we see players identifying patterns enormously quickly. The rules are quickly pinned down, the wizard behind the curtain identified and the glorious future of infinite novelties lies in tatters before it had even begun. The same problem occurs with the game mechanics, the content might be randomised but the rules of the game itself remain static – there are infinite corridors but you can only walk down them one way.

So, astute readers are now thinking, what we need to do is procedurally generate the rules themselves; the content generation rules and the game rules too. Tear open the possibility space so wide that a player can be continuously surprised every time they play. For each player and each game session it would be like playing a brand new game each time. Of course this time we’d put the designers themselves out of jobs, and probably ruin the entire industry as new game sales collapsed and what we are studiously ignoring is the enormously impossible scale of the task itself.

So if it’s so impossible, why consider it at all? Simply, because it is, in some respects, the ideal form of a game. Its something to reach towards, grab a sliver of, and continually fail to achieve in glorious style. When you play Zelda and you get a new dungeon item that suddenly allows you to lift previously immovable boulders you are seeing the merest glimpse of this platonic game form. When you play Deus Ex you see the power of even a moderately opened possibility space. I wonder when we will see the first, truly indistinguishable from hand-crafted, procedural story? Dwarf Fortress is already steadily progressing down that path, prompting some players to fill in the remaining gaps.

Anyway, enough rambling speculating and theorising. On Free Company I’m just beginning the first round of a test-to-changes-to-test iteration cycle on the tactical battle gameplay with some testing assistance from my ever helpful brother. Almost all the gameplay systems are still in flux right now, I have the roughest idea of how I want it to feel but I’m trying not to get attached to any particular systematic specifics for fear they’ll impede producing something that’s fun. I’ll post more details on the results of this process once I have them.

The best games are carrot cake

Carrot Cake

There’s been a lot of talk about games as food recently. First, a week or so ago, there was Cliff Harris asserting that games were doughnuts then, more recently, I see Mr. Randy Pitchford likened Duke Nukem to a “greasy hamburger”. Now Twitter has been abuzz all day long with terrible puns involving a game and an item of food.

Clearly the stars are aligning for one reason and one reason alone. It’s time for me to finally reveal my own tremendously clever food-related game design theory. If you managed to somehow seal your vision ducts for the title and giant picture above then here it is again; fully revealed:

A good game is like carrot cake.


Though I feel, perhaps, I should explain in a little more detail why I’ve been thinking this ever since I first read Cliffs blog. For me this strikes to the heart of why I’m in love with the medium of games, more than any other. It’s why I’m obsessed with playing them, dissecting them and crafting them. I believe that there is something wonderful and terrifying about games, something that is going to be harnessed more and more in the future for good or ill. It’s their power to teach us; to powerfully imprint their designs on our psyche, to shape our brains.

Games, almost uniquely among mediums, put the person experiencing them directly within the experience. With a book, film or piece of music the consumer is a passive observer, they are being entertained at and being taught to. When you play a game, you shape the experience; you have a role and a place within the game world and to drive the experience onwards you are forced to engage with it and respond to its challenges. To engage with a game you are forced to understand the material it presents and to directly confront it,  with a film or a book the experience might wash over you the events happening far away, you can become disconnected & disassociated in a way not possible while experiencing a game.

As such, I believe the power of games to teach us the lessons embedded wittingly or unwittingly in their designs is a hugely powerful one. I feel that, as a medium, the experiences and knowledge gained within games are more likely to stay with you longer. Games are already much better at conveying complicated systems, like those around which much of the world turns, but I also believe that, as the mediums matures, they will have the potential to generate more emotionally affecting experiences as well.


Games are still entertainment, they are there to provide satisfying experiences. They are for people who want to relax, escape reality or all the other reasons that people play games. Lurking behind that innocent fun though is this great shaping, teaching power. Designers can choose to ignore it; just forget about any lessons their games might be unintentionally imparting let the players worry about it – if they really want to. That’s a perfectly valid approach that has and will continue to lead to many good enjoyable games. However, I think, to be truly great a game should be aware of that lurking power to teach and use it to do some good.

Teach your players the lessons you would want them to learn while you are entertaining them. Teach them powerfully but subtly. Teach them about beauty and politics, about love and chemistry. Teach them without them ever noticing they are being taught then perhaps your game will be truly great.

Which is why they are like carrot cake. The carrot cake looks just like a delicious cake – it tastes just like a delicious cake. Yet somewhere, smuggled inside that shell of pure indulgence, the cook has concealed a load of nutritious vegetable. That’s a great cake.

All hail the overgame.

The start of a shopping UI

Development on Free Company steadily continues here in the shed. I’ve had to venture out into the cruel, uncaring world a bit more than usual recently to earn enough money for those precious wheelbarrows full of coal that keep the code furnaces at full power. It slows the development rate for a few weeks on the one hand but on the other its good to eat food.

That aside, I’m currently focused on creating the primitive skeleton that will help join the 3D tactical battles together into a compelling campaign style narrative  in your minds for the initial paid alpha version. A lot of the work here will be reused when I get to making the ‘proper’ map driven campaign later on so it’s not a total waste long term and hopefully it’ll make the alpha much more fun to play for a series of battles and thereby generate a whole raft more testing feedback if any lovely person does choose to take the plunge and give it a try for a small fee.

So what’s going in this overgame skeleton for the alpha? First up I’ve been working on a shop where you can restock your mercenaries consumables and outfit them with new weapons and other equipment. Secondly, there’s going to be a menu to recruit fresh-faced wannabe mercs to build up your fighting force and tackle more contracts/tactical battles. Thirdly there is going to be some basic facilities for equipping and editing those new recruits so you can roughly shape them into the kind of fighting force of your dreams. Then finally there is going to be the contracts board where you can pick contracts to accept,  dispatch a squads of mercs to take care of accepted contracts and start the tactical battle when they arrive. The campaign screen will also have some other handy functionality, like the ability to save your game, which’ll also mean that the ‘load’ option on  the main menu finally does something! Hooray! If you can think of any other essential ‘overgame’ screens/menus/options that I should absolutely cram in before the alpha version then do let me know, perhaps in the comments below even.

I’ve recently ‘rebranded’ my twitter feed to the more personable (and more related to this fledging gamedev shop) @danintheshed. Existing followers should have transferred over with no problem, but if you are new and interested in Free Company and whatever else I might put out then that’s as good a place as any to get updates.

Don’t take it personally Shepard would definitely be Leon though.

I recently played through the rather excellent don’t take it personally babe, it just ain’t your story (available here) which despite generally being about as far from what I’m making as an indie game can get provided a perfect example of a type of game design that I’ve been thinking about for a while. Namely dialogue choices where you have to actually pay attention and turn on your brain if you want to get what the game is giving you. In DITPB each of the offered choices are subtle and nuanced (Do I interrupt this arguing couple? Should I throw an escape line to a third wheel?) and most depend heavily on the story roles and context, particularly your knowledge of the personalities of each of the characters. At one point in the story you have to tell a student off and because of the student’s manipulative personality and the teachers position of authority I felt that it was vital I came down as hard as I possibly could, leaving no wiggle room. The choices had real weight and meaning to me because to make them well required you to make use of your mental image of the character’s world.

The trend in commercial story driven games has been to take dialogue choices in the opposite direction. Choices are big and obvious, they are usually over black and white topics that award morality points and most egregiously recently they are being handily sign posted so you don’t even have to think or engage with the dialogue at all. I’m thinking most obviously of Mass Effect, which currently strides across the story driven game genre like a colossus of critical acclaim. Which in some ways is very deserved; the universe building is excellent, the characters are mostly engaging and the presentation is top-notch. What the Mass Effect dialogue isn’t though, is much of a game.  There is still gaming to be had in Mass Effect as a whole; some exploring and decent shooting parts but the dialogue game has withered to allow a TV and film influenced alternative to bloom in its place.

I’m not sure it’s possible for the mainstream to go back; production values get in the way, and I expect, as with the continuing success of the Hollywood blockbuster, there is a huge segment of the audience that actually prefers the choices being simpler and not requiring you to pay any attention. What it does mean is that there is a yawning market gap that games like DTIPB and developers like Christine Love can rush in to fill.