Category Archives: Free Company

Ambient occlusion, new tools and level generation

So, to follow on from my last update eventually I got settled down into London and after a bit of casting around for employment I’ve settled back into a routine of mostly full-time indie game development again. I still have no income but my brilliant co-conspirator in life is supporting me with food rations and bills. As a result rather than mostly mothballing this place I really need to spruce it up instead and put out some more frequent information on my game development activities.

First up, a little spring cleaning of some badly conceived code; my hex grid. When I initially cranked out the hex grid I naively attempted to map it to a two-dimensional array by adding a little off set if the hex was in an odd row. Unfortunately this offset adding code starts to spiral crazily out of control as the algorithms get bigger as you need two paths for every branch; one if you are on an odd hex row and another if you are on an even hex row. Code was becoming unmanageable and hardly any of it could be reused. The solution, it turns out, is to envision the hex grid instead as having three dimensions or axes – one that passes through each set of parallel edges. To index it to a two-dimensional array you just pick two of these three axes and use them as them to provide your 2D indexes. Most of this wisdom and more was unearthed by reading through this treasure trove of hexagonal maths links compiled by Amit.

I still have a few more algorithms to replace as I revisit other parts of the code but so far its working wonders on my code’s comprehensibility and length.

Next up I decided to revisit Screen Space Ambient Occlusion having previously abandoned it as something too tricky to make it look nice. Luckily since my first attempt the scholars at GameDev had put together a good article and a great forum discussion on the topic. SSAO works better on more dynamic scenes than the somewhat static levels of Free Company, the main alternative would be to calculate light maps during load time (my levels are dynamically generated). So far I’m happy enough with my SSAO implementation though and it also has the advantage of being useable across projects and reacting to any more dynamic stuff that I do put into the game. How does it look? Like this:

SSAO example

The darker image being with SSAO and the lighter without. Its main role is to fill in the shadows in corners that my ambient point lighting isn’t managing to. Hopefully it helps make the level feel a bit more substantial and less artificial.

I’ve also spent some time crafting a basic model viewer app I can use to fix problems on assets by looking at them up close. The isometric viewpoint and dark lighting of the game can hide a lot of problems, which is one of the reasons I like it 🙂 however it’s even better if I manage to catch those problems in the model viewer. The model viewer looks a bit like this:

Shot of the Model Viewer App

So far it’s helped me crack a whole range of animation and texture problems in my assets and it is also proving to be a good base from which to branch off into making other useful tools and test projects.

The guiding focus of all these efforts has been in trying to algorithmically generate  levels that both look good and preferably are hardly noticeable as algorithmically generated at all. So far I’ve got as far as generating random dungeon layouts of rectangular rooms and corridors and I’m now moving on to populating those generated rooms with believable layouts of furniture and items. Finally I’ll add room and level appropriate ‘monster’ encounters and then try to tie together all the subsystems around a super system of randomly generated base level types (e.g. ‘Warehouse’, ‘Castle’, ‘Inn’) and randomly generated goals within the level.

All this is building towards a temporary rogue-like game structure where you form a group of mercenaries to tackle a never-ending series of randomly generated missions that get gradually more tricky as your group gets more powerful. I’m going to build toward releasing that before I move on to creating the high level, principally map and economy based strategy layer that forms the other main wedge of the original Free Company design. Hopefully the rogue-like structure will allow me to a) test and improve this area of the game in a rapid way by getting lots of quick battle maps in front of people as fast as possible b) be lots of fun in its own right c) allow me to build up some kind of fan base to help try to support the rest of the game.


Moving House

So, it turns out moving house takes up a lot of time and mental energy. I’m about to make a large move across the country to a new city (London) and lose most of my remaining savings at the same time. It’s pretty daunting  but I’m hopeful that things will work out for the best.

I’ve been squeezing in a little bit of work on game projects when I’ve had the time or energy. Over the summer I started work on a little top down 2D project inspired by a TIG Source competition but, as such things tend to, it grew larger in my imagination and it began to take away time I should have been spending on the Free Company project. I learned a bunch of useful things through working on it, principally about texture atlasing and how difficult it is to make a flexible action scripting system for a level editor. Hopefully I’ll pick that project back up at some point in the future and polish it into something playable. Recently, I’ve been back on Free Company trying to make some headway on the automated level generation (very tricky), cleaning up the front end and a lot of refactoring of the code I’d already written to make it more useable across the multiple projects I’d been running.

The  indie game stuff is going to have to take a backseat from now on though, I’m out of money and taking on a big mortgage at the same time so I’m back searching for some full-time work. I’ll still try to do a little bit of work on the game now and again but realistically it’s pretty unlikely I’ll get anything big finished anytime soon.

Hopefully, once I’m settled in London things will calm down a bit and I’ll be able to get back to this blog occasionally with information on whatever it is I end up doing next.

Thanks for following.


Free Company Tech Test 1 is here!

So I haven’t been updating much on the blog this month, hopefully thats just because I’ve been super productive on the game developing side of things. In fact, I have! What we have here is a genuine, installable, playable thing that will show you – the general public, roughly what about fifty percent of your time playing the amazing upcoming Free Company video game might be like.

You can download the full exciting experience right here.

13.6MB and its called FreeCompanySetupV2.exe.

It looks like this:

this

If your direct X isn’t relatively up to date then it won’t work. I looked at including the redistributable but it was about ten times bigger than the game so I left it out. If you think you might need to update your directX then try getting it here.

The main point of doing this, for me, is to gather some real world experience in releasing an application out into the wilds as that is something I’ve not done before. I also hope that some of you out there who try it will send me emails or write comments explaining why it sucks donkey balls and when and where it doesn’t work. Thats why I’ve called it a tech test. I’m testing my game technology on you, if you’ll let me.

If you do grab it then you might be a bit confused. It doesn’t really give you an objective when you press start. So I’m here to tell you – its the classic ‘Kill all the other dudes’. To help you do this I’ve provided camera controls mapped to the right and middle mouse buttons. Right button will rotate the camera and middle with let you drag it around. If you don’t have a middle button you can also move the camera around by shoving the pointer to the edges of the playable area, but its not as satisfying. Everything else is accomplished by left clicking; attacking with an axe, walking about – you name it the left button probably does it. If you hover over some stuff that looks confusing for a few seconds a helpful tool tip should appear and give you some cryptic clues.

I’d especially like to thank the fantastically simple Inno Setup for helping my overtired brain produce a thing that actually installs, just like a ‘real’ game. I hope to expound on the stuff that is going on in the tech test a little more when my brain has recovered.

Thanks.

Now try my Tech Test or I’ll look at you with slightly disappointed puppy dog eyes.

THROUGH THE INTERNET.

IMPORTANT EDIT: Looks like the auto-generated start menu/desktop shortcuts have been generated without the ‘Start in field’ . I knew that Inno setup was just too easy. If it doesn’t work and you were running it via one of those methods then try navigating directly to the install directory and running it from there. I’ll fix up the installer as soon as possible.

IMPORTANT EDIT 2: I’ve now fixed the installer link above so it should generate working shortcuts automagically. So if you can read this and you haven’t downloaded the tech test yet you can safely ignore the first important edit.