Monthly Archives: June 2015

Making a Game – Report 11

What I did

Quite a productive sprint this time, all but one item completed.  The biggest one I finally tackled was the health bars which plagued me last sprint.  Each one displays just above a character and rotates it constantly so they point towards the main camera.  They’re looking pretty good now although there’s still a couple of issues.  When you switch into aiming mode the health bars stay pointed towards the original camera, which doesn’t look too great.  Shouldn’t take much more to figure out a solution to that problem.  The current character’s health bar still shows in aim mode too, which gets in the way a bit.  This also shouldn’t take much more work to finish off, but that will have to wait until next sprint.

I’ve also improved the shooting mechanics, so that now you get a (really primitive) projectile shooting out at your target, hopefully hitting it.  There’s a couple of seconds delay now too so to give you chance to learn about if the shot was successful before play moves to the next character.  That one took a lot of rejigging of code to get it working, and could probably do with some more tidying up later.  In fact, one thing I’m sorely in need of is a major tidy up of my code to stop them from getting too bloated. Not sure that’ll be for another sprint or two though.

I managed to get a some extra screens sorted so that you don’t just jump straight into the game.  When you boot the new tech demo linked to below, it’ll take you to a title page (the image will come later), and let you view the game controls from either there, or within the game itself.  There’s also a pair of game over screens, one for each time, although they also need a fancy image to go with them.

I mentioned in my last report that one thing I wanted to do was spend a day focused on playing through a built version of my project when I’m ready to release a new tech demo, which I made a point of fitting in this time.  This led to this update going up a little late, but I think it’s worth it in the long run.  I did discover a number of small, easy to fix issues that would’ve gone completely unnoticed before, like the wildly different scales before scenes, the health bars disappearing when aiming at someone from above (the movement circle was getting in the way), and that I’d forgotten to hide the big grey hit boxes attached to every character.  None of those were particularly tricky to fix, but it’s nice to get them out-of-the-way sooner than later.

Lastly, after finishing up the health bars and some other areas I’ve now released an updated tech demo.  Working towards this over the past month has helped me push myself to make sure it’s that bit more polished than the last version, on top of trying to get all the big features done.  With that in mind there’s no reason for me to not release a new one in two sprints time.

What I didn’t do

The one task that I didn’t manage to get done this sprint was to take a proper look at the cover calculations and see what’s up with them.  That’s not going to go away any time soon until I do, so that one’s on the top of my list next sprint.  I’ll need to create a new level specifically so I can aim at characters at different angles and different levels.  Other than that it was a pretty good sprint.

What I will do next time

I’m going to make sure I get the leftover problems from this past sprint polished up and out-of-the-way.  First on the list is that cover calculation problems which I just mentioned.  After that I’ll fix up the health bar issues I mentioned before, namely them needing to point at the aiming camera when you switch to aim mode, and hiding the current player’s health bar to free up the view somewhat.

When looking up other items to add to this list I realised that it’s run surprisingly low, which mostly bug fixes and clean up work left.  The game isn’t anywhere near that complete, but I’ve neglected to spend much time thinking about what’s left.  The biggest stand outs are the following:

  • Networking – Will allow you to play the game online.  I’ve done nothing for this so far.
  • Combat – Ranged combat, now that it sort of works, needs expanding to more than just one weapon type, possibly including some form of mêlée attack too.
  • Interface – The number of giant grey buttons everywhere is starting to get a bit silly.  This needs redesigning to become something a bit more pleasing to the eye.
  • Code refactoring – I need to take a serious look at my code and refactor a lot of it and start writing some unit tests.

I’m not going to have a great deal of time over the next couple of weeks, but this time I’m sticking to a 2 week sprint and will work on fixing up the bugs mentioned earlier and see what how much I can do to make the ranged combat a bit more varied.  I’m also going to start working on refactoring and writing unit tests each sprint.  It’s work that will prove invaluable later on, but it’s not the sort of thing that I want to spend an entire sprint on at this point.  I will try to do the same thing I’ve done for my pre-tech demo releases and spend a day or two dedicated to writing up unit tests to make my code that bit more solid.

