Author Archives: Dan Lawrence

Holdings, production and stacks

A quickie update because I’m a bit short on time at the minute.


The last two weeks have been spent trying to further build up the sparse systems of the strategic layer, so the buildings from last time around are being given a new feature; item production and I’ve added another new system and screen to support that. The idea is that once you’ve built your blacksmiths workshop at your mercenary camp you can hire a blacksmith to go in it and set him to work turning raw materials into usable weapons and armour for your mercenaries to use in upcoming missions. At first it’ll just be a cheaper way to equip mercenaries over what you can buy from local traders but as your blacksmith gets better, your tech level increase, your workshop gets upgraded you’ll be able to craft better gear than you can buy.

To support this I also needed to add raw materials into the game so your blacksmith (and other craftsmen) would have something to work with. So there are now a range of raw material resource items that you’ll be able to find and trade like the normal items but the main way of obtaining them will be through the new ‘holdings’ system. Holdings represent the lands and properties your mercenary company has bought, seized or been granted through their activities, they come in different types from empty lands to gold mines and you can exert some control over what exactly they do but, what they do in the main, is pump out resources and ship them to your mercenary camp.

Getting this working required some adjustments to the item and inventory system as previously the grid was strictly a one item per square deal which works fine when you are dealing with small numbers of finished mercenary gear but becomes a little unwieldy when you are getting shipments of thirty charcoal every turn into your company stores. So I spent a bunch of time adding support for items stacks, splitting stacks and merging stacks. Only some items can be stacked at the minute I’ll just limit it to whatever makes most sense I think.

And that’s about it. I’m currently still working through the actual production of the items at the blacksmith as that’s all very bare-bones and I want a proper build queue so that you can queue up a whole set of gear if you have the materials.

Base camp

Base Camp screen

click to enlarge


One of the things Free Company had been missing from the classic X-Com design locker (that I have been so gleefully looting) is some kind of base building mechanic in the campaign layer. Well no longer, despite the lengthy pauses in keeping this blog up to date I have been steadily trundling away on new stuff for the game here and there in between some minor computer troubles and a new gym regime (designed to keep me alive long enough to finish this game).

Screenshots of menus are never that gripping but this particular one happens to capture almost everything I’ve been doing recently. First up was a code refactor of the campaign UI to support multiple potential screens worth of menus ( rather than having everything stupidly dumped in one rapidly filling up place). This was to support a couple of new screen ideas, the first of which is the base building one you see above in it’s first incarnation. To sell the base screen I decided to make a whole bunch of fancy images in a consistent style to represent the ideas I had for buildings. I think it came off reasonably and it is a lot more satisfying to gain that little icon of a tavern than it would be just building a bunch of text descriptions.  Though I also spent a bit of time revamping the text description displays by making the tool-tips used throughout the campaign (and in some areas of the tactical battles) more aesthetically pleasing. They now have slightly rounded corners, a carefully adjusted amount of alpha and the use of new text rendering options. The engine can now, with a little bit of text markup, render a bold version of a font (as long as you remembered to load one) and assign text colours with a much more dynamic system of css like id tags loaded from an xml so it is easy to add new colours and easy to adjust the colour of all the text that uses the same tag.

And finally you can actually use that menu now to start construction of the available buildings and as long as you have the cash and wait a few turns your company will be the proud owner of a new tavern/stockade or whatever. Of course at the moment all of the buildings are somewhat ceremonial as the other systems they are going to unlock , contribute to or  buff have either yet to be built or are yet to be decided upon. I have a few ideas of what they are going to do but nothing is set in stone yet.

I’m quite enjoying working on the campaign layer at the moment as I feel that every time it improves it’s helping to add the purpose and context that I feel has been a bit lacking in the tactical battles. However, there is still a chunk of necessary work that needs to go into the current tactical battles around mercenary special skills, path finding and play speed improvements and better enemy AI. At some point soon I want to muster the drive to finish off those areas to an ‘alpha-ready’ standard so I can start to think about some kind of release that will garner much needed player feedback.

In not-Free Company-news there is a new remake of X-Com due next month by Civilization developing titans Firaxis.  I have of course preordered it out of my ‘research’ budget mainly so that I can swipe all of its good ideas and twist them to my own dark ends.


As always any comments or encouragements are welcome in the handy box below, or you can follow me on twitter and bark commands to me via that instead.



Olympian feats

…are pretty distracting!


Work has been progressing slowly on Free Company the last couple of weeks, school has broken up for the summer so my teacher girlfriend and I have been enjoying the freedom from the school schedule by larking about. Now the Olympics has proven to be an additional distraction as I try to type code on my laptop while being constantly glued to the tv.

Anyway, I’m working on expanding the thin campaign layer a little bit  at the moment as a change of pace from the tactical battles code. I’d found myself struggling to get back into the programming while I was working on the tactical battle path finding for whatever reason but the grate thing about indie game development is that if you get burned out you can try coming at the game from a different angle for a while (there is always plenty of work to do). So I drew and painted up some little building icons and I’m now re-factoring the existing morass of the campaign layer so I can squeeze them in on their own screen.

The idea is to introduce more and more systems that feed into one another, so the buildings will be built and upgraded with gold and prestige that you earn from completing contracts and they will in turn unlock more ways to improve your mercenary specialists, boost your prestige and add more ways to earn gold. I guess the goal is to one day have something as satisfying as building your base up in X-Com or improving your towns in a HOMM-alike game. For now it’ll be fairly simple though, columns of little icons and descriptions.

After that I may pirouette back to the tactical battle code I was working on before, which was the rather tricky process of adding penalties for trying to disengage from, and move through melee combat opponents. Right now one of the most effective tactics in the tactical battles is to run away from an opponent for half of your allowed moves and then charge back in to get a charge bonus every turn. Obviously that is a bit ridiculous and not the tactical game of positioning I’d like to move towards. Instead I’m going to allow a free ‘unopposed’ attack on a mercenary that tries to move out of  hex adjacent to an enemy. Sounds easy enough but it means I have to rework the movement interface and logic for this special case to a) allow the unopposed attacks to be shown and b) to indicate to the player that he is about to make a special kind of move that he might want to think carefully about. I also have to change the regular A* pathfinding code to avoid including this type of special move in the middle of a normal path, instead it will attempt to give enemies a wide berth unless you specifically ask to attack them or otherwise enter their threat radius.