2021 FEB | Game Project Update

Greetings reader! I hope 2021 is shaping up to be a good year for you so far. I had a productive January & February both with my home repairs and the game project I am working on. Lockdown has enabled me to do a lot of work on my game engine, so there’s a fair bit in this update.

Game Dev Update

In my last post, I was intending to make a start on some level mapping. You could drive around the test levels okay and collect things, but I felt I needed to extend the engine – adding in more scoring functions (spins, wheelies etc.) along with some changes to the camera. Rather than just ploughing ahead with arbitrary mapping (creating scenery for the sake of it) I wanted each section to be designed with more purpose.

I ended up looking at a bunch of similar games on YouTube and making lots of notes. I don’t want to copy an existing game – but there is value to be had in seeing how other products have evolved. One game that is close to what I am developing is Hill Climb Racing 1 & 2. That’s a great product and I love the art style.

Both versions of Hill Climb Racing seem to focus primarily on an undulating road surface, with the occasional obstacles and features. The first title seems to focus on coin collection and pickups. Whereas the second title has shifted towards multi-player racing and online events. This is a smart move and arguably more profitable (thanks to in-app purchases). The company regularly hosts events and releases promo artwork via their Twitter account. If you’re interested in vector art, check out their feed here.

Other games I looked at included Big Bang Racing and Bike Rivals. Big Bang Racing is fully 3D. The levels are definitely more puzzle-like in structure, with lots of triggered elements. That is more along the lines of what I was hoping to do, however, it looked a bit intense. As in, it was fundamentally a puzzle game that used vehicles, rather than a driving game with puzzle elements. But it was still a great looking game and you could see the developers had put lots of effort into the map design.

Bike Rivals is probably the closest game to what I’d like to do. It’s made by my favourite dev team and manages to balance fast/enjoyable tracks with complicated trigger mechanisms. I don’t know if Bike Rivals does full multi-player, but you can race against yourself with your best time run being replayed (a ‘ghost mode’). I’m pretty sure I could implement that.

I came away thinking that a lot more work needs to go into level design on paper, before doing the work in the Unity Editor. There is a temptation to start building levels ‘on the fly’ – but I think this would result in some pretty bland gameplay.

Engine Updates

