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.