As always, you can see how my current sprint’s going on my Trello board.

Leave a comment

Posted by on June 24, 2015 in Making a Game



Making a Game – Report 10

I had a whole week this sprint where I wasn’t able to get anything done for this game, so this ended up becoming an impromptu 3 week sprint. Even with that, there was a lot that didn’t get done. But first, let’s start with what did get done.

What I did

The biggest item I worked on this sprint was to make cover meaningful. When you aim at a target it calculates how much of the other character is visible, and assigns a cover level to it, ranging from 0 to 3 (0 meaning no cover and no penalty, while 3 is total cover and cannot be targeted). I did this by placing a single quad (basically a rectangle in 3D space) through the centre of the character, and rotated it towards the shooter. I then run a number of Linecasts between the shooter’s head and a number of points on this quad, then use the number of Linecasts that make it through to get a cover percentage, which is then converted into a cover level and displayed next to the target reticle. You don’t see anything through the UI other than the cover level, but in debug mode it looks like this.

Collider problems 2

My characters now rotate to face the direction they move and shoot in, which generally makes for a nicer game appearance. They’re still very much placeholders, but if I can spend just a bit more effort to make them look nicer then I consider it worthwhile. I’ve also replaced the movement circle with something a bit smoother. After lots of experimentation I learnt that, with the shader I’m using, a cone won’t do the job after all.  I really need to use a shape with rounded edges such as a sphere, or maybe something shaped like a pizza. I did find an excellent sphere that looks perfect, but at 10Mb it seemed a high to include. I’ll have to come back to this again later, but for now it’s good enough. And finally, there’s a small button in the upper-left corner which allows you to exit the game. Testing this game entirely through the editor has taught me that there’s some issues which really don’t present themselves until you’re running it properly, which is why I missed items like this as well the cover level icon repositioning itself further away than I wanted it to. With this in mind I’m going to devote a full day to testing out a new version before I release a new tech demo. Early prototype or not, it’s a good habit to get into and there’s no point making this if it only works for the person making the game.

What I didn’t do

The biggest task I wasted far too much time on this sprint was the health bars. This seemed like a simple job at first, but eventually this ended up being a colossal time sink. At the time I couldn’t find a single good guide to do exactly what I wanted, and when I did find one they assumed you’d already watched and memorised content from some of the previous 50 articles/youtube videos. The methods I did try never seemed to work quite right, and contained problems which I’ve already learnt will cause serious memory issues later on. Eventually I discovered that the methods I was trying did not work in version 4 of Unity, but only in older versions of Unity 3… I’ve since been pointed at a new guide that covers how to do this in Unity 4, and it seems much more promising. This will take up the bulk of this next sprint.

In addition to this I’m still having some problems with the cover mechanics, which is baffling and very intermittent. Every so often when it rotates the quad to point towards the target the game seems to detect the collider as if it were pointing at a different angle. I’m not sure why it’s doing this, and if anyone fancies a go at figuring it I’ve posted the question on the official unity answers here.

Collider problems 3

With the amount of time spent on these 2 areas there were several things I didn’t even have time to look at. The simplest one was the Game Over screen when you take out the last target so that the game doesn’t just endlessly throw errors at you. I also wasn’t able to fix up the firing process to let you see if your shot hit before it moves to the next player.

What I will do next time

Due to how overloaded I was last sprint, this sprint is focused on finishing up everything I didn’t get around to doing last time, with particular attention paid to getting the health bars working. Before starting on that, I want to tidy up a couple of smaller UI issues such as adding the Game Over screen, as well as a Title screen to start the game from.  Additionally I need to show the controls within the game somehow, so I’m adding an extra screen to display this information which you’ll be able to view with a button click.  Considering how this is a feature of every single game out there I don’t expect too much trouble from this, and it seems pretty essential to have it in there before I release an updated tech demo in 2 weeks. This may seem a little light, but last sprint a lot of time was lost trying to get the health bars working, so I’m making that the one big job to concentrate on for now.

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

Leave a comment

Posted by on June 10, 2015 in Making a Game