Here’s a rather dry list of updates that I did in January + February. I’m really getting to grips with Unity now, although I do stumble across the occasional routine that is unexpectedly difficult to nail (like the vehicle spin detection system which took 4 attempts :)). I’ve also got a ‘mega bug’ that only exhibits itself on a specific mobile device. No idea what’s causing it, even after much digging. Anyhow, here’s the list of updates:

  • Flip/Spin check. A pop-up runs and score is added when the vehicle performs a forward or backward spin.
  • Wheelie check. A pop-up runs and score is added when the vehicle does a forward or backwards wheelie. The longer the wheelie the greater the score.
  • Jump check. A pop-up runs and score is added when the vehicle makes a long jump. The longer the jump the greater the score.
  • Dynamic vehicle shadows. This is an over-complicated system that positions shadows under each wheel that track the environment and fade as the wheel moves further away. I’m sure this can be done in a much simpler way.
  • Converting test scenery to prefabs. I’ve been through and converted test scenery to Prefabs. I’m trying to use as many prefabs as possible to keep things optimised.
  • Level Layer Sorting has been implemented. In the test level, the geometry was a mish-mash of object Z placement and sorting values. I’ve now placed every element at 0 on the Z plane and am solely using Layer Sorting to control visibility. Keeping everything on Z0 is much tidier and removes any sorting ambiguity. I wasn’t able to place the game background on Z0 however, as it’s a mesh (required so I can update the UVs to make it scroll). Meshes don’t appear to adhere to Layer Sorting, even with a Layer Sorting component attached. It’s worth noting that before I tidied up the level sorting, I wasn’t aware that Layers and Sort Layers were completely different lists 🙂 Doh!
  • Converted pop-up elements (pickups, score text etc.) to Instantiated Prefabs. I’m getting the hang of Instantiated prefabs now. There’s a fair bit of prep-work required in converting existing objects. Mostly ensuring their position data is reset to 0/0/0 and they are re-parented when necessary after creation.
  • Added animations to popups etc. (a combination of KeyFrame Animations switching to 2D RigidBody controlled animations).
  • Added area visibility system. As the game environments are likely to be big, tracking all those objects will be the stuff of nightmares. So, I’ve implemented a zoning system that turns chunks of the environment off and on as the player moves around it. It’ll make editing easier as you can focus on one area at a time. It’s not made much difference to FPS yet though (but then there’s not much in the levels :))
  • Added bone-based scenery animations. I have animated some static objects (mostly trees) so they sway. The bone system in Unity is great – although it took a while to set it up initially. Not many tutorials mention the fact that you need a SpriteSkin component adding to your object. One wasn’t automatically added when I set mine up (a bug?) One of the clearest tutorials on YouTube is by Juul1a (here). This was a big help.
  • Added Joint2D chains + objects. These swinging objects ‘push’ themselves until they get to the desired height.
  • Updated start / checkpoint / finish gfx.
  • Added water, water bubble particles and water buoyancy collision. This was my first task with the Unity Particle Editor. It’s a very complex system and took quite a bit of getting used to 🙂 You can get particles to work only in 2D with some adjustments. The water area was defined with 2D Sprite Shape. I may need to switch to something else, however, as animating the water surface might prove a bit tricky.
  • Removed co-routines from some objects. Some objects use co-routines to delay their start-up time. For example, I have huge metal crushers that need to start up in a set sequence. However, I find that co-routines don’t work particularly well if you’re turning bits of scenery on and off. So, I’ve written a basic timer system instead.
  • Added wheel dust. I’ve added dust to the wheels using particles. This took quite a long time as I was unfamiliar with the particle system. It didn’t work as I expected, particularly with regards to changing emission variables. If you change a variable in the particle system, it affects all existing particles, not just new ones. I got quite a nice effect in the end.
  • Added on/off indicators to moving platforms (these can be triggered when you drive onto them)
  • Optimised some collider types. There are LOTS of 2D collider types. I discovered that the capsule-shaped collider could replace a lot of my existing compound colliders.
  • Dynamic camera zoom. I updated the camera zoom so that it smoothly pans out when the player speeds up.
  • Level hierarchy refined. I re-organised all the level objects so they were neatly grouped. For example, all the re-spawn markers are grouped together, rather than being mixed with the level art.
  • Added custom Gizmos to the Editor. Some objects, such as the re-spawn markers are there purely to denote a trigger area – they aren’t visible. I wrote some small routine that runs in the Editor that render large crosses on these. These also make it much easier to see the level layout when zoomed out.
  • I fixed a weird bug with the pickups that resulted in some of them being collected twice.
  • I streamlined the physics colliders using Unity’s Physics Collider table – whereby you can turn off collision detections between objects.
  • I re-implemented the game background code so that it sets itself up on Play – rather than getting in the way in the Unity Level Editor. It’s also now made out of parts that can be turned off/on depending on the shape of the screen.
  • I created new background art based on SpaceX’s Spaceport in Boca Chica. It isn’t quite finished yet, but I may actually end up leaving it as it is as I don’t think the player would necessarily notice more detail.
  • I implemented music for the game. I had 3 original tracks available from a project I did with my old business partner back in 2008 – these still sound awesome 🙂
  • I implemented audio effects for the game (pickups etc.) and also figured out how to add audio effects to moving objects (that pan around in relation to the player).
  • I fixed the existing engine sound issue and replaced the sample.
  • I finally implemented the game character (as an oversized caricature head!) The head moves with the motion of the vehicle, however, the code I wrote to straighten up his head currently makes it wobble! I need to fix that.
  • I created art for a black Knight Rider TransAm (KITT) as another test vehicle. I still have to make this suitable for the game (make it super-chunky). I will shortly have 3 test vehicles, 1 original and 2 with a likeness to existing IP. Not sure if these will get used in the final game, it depends on licensing/permissions. I need to create them though, in order to show the licensor what they would be getting.
  • I fixed the Pause Button that had stopped, erm, pausing.
  • I added a 3-2-1 countdown and start delay.
  • I tidied up the control system a bit. But, I think it’ll need more work.
  • I have a working drone that flies around the level following the player. It uses 2D physics and way-points. It’s a generic system that I can use for lots of enemy objects.
  • I have implemented an enemy aiming/shooting system that fires batches of bullets at the player. Again this is a generic system that can be added to static or moving objects. When bullets hit the vehicle they generate sparks.

Sorry for the rather dry and boring list! It’s good that I list things here though as it helps me to visualize progress.

Windows 10 Update | Affinity 1.9

The artwork for this game is being created 100% using Affinity Serif products. So, I was pleased to see a major software update in February. There are lots of new features, some useful, some not so useful (for me that is – but useful to others!) If you haven’t seen the Affinity suite of creative products, get yourself over to the Affinity website and take a look. There’s everything you need to create professional video game art at a great price, and no subscriptions 🙂 [not a sponsor ;)]

Unfortunately, I haven’t been able to check out one of the best new Affinity features – GPU supported rendering. GPU supported rendering needs a fairly new version of Windows, so I get the following prompt:

However, my PC hasn’t been able to upgrade to anything past Version 10.0.18363 Build 18363. Every time I try to upgrade, I get the Blue Screen Of Death! Noooooo!!!

I have tried a lot of things to sort this out, but it looks like a clean Windows 10 install may be the only solution. I have read that a lot of people are having problems upgrading to the latest version of Windows 10. Let’s hope Microsoft manage to sort it out.

The Next Step

It’s taken longer than I expected, but I’m not far off having the engine ready to build out some levels. I have tried to focus on the essentials so far. Ironically, the game itself seems to be the easy bit! Developing the store and upgrades, and making them appear in the game seems to be the time-consuming bit!

My plan is to finish off the artwork for 3 vehicle types, each with a character. I have a YouTuber, a TV Car, and a manufacturer’s car. I’ll be attempting to talk to the original IP owners – not sure how that will go 🙂

I initially had a positive response from one of my favourite YouTubers – ‘The Handyman’ – which is why he’s featured in the game prototype. Unfortunately, I haven’t been able to maintain contact with him, so I don’t think he’ll be in the final game. Hopefully, I will have more luck with some of my other favourite ‘Tubers 🙂

Well, I’d better vanish and get some more stuff done. As usual, thanks for dropping by and taking the time to read a bit of my blog!

Stay Safe!

Comments are closed.