Oversteer Racing: Dev blog #37 – The one where we work out why we stopped

It's been another hectic month but one of the things I have been focussing on is the reason why non-playing character (NPC) cars stop.

There are a number of reasons why an NPC might not finish the race although the commonest reason is that there is a collision between the player and the NPC or between two NPCs. At the moment the code can detect if a car has spun and attempt to recover it back onto the race track. I've now started looking at what happens if the NPC car has crashed out or, for some other reason, cannot continue. The code will now retire an NPC car if required and record the reason for the retirement. This reason can then also be displayed to the player at the end of the race. The situations under which a car should be retired are reasonably easy to define (such as a crash, out of fuel etc) but the code will also handle situation where a car has spun and, for some reason, cannot recover back to the track. One thing I now need to decide is how to represent this in the game. For example, should the cars that have retired remain at the side of the track for the rest of the race? Also, at what point should the race be red-flagged due to the number of cars remaining? It won't be a lot of fun if there's a big crash and only a couple of cars can carry on. In this case I may look at the rules for some forms of motorsport to see what the "cut-off" is.

One other thing I've been working on is finishing off a few loose ends. These have become more obvious recently due to the lack of time I've been able to put into the project. As I've been playtesting I've noticed things that were not working correctly. On investigation I've discovered that I've not completed various tasks and that's why feature 'x' wasn't working! So I've finished off some of the UI and the code to supply data to that in addition to fixing some bugs and tidying up other bits and pieces.

Next month...

I hope to finish off the code handling retirements of NPC cars.

Oversteer Racing: Dev blog #36 – The one where we go too long

I've been away for a lot of this month and, being the only person working on Oversteer Racing, that's meant that work has been slow.

Having said that I have done a bit of play testing and I discovered that NPC cars were taking on too much fuel at pit stops. This made the cars heavy once they had pitted and they were then slow. For a while I thought that there was an issue with the code that determined what the correct fuel load would be for the car to get to the end of the race.

After some debugging and testing I found that the code to determine the fuel loads was correct. The issue was actually far more simple. There was a bug that meant that NPC cars were not receiving the correct information for the race length at the start of the race. At the pit stop the cars were then fuelling up for the number of laps they were expecting but this wasn't the number of laps remaining in the race. It was a simple fix but a bug that took a little time to track down.

Next month...

I hope to do some work on handling retirements for NPC cars.

Oversteer Racing: Dev blog #35 – The one where cars block the pit lane

It's been another busy month but I did manage to spend some time fixing a few bugs in Oversteer Racing.

One of the things I discovered was that the game settings were not being used in the race. So, if I set the damage setting on then the car damage wasn't affected in race. This was also the case with the other settings that players could change before the race. This was relatively easy to fix once I'd noticed it.

Another issue I discovered was that NPC cars would some times crash in the pit lane. These crashes would then block the pit lane and prevent other cars from pitting. These crashes were caused by the pit lane limiter not being set correctly for NPC cars. As a result these cars were entering the pits too fast, missing the turn in point for their pit box and blocking the pit lane.

Next month...

I hope to do some more play testing and bug fixing.

Oversteer Racing: Dev blog #34 – The one where we tie up a few loose ends

It's been a fairly busy month but I have managed to work on Oversteer Racing, so that's a significant step forward from previous months ;-)

As it's been a while since I could put a reasonable amount of time in on the game I've been getting back up to speed by fixing a few minor bugs and tying up some loose ends. Most of this work has still been focused on the end of the race and making sure the data is correct. I've made sure that the race summary uses the correct driver and team names (as set by the player) and also made sure that the code correctly determines the time gaps between the cars.

I've also fixed a few minor bugs where data was being misrecorded (incorrect pit stop numbers, DNFs etc) and also fixed a bug that meant that smoke wasn't being shown when an engine failure occurred. I've also been working my way through all the settings scenes and making sure those settings are reflected in the game (i.e. if you switch on advanced handling then that is toggled on in the game).

Next month...

