Oversteer Racing: Dev blog #12 – The one where we set the pace

This month has been slightly better than the previous two and I've been able to put a bit more time in on Oversteer Racing.

Teaching rivals how to drive

A lot of this month teaching the rival cars how to drive. I've spent quite a lot of time planning how to implement the code allowing rival cars to race around the track. In the end I went with a waypoint system but allowing rival cars to follow different routes on the track. This means that they can move into a defensive position for a corner or pull out to over take another car etc. The same system will also allow the cars to navigate through the pit lane.

At present their lap times are within 0.5-1s of my best time around the test track and that's pretty good for testing. As the rival cars are not currently aware of other cars on track they are difficult to pass as they will, with another car alongside, turn in on them when going through a corner. This does result in some pretty spectacular crashes. Until the rival cars are aware of other cars it's not clear how close their lap times should be to that of the player to create the best racing experience. With that in mind, the rival cars are "good enough" at the moment. Something that was important to me is that the rival cars are controlled in the same way as the player car so that the racing is as fair as possible - there are no "cheats" for the AI cars.

Now that we have rival cars on track I've also been able to start work on code to track race position and this will lead on to showing race position in the user interface etc.

Two cars racing on track - alpha screenshot

Two cars racing on track - alpha screenshot

Next month

Next month I'll carry on working on the code to determine race position (it's not as easy as you might think). I'll also be working on code to allow AI cars to recover from spins or trips into the gravel traps etc. If there's time I also plan to look at race strategy for AI cars.

Oversteer Racing: Dev blog #11 – The one where the rivals turn up

Last month was another difficult month as I've been very busy and not able to put in as much time on Oversteer Racing as I'd have liked. That said I did manage to do some work on the user interface and also to work on improving the code that tracks performance (lap times etc) during the race.

The opposition

I did manage to do a bit of work on "the opposition" and some research on how best to tackle the artificial intelligence (AI) required to get the cars to compete reasonably realistically. How the other cars race against the player and amongst themselves is key, in my opinion, to a good racing game. I've been reading a few articles and doing some background research on a variety of topics including AI, neural nets, rules of various motorsports and racing technique.

Oversteer Racing screenshot showing two cars on track

Next month

My current plan is to spend a bit of time working on various ideas for how to control the rival cars. I also need to do some work on stats collecting for each car so that I can track the progress of the race and, ideally, present some graphs after the race. I don't plan to create any of the graphs in the coming months but I plan to make some changes to allow me to record more telemetry from the cars.

Oversteer Racing: Dev blog #10 - The one where it feels like the brakes are stuck on

This month has been pretty difficult. I've really struggled to find time to work on the game. That's largely due to lots of other things needing my attention and reducing the amount of free time I have. When I do find a bit of free time I've generally been pretty tired so I've not been as productive as I'd hoped. It's all just part of the ups and downs of creating things in your spare time but it can be frustrating.

Functional UI

I have carried on working on a functional version of the user interface for the game... I say "functional" because it's definitely not pretty. However, under the hood it's doing what I want and later on I'll revisit the scenes and work on the aesthetics. To be honest I find working with the UI system in Unity hard work. Obviously it's a lot better than it used to be but stuff like validation with regex or displaying error messages etc still seems harder than it should be.

Thinking about live ops

I've been doing a bit of reading about "live ops" in games and whilst I think that might be a step too far for me at the moment it's a really interesting topic. Given that my "day job" mainly involves server-side coding that side of "live ops" doesn't concern me. However, I want to get the core of the game finished before I even think about things like "live ops".

Next month...

Right, I really am going to park the UI stuff and get back to some game play work next month. Now that I've some teams and driver names to play with I'll be tackling end-game scenarios and possibly the two championships (drivers' and constructors').

Oversteer Racing: Dev blog #9 – The one where we see what's on the menu

This month has been interesting as I've been mainly thinking about some of the user interface issues and work associated with allowing users to customise the game.

How big will the game be?

As an indie dev, and the sole person working on the game, the size of the game is an important factor as it defines the amount of work I want/need to do and this also affects when the game will be finished. I can't afford for the amount of work to increase because this means the game will take longer to complete. That said, I need to be able to provide enough content for players and hopefully some additional features that people might be willing to pay for.

As a result, I've spent some time considering how much content I want to create. My current plans are to create a game with five teams, each with two drivers (making ten cars in total), and nine tracks although not all tracks may feature in the free version of the game. I feel that this is achievable and should also provide a significant challenge in the races.

Making money

