Monthly Archives: November 2015

Making a Game – Report 21 (Tech demo released)

What I did

First off was setting some limits on the team size.  Now you can’t have a team smaller than 1, or larger than 8.  I might change that later, but that’ll happen later when I have the combat fleshed out enough to start fine-tuning the balance.  You can also change the sprite of your team members.  I was going to let you select an image from your computer and use that, but it turned out that Unity doesn’t supply an in-built way to let you browse your computer for files.  So I ended up throwing together a quick gallery of faces to choose from.  I’ll have to come back to this later and figure out how to allow people to use their own images without much work.  That’s a “would be nice” feature though.

Team and team member data is now saved to and loaded from disk when changes are made to it.  It saves each team to a separate file and is fairly easy to cheat by editing the files manually.  Granted there’s not much advantage in doing that right now as you can do the same things by using the in-game team manager.  Another thing I’ll take a look at fixing up much further down the line.

On the world map front I’ve made a few changes.  You can now only attack territories which border your own, which means you have to select one of your own territories to attack from too.  I’ve hard-coded which territories you can attack from for now, which I’m not entirely happy with.  I’m not sure what solution would work better though, other than storing it all in an XML file.  I could do something based on the distance between hexes, but I don’t want to have the art start affecting the gameplay.  I’ll put this on the backburner to look at again later.  Also, I’ve made sure that when a battle’s over the losing team’s territory will be passed to the winner.

Each battle now ends with a battle results screen, which lists the characters in each team and the damage they took, damage inflicted, and have many killed. There’s plenty of room for improvement here but most of this can wait until I’ve fleshed out character progression, which will clarify what sort of data is important to show off.

I managed to fix both the annoying bugs that cropped up a couple of sprints back.  The first one is the health bars disappearing,  I spent a couple of afternoons trying to figure out what was wrong with this, reaching some sort of success by changing the renderer sorting layer’s during runtime (didn’t work if I set it in the editor).  Eventually I decided to upgrade Unity and the issue went away.  Turns out it was a Unity bug that must’ve crept in when I upgraded in the past…  The other bug was a bit more devious.  It was happening seemingly at random and thought there there was no-one in the first team even though the check didn’t happen until after they’d been generated.  Looking at the logs the people had definitely been spawned but it still thought they were dead.  A little more digging and it looks like my IsAlive check was to blame, as it always returned false until the CurrentHealth was set partway through the internal setup work for each character.  A simple enough race condition issue to fix, but a bit of a devious one to track down.

With everything completed this sprint, I decided to go ahead and release a new tech demo, but at this point it’s starting to turn into a very rough Alpha.  I’ll try to release them a bit more often from this point.  You can find the current version here.

What I didn’t do

Somehow I managed to get everything done this sprint, so nothing for this section.

What I will do next time

Right now the game is mostly complete, although many areas are still in a slipshod “it’ll do for now” way.  But you can start a new game, and attack enemy territories one by one until you’ve taken over the map, so long as you don’t mind seeing the same demo combat area over and over again.  There’s also one noticeably outstanding issue, which is the game still needs you to manually control each team.  Originally I planned this to be a multiplayer game but it really needs decent AI for the single player mode.  Unfortunately I don’t know much about developing AI right now, so this sprint is going to be a bit vague and involve a lot of research and prototyping

First thing to do is find some articles on basic AI theory and practice. I’ll try not to spend too much time on this, but if I don’t understand the basics beforehand then I’ll be making my job that much harder.

Afterwards I’ll start putting together some prototypes. The first one will be getting the AI to move someone to the closest of 3 specific points. Next I’ll do the same, but have them prioritise the slightly further away one which provides cover. Then I’ll do the same, but make them check to make sure the cover will be effective against an existing target. I’m realising that I could make job significantly easier if I replaced my click to move system with a simple grid system. It wouldn’t be what I originally envisioned but it would make this a damn sight easier to get off the ground.