I hope to finish off all the work on the code to handle the end of the race and correctly record the results and update player stats etc.

Oversteer Racing: Dev blog #33 – The one where we get the move done and fix things

As mentioned last month I had to spend some time moving my website over to a new host this month. As I was moving the site I took the opportunity to try and simplify things a bit. The old site used WordPress and that's great but it requires some effort to maintain (software updates, database backups etc). As I needed to move the website anyway I chose to stop using WordPress and use Jekyll (a static site builder instead). This should pay back in terms of time but offer similar functionality.

I have managed to do some work on Oversteer Racing over the last few weeks too. I'm still working on the code to handle the end of the race. I've made good progress and the code is handling most of the scenarios I'd previously outlined for the end of the race. It still needs a lot more polish but it's been good to make some progress again.

Next month...

Further work on the end-game code and I also want to make sure that, if users change the names of drivers and teams, these are reflected in the end-game scenes.

Oversteer Racing: Dev blog #32 – The one where we plan a move

It's been a difficult month and I'm really struggling to think of any tasks I've completed on Oversteer Racing. I've been away which dramatically reduced the amount of time I could spend on the game and I've also had some other tasks that have demanded my attention.

One of the issues is that the web host I use for this site (and a number of others I run) has been bought out by GoDaddy. For a variety of reasons I'm not keen to be a customer of GoDaddy (feel free to check out their page on Wikipedia as that covers a number of the issues). As a result I've had to start looking for a new host. That process has also resulted in me reviewing a number of the things that demand my attention to see if I can reduce my time commitment by changing how I do things. The idea is that by reducing some of the complexity of the sites I support I could get a 'pay back' in terms of time. Quite a few of the websites I run rely on a database (or many) and some other software such as WordPress (for example). This has a knock on in terms of finding good web hosts and supporting the sites as I need to make sure the sites are up-to-date (in terms of software updates) and also to take automated backups etc.

In an attempt to reduce the amount of time I spend looking after websites I've decided to convert some of my sites to using Jekyll (which is a static site builder). I've decided to use this site as a test site as it's small. The idea being that I can build the site in a Vagrant VM and check in the site files to Git and then just deploy them to a simple, static site (something that's offered by many hosts).

So, sorry for the lack of progress or a conventional dev blog but it's one of those times where other tasks take priority.

Next month...

Hopefully I'll have moved this site, will be well on the way to moving the others and will then have more time to work on Oversteer Racing.

Oversteer Racing: Dev blog #31 – The one where it's never ending

Unfortunately it's been a really busy month for a variety of reasons. I've found it very difficult to find regular blocks of time to work on Oversteer Racing and so progress has been very slow.

When I have been able to work on the game I've been looking at the end of the race and producing the race summary. I have code to track the race finishers and retirements. The main issue is dealing with cars that are yet to finish the race and, even more tricky, predicting the race result if the player retires before the end.

I did also find time to fix a slightly annoying issue that's been present for some time. When the player car turns, the front wheels of the car rotate to reflect the turning of the steering wheel, this was not the case for the rival cars. If you look closely in any of the game play videos to date you can see that the rival cars steer straight ahead even when turning. I have now fixed this so that the wheels on the rival car rotate correctly too.

Next month...

I'll continue working on the code to handle the end of a race.

Oversteer Racing: Dev blog #30 – The one where we look at the end of the race

February has been another busy month because I've needed to work on my fantasy F1 competition and haven't been able to spend much time on Oversteer Racing. In the time I have managed to find I've been working on the end of the race. On the face of it this might seem a pretty simple task, show the positions of the cars and add up championship points, but it's actually a lot more tricky than it might first seem.