Making games is a lot of hard work and I'd like to help fund future work by generating a bit of money from Oversteer Racing. I plan for the game to be free and to charge for some additional content. Things may change but some features people may pay for include:

  • Extra tracks
  • Weather effects
  • Ability to change driver and team names
  • Functionality to change the design of the cars

Next month...

I want to finish off some of the menu scenes (at least in terms of functionality if not design) and will then focus on some of the code for managing races. This is likely to include work on handling the end of races either through the number of laps being completed or through retirement.

Oversteer Racing: Dev blog #8 – The one where we set the scene

This month has been another really busy month and I've not been able to spend as much time on Oversteer Racing as I'd have liked. One of the biggest (if not the biggest) issues when you're working on your own on a project is, if you're busy or tired and you can't face working on that project in your spare time then nothing gets done. The lack of progress can then get quite frustrating. Anyway, I have made some changes so there has been some progress.

Pit stop animation

I did spend a bit more time on animating the pit stops and also produced an animated gif of a pit stop for #ScreenshotSaturday

Oversteer Racing pit stop animation

Code fix-ups

In recent versions of Unity there have been changes to some of the code associated with determining if levels have loaded and also the playing of particles. These changes mean that some of the code I've written previously results in warnings when run. So, during the last month I've taken time to re-write this code to use the newer way of doing things in Unity.

Setting the scene... many scenes

I've been creating scenes to allow players to configure the game and customise some elements of the game (such as driver/team names). My intention is that some of the customisation options will only be available if a player pays for the functionality (as an in-app purchase). This decision isn't set in stone but just how I'm currently thinking. Ideally players will be able to play a lot of the game for free but may have to pay for extra tracks and the ability to customise the game. I'm only part way through this work but have made a reasonable start.

Creating artwork

I've also been thinking about the design of the game and what artwork I'll need to create. To help me with this I've been photographing some toy cars to try and work out what the best angles are and the types of illustration I'll need to create. I'm not that good at illustration/design etc so taking photographs has helped me try out ideas and work on an art style.

Next month...

I will be continuing to work on game scenes and I might try adding some weather effect or sound.

Oversteer Racing: Dev blog #7 – The one where we go there and back again

It's been a really busy month as I've been working on my other racing project - the online fantasy motor racing competition that I've been running for the last 17 years. Oversteer Racing has had to take a bit of a back seat while I launched the competition for this year. However, I have been working on a few tasks...

There and back again

I have been trying out the animation tool in Unity to provide a representation of the pit crew during a pit stop. Unlike some forms of motorsport the crew won't be in the pit lane when the car enters but will surround the car at the beginning of the pit stop and retreat at the end of the stop. This will provide a bit more interest to the player towards the end of the stop.

Tyre sets

Over the last month I've also been thinking about managing tyre sets at pit stops. The current system is that four sets of tyres are allocated to each car for the race and the use of these tyres is tracked. At the pit stop, the tyres with the least amount of usage will be fitted to the car (if the player chooses to change tyres).

Next month...

I will be creating some of the other game scenes and adding some sound.

Oversteer Racing: Dev blog #6 - The one where I take control

I've been fairly busy with other things this month so haven't made as much progress as I'd like. However, I have continued making progress on the pit stops. I've now introduced the concept of tyre sets and cars have a limited number of sets. This means that, if making many pit stops, there isn't a never ending supply of tyres for the car. The plan is, if all the sets have been used, the car is fitted with the used set that has the most grip remaining.

Race control and race metadata

Within the game I have the concept of "race control". My intention is that this replicates some of the functions performed by its real life equivalent (tracking car progress, fastest laps and so on) but it's also handling some more more unusual data. For example, at a pit stop the cars can be refuelled but the amount of fuel being added is measured in laps rather than a unit of volume (e.g. litres). As the amount of fuel used per lap will differ between tracks I've created some code to allow me to work out the average fuel usage per lap. This information is then stored as race metadata and is used at pit stops to work out the actual quantity of fuel to be added to the car.

Pit stop animation

I've also been doing some research into Unity's animation system as I want to animate the pit crew during the pit stop. The crew won't be seen working but I want them to come out of the pit garage, surround the car and then return at the end of the stop.

Next month...

Finish off the remaining tasks for pit stops and then work on some of the screens for the game. If there's time I'll start work on sound.

Oversteer Racing: Dev blog #5 - The one where I change things

After the somewhat slow progress I made over Christmas I've managed to get a few things done over the last month. This has been a big encouragement as some parts of the game are taking shape now.

Stop.... Go!

This month I managed to do a fair bit of work on pit stops and these are now functioning as I'd like, albeit without a beautiful user interface at this stage.