I’ll also try to create another set of prototypes for combat. It won’t be as in depth, but I’ll first make one to target people based on the highest chance to hit. The next can do the same, but will take into account how much damage a target has suffered. Finally, if I have time, I’d like to make another where it looks at which weapon each enemy has and decide who’s the biggest threat. More often than not it’ll be the one closing in with the shotgun.

That should do for this sprint. I’m not certain I’ll get it all done, but it’ll give me plenty of practice either way.  Ultimately I’ll combine these ideas into a single opponent who can assess the enemy ahead of time and move into appropriate cover to take out the most dangerous target. That should be fun.

As always you can see the status of my current sprint on my Trello board.

You can also find the current tech demo here.

Leave a comment

Posted by on November 17, 2015 in Making a Game, Release


Making a Game – Report 20

What I did

Had some things occur this sprint which took a lot of time away, but somehow it still ended up being a somewhat productive.  I’ve thrown together a quick world map with a number of territories (shown as hexes) which display some basic info and can be occupied by any team. At first I was all for using hexes, but now that I’ve had some time to play around with it I’m not sure it’s right feel for what I’m after. I think something with fewer, more spaced out territories with better graphics to represent them would be nice, but as I’ve said so many times before it’ll do for now.


I still really like hexes, but I just don’t think they’ll work.

I’ve changed the character placement in the combat mode to randomly place characters within that teams spawn area. This lets me put any number of characters in each time, although I will have to add some options for choosing where to play them later. Could do with a better demo level before that though.

I’ve completed an early Team Management screen. It’s very rough, but does the job until I have the time to do some proper UI research and design. From here you can change the name and equipped weapon of any team member for any team, and add or remove team members as you will. I haven’t placed a hard limit on the how many/few team members you can actually have yet, but that’s a fairly trivial thing to set.


When I say rough I really do mean rough.

What I didn’t do

Only have a few missing features from the team management screen now. I want to be able to set the portrait used to represent your character. Later I’ll build a library of images to choose from, but it feels important to allow players to import their own faces to use. I’m not sure if that’ll stay long term, but it’ll certainly work for now.

I’ll also want to save all team data to disk, and loads it again when you start a new game. It won’t be very visible to the player, but it’s important to do right and will need some research doing beforehand.

I want to update the world map so that you can only attack territories adjacent to your own. There’s a few ways I can do this, some quicker than others, but what I really need is do is make something adaptable which I can just load in for future maps. It’ll take a bit of planning, but shouldn’t be too difficult to figure out.

Finally I still need to let teams take over enemy territories when you defeat them in combat (or lose of your own if they defeat you). It’s kind of key to the whole persistent strategy side of things.

What I will do next time

I intend to implement all the features mentioned above, none of them are really optional at this point. I’ll also fix the issue I discovered while writing this post where there’s no lower/upper limit on team sizes. I’ll look at this properly later when I start to balance things out, but for now I’ll set them to 1 and 8.

On the bug side of things there’s 2 annoying ones which gave popped up recently which I need to fix. First of all the game will sometimes instantly leave combat mode after it begins. I’m not sure what’s causing this to happen, but as its intermittent I think there’s a timing issue somewhere which I need to look at.

For the second one, I’m not quite sure when it happened, but most of the health bars aren’t showing in the combat mode. It just flicks between showing one, then another as you move and rotate the camera. I’ve got no idea what’s causing this one, so I’m going to need to crawl through my past commits in git to see when it stopped working.


You can only ever see the one belonging to the top-most visible character.

When that’s all finished up I’d like to create some sort of post battle report screen which appears when the combat mode ends. No idea what I’d like on there right now, but the health levels, damage done, and characters killed for all people involved seems a good start. I’ll also need to track that data during the combat.

If I can get all of this done then I think I’ll be ready for another prototype release for anyone who’s interested. It will still be incredibly rough, buy at least I’ll finally have something resembling an actual game.

As always you can see the status of my current sprint on my Trello board.

Leave a comment

Posted by on November 4, 2015 in Making a Game