The main complication around the end of the race is determining the positions of the cars. There are two scenarios to consider:

  1. The player completes the race normally - In this situation the finishing position of the player is known, as is the position of all the cars that finished before the player did. However, although we allow the race to run for a few seconds after the player crosses the line we cannot be sure all the cars have finished (unless the player is last). As not all cars will have finished then we need to look at the cars that are still running whilst also accounting for others that might've retired and determine the complete finishing order. In the simplest case we could just assume that the remaining cars finish in the same order as they are currently running but should the result always be predictable in that case?
  2. The player retires or crashes - In this situation determining the final race order is much more tricky. It may be that some cars have crashed out but there will always be some cars that are still running. If none of the cars have pitted or all of the running cars have completed their final pit stops then determining the order is relatively easy (it's a similar task as the first scenario). That said, if the race is still in its early stages then we should include some degree of unpredictability as the finishing order is unlikely to remain the same as the current running order. If the race is part way through and some cars have pitted but others have not then the current running order when the player retired is not representative of what the running order should be once all the strategies have played out. This is a more complicated scenario to model as we must also take into account cars on different strategies. In order to do this we need to work out what cars are out of position, determine if that is due to a scheduled stop or due to a stop for a replacement wing etc and then work out the expected running order once all of the cars have pitted. We then need to predict the final result and this may also have an unpredictable element to it (i.e. just because a car will be leading after the pit stops doesn't mean it will always win the race).

So, in summary, not only is there the practical task of storing race data there is also a task to model/predict the result of the race in some cases. At the moment I'm just focusing on the simplest case since even that includes some element of result modelling and, once that's done, I'll look at the more complicated situation.

Next month...

I'll continue working on the code to handle the end of a race.

Oversteer Racing: Dev blog #29 – The one where this time every year we do something else

It's always the same this time of year as I need to spend time on some other projects/tasks. For example, I need to get boring stuff done like tax returns and company accounts etc but I also need to work on my fantasy F1 competition. Given that the F1 season starts in March I need to make sure the competition launches at the beginning of March at the latest. As a result I tend to have to spend a lot of January and February working on other things and not working on Oversteer Racing I'm afraid.

Next month...

Probably another month with only a limited amount of time to work on Oversteer Racing.

Oversteer Racing: Dev blog #28 – The one where we review the last season (year)

I thought it might be helpful to list out some of the tasks that I've completed this year as a way of reflecting on how the game has developed. There have been a lot of little changes but the main pieces of work have been:-

  • Race order - keeping track of the order of the cars. This is a pretty fundamental thing for a racing game
  • Bug fixing - I've uncovered and fixed quite a lot of bugs and little issues throughout the year
  • AI car pit stops - the AI cars can now decide when to make a pit stop, enter the pits, drive to their 'box', stop for the correct amount of time and then exit the pits. Adding this to the game is a significant piece of work and it now brings a strategic aspect to the racing.
  • Car avoidance - I spent a lot (it feels like months and months) working on code to get the AI cars to avoid other cars. This is now working reasonably well. It may, like a lot of the game, need a bit more tweaking as I add more features and play test the game but it's functional for now.
  • Defensive driving - the last task completed this year was to add code allowing AI drivers to make a decision to take a defensive line when being followed by another car.

Why is it taking so long?

There's a simple answer to this… Oversteer Racing is a hobby project for my spare time. A lot of things affect the amount of spare time I have and, on top of that, a lot of things affect how much energy I have in my spare time to work on the game. I'll be the first to admit that I haven't been able to put in as much time as I'd hoped this year... and I really can't promise that the situation will change for 2019. I'll do my best but hobby projects have to fit around other things.

One game dev blog I regularly read is the blog by Jake Birkett from Grey Alien Games. Early in 2018 Jake wrote a blog post called "You are spending too long making your game" - it's a great read (like all of Jake's blog posts) but it hit home a bit. I've been making Oversteer Racing for some time now and still have a long way to go... but it's taking too long. Obviously I'm not a full time game dev and that brings a whole host of challenges and, as should be clear, I'm not able to work on it full time or expect a return that matches the time put in. With that in mind I plan to start 2019 with a review of my plans for the game and to see what things I can cut from the initial release. There are definitely some nice to haves but I can always add these later so that I can get the game out as soon as I can given the constraints I have.