As the car enters the pit box a measure of how accurately you've positioned the car is taken. The game is then paused and a menu shown giving you choices for the stop. Players can choose how much fuel they want and whether to change tyres and/or fix damage to the car. These choices affect how long the pit stop will be (shown in second but also represented by a yellow bar), for example, the more fuel you take on the longer the car will be stationary. Also, your accuracy in entering the pit box affects how long the stop takes too. The more accurately you position the car then the closer the pit stop duration will be to the minimum time needed to take on that amount of fuel etc. If you do not position the car well then the stop will take longer. This, hopefully, reflects real life where the mechanics would have to adjust their position and the stop would take longer.

While you select the amount of fuel you want etc the game is paused. Once you press "Go" then the game will be unpaused and the work carried out on the car. During this time your competitors will be carrying on around the track but your car will still be in the pits. The yellow progress bar will decrease showing the remaining time for your stop. Once the bar disappears the car is released and you can exit the pit lane.

To demonstrate some of this functionality I've create a video dev blog:

Next month...

I'll be finishing off pit stops and also working on race control and the additional data I'll need to store during the race.

Oversteer Racing: Dev blog #4 - The one where the holidays get in the way

One of the main issues with developing a game in your spare time is that finding that time can be difficult. There are many competing concerns for your time and, during the year, you find yourself with more or less time than you expected... almost always less.

Over the holiday period I had hoped to be able to get my head down a bit and dedicate some time to writing code on Oversteer Racing but unfortunately that hasn't happened. That said, I have spent some time working on areas that are a little easier to fit into short, irregular periods of time than coding can be.

Scope and planning

I try and keep a plan of outstanding work in Pivotal Tracker so I spent some time adding new tasks to the backlog and arranging them into a sensible order as some items are dependent on others. This has helped me work out roughly how much more development there is on Oversteer Racing. With my current work rate the burn down predicts a beta release in November. I plan to release before this though, and I think the burn down has been affected by the lack of work I've been able to do over Christmas, but it's good to see progress mapped out like this.

Oversteer Racing burn down chart


I've also been able to do a bit of research for the game both in terms of motorsport and games development. I did find time to read "Surviving The App Store" which was a really interesting read and gave me lots of things to think about. I thoroughly recommend it... although it does suggest that working on a long term project like Oversteer Racing might not be the best route to success.

Ugly UI

The other work I have been able to do is start creating a very ugly UI for the game. At this stage I'm more focussed on functionality than appearance so it's pretty basic but a good start. One thing I still need to decide on is if I'm going to use Unity's PlayPrefs or serialise the data into something like JSON. I can see pros/cons for both but I'm mainly concerned that the amount of data I'll be storing will mean that PlayerPrefs will be quite cumbersome.

Next month...

I'll be working on pit stops and a bit more of the UI.

Oversteer Racing: Dev blog #3 – The one where I stop and start

This dev blog is quite aptly named as I had planned to work on pit stops this month. However, what's actually happened is that I've had to spend time working on other things and not been able to put much time in on Oversteer Racing, so it really has been stop/start. That said, I've outlined my (little) progress below and talked about my plans anyway.

Pit stops

I want strategy and pit stops to be an important part of the game. Pit stops will allow you to refuel, change tyres and, in some cases, fix damage. Managing pit stops generates some interesting issues. For example, do you allow players to reverse in the pit lane - this is a move that, in most forms of motorsports, will see a competitor disqualified. However, if I don't allow reversing then is there a risk that players make such a mess up of a pit stop that they have to do another lap... and will that be fun?

The code I've currently got working detects if a car is in a pit box, works out if it's the correct car in the correct box and also estimates how well the car is positioned. My plan is that, the position of the car will affect the length of time the car is stationary. So, when the player enters the pit box, the game halts (for the player and the opposition cars) and the player can then select how much fuel they want and whether they want to change tyres and fix damage. The changes they select affect the duration of the pit stop and this is also affected by how well positioned they are in the pit box. So, two cars pitting and making the same changes may be stationary for different amounts of time depending on their positioning in the pit box. This reflects real life as a car that stops short/long causes the pit crew to move and the stop takes longer.

Once the player has selected their changes then the game restarts and the opposition cars will carry on around the track. The player car will remain stationary until the work has been completed and will then be released.

Language support

As I've started work on functionality I've had to start adding support for multiple languages. To do this I've been using the popular I2 Localization plugin from the Unity asset store. I've not finalised the list of languages that the game will support at release but it's worth building in support from the start so I don't have to retrofit this later.

Next month...

I'll be working on the menu screens for the pit stop, holding/releasing the car and carrying on with adding language support.