FatNick Makes a Game Part 6

(Part 5)

I don’t know about you but if there’s one thing I hate, it’s being ill. After all, aside from feeling like crap, you don’t have either the strength or the inclination to carry on playing around with your funky little side projects…like mucking around with Unity.

Before my enforced break, thing’s hadn’t been going overly well. Though the release of Unity 5 should have been a positive thing, all of the positive aspects of the upgrade (such as the widely expanded export options) were slightly dwarfed by the fact that they managed to COMPLETELY BREAK THE PHYSICS ENGINE –  particuarly when it came to wheels. This left me either continuing on in a redundant version, or having to rebuild pretty much everything I’d done up to this point from scratch. As you’d expect, neither choice was particularly appealing.

As I hadn’t come that far with my game, however, I decided to upgrade to Unity 5 . By massively rejigging my acceleration and braking units, I’ve managed to get the car to move again and i’ll stick with that for now. If I wait long enough and work on everything else in the mean time, I’m hoping a revision to the wheel collider component will turn up sooner or later. Cunning.

The downside is that, for the moment, my spritely MR2 now handles like an articulated lorry with shoddy brakes: Given time, it can accelerate to ridiculous speeds, but the brakes don’t really do anything and it’s quite unstable. Mind you, that’s quite an interesting mechanic come to think of it…

As tinkering with the car was a no no, then, I decided to work on everything else. Having started with an Outrun-style of game in mind, I came to the conclusion that this might be a little ambitious for a first project, so I’ve scaled back to an ‘endless’ driver game based around a single long stretch of highway.

I still intend to have changing backgrounds and scenery though, so to allow for super-sneaky switching, I’ve decided to have the end of my road enclosed in a tunnel. On reaching the end of the tunnel, the car will be teleported back to the beginning again, giving the impression of exiting the tunnel in a different place. Ha!

It turns out that both of these were relatively simple to achieve, My tunnel model placeholder was a simple large cylinder, placed onto the track to form a semi circle. Not only is this a straightforward solution, but the sealed opaque ends have a certain old school charm about them.


make game

The green circle is the area the catchment area for the teleport


Building the teleporter was easy peasy too – its nothing more than an empty game object with an invisible colider in it. With the collider set up, activating it was just a matter of ticking the ‘is trigger’ box and writing a couple of lines to move my object code to another unseen colider at the beginning of the track.

make game

My unseen teleport destination. Cunning, eh?


make game

Teleport in action!


So, with the teleport in place, I had the makings of a basic, ensless game. Each trip down the highway was massively too short however (about 10 seconds,) so I resolved this by shoving in a few extra sections of  straight in the middle.

What was missing now, however, was the presence of lots of other vehicles. In the modern world, this is an easy fix: To the royalty-free model banks batman! A couple of clicks later, and my highway is PACKED.

Make Game

Models on display!


So, things are looking up aren’t they? Unfortunately all is not 100% rosy: my vehicle scripts aren’t moving any of my new arrivals, so will definitely need some tinkering with, and my teleport script is a great start but isn’t quite up to scratch: Every vehicle that enters the teleport departs on the same z axis, which spoils the allusion some what. Still, tinkering with these sort of things is what it’s all about, right? On to part 7!

2 Replies to “FatNick Makes a Game Part 6”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.