Who Turned Out The Lights?

I only managed a couple of hours work today, but they were pretty good ones. As mentioned yesterday, the empty spaces off to the sides of the road were annoying me, so the first thing to do was knock up a couple of quick bits of scenery – one for either side. As with the rest of the game so far, these are all made with Unity’s primitive shapes right now, because otherwise I’d have to finally get around to learning how to use Blender to create 3D objects (I’ve spent 20-odd years using 3DS Max, but can’t justify the expense right now so need to make the change, but it’s a very reluctant one. Also, I hate learning new software – I genuinely find it immensely frustrating to have powerful tools but not the knowledge to use them – and it’s one of the few areas in life where I lack any degree of patience. It’s why I generally learn the bare minimum I need to get by with any software package, and use those tools exclusively – even if I’m aware there are better ways to tackle a job, but would need to learn how to use them.)

Anyhow, after maybe quarter of an hour of playing with capsules and cylinders and cubes I’ve got something serviceable, and I think it helps a lot. The grass verges make me think the car should shudder when travelling over them, and kick up dust. It’s also a good excuse to add camera shake, so these get added to the list of things to do. All non-essential, but all will add to the feel of the game, which is all I’m after right now.

Next I decided to address the horn, changing it from a short beep to a loopable sound, allowing the player to sound properly angry if they wish. I suggested yesterday that maybe the horn would intimidate the car in front – I’m wondering now if making that a function of time would work too – so some drivers panic immediately, while others need a longer blast (possibly over-complicating things, but probably worth looking into). I recently got a bunch of sound effects in a Humble Bundle, so I looked through these and found several car horns, but none of them looped. So I picked one I liked, opened it in Audacity and cut out the middle section and tried playing it looped. Huge clicking sound when it looped, so I nibbled a bit off the end and tried again. And again. And again. Then I tried nibbling a bit of the start. And again, and again. After whittling away at it for ages I finally had a (very short) loop that wasn’t too bad – it still clicks a bit, and will need replacing, but it will do for now. Audio is one of my least favourite jobs (which is a shame, because it has such a huge impact on a game).

Next up I decided to look at adding night time to the mix (this will also pave the way for all manner of colour schemes). A little tinkering with the light settings helped me find decent values to make a start, so I then coded a routine to fade between different sets of light settings at the press of a button (for now). That worked a treat – could hardly see a thing, so next up I strapped a couple of spotlights to the front of the player’s car, and – crikey – for something so cobbled together it actually looks rather neat. As you can see in the video below – night falls like a dropped brick right now – I’ll slow that down later. Next up I added tail lights to all the cars, and then when night falls the game manager script tells all the cars to put their lights on. The important thing here is that the cars each generate a random delay before they do this, to prevent all the lights coming on at the same time as if a switch had been pushed. Pleased with this.

Whilst rummaging around in the RenderSettings to adjust the lighting values I noticed the settings for fog too – I hadn’t thought of this, but fog would work a treat. So next up I spent a bit of time monkeying around with fog values – again putting them on a button press for ease of testing. I’ve soon got a real pea-souper. It’s not right, but it has definite potential:

So, next I think what happens if I mix it with night time, and this is what you get, which again could be really nice:

This is part of why it’s so very hard to finish a game. At this end of development, it’s almost like the game makes itself. It’s like it runs away, and you’re just trying to keep up with it, new ideas coming thick and fast, and you cobbling stuff together in minutes and getting cool results. It’s almost intoxicating. At the other end of development, you end up desperately trying to drag the bloody thing across the finish line, and it’s really reluctant to go. Every little thing seems to take an age to finally put to bed, and whilst what you’re working on is probably essential, you know nobody will even notice it. At some point the balance tips from that rush of ideas to that slog of just trying to kick the thing out the door, and at that point starting something new and interesting is always going to look much more appealing.

Anyway, at this point I decide to make a build to grab a video, and realise that the fog doesn’t show up in a build. A quick Google shows this is a known issue – fog works in the editor, but not in the final build. I try a few of the suggested workarounds, but none of them work for me. I soon get bored of this, so turn to the Unity Asset Store and find a few snazzy-looking foggy assets – and that’s where I’m at now – trying to decide whether to buy some fog I didn’t know I needed 20 minutes ago. They do look very good, so I’m very tempted (who knew you could make money selling fog?).

Tomorrow I’ll probably decide about the fog, and maybe look at adding camera shake and a few particle effects. After that I’m probably either going to have to bite the bullet and start using Blender to get some proper geometry in there as I search for an art style, or I’m going to have to look at getting the traffic working properly (which is perhaps the biggest unknown right now). Or I might put these off, and mess around with a few more cosmetic touches, because that’s much more fun.

Is This Thing On?

Hello. Long time no see. With a week off work I have a little time to tinker with potential new projects, and so I thought I’d also look at firing up this blog again – hopefully I can stick with it this time.

 

So I decided to sift through all my old prototypes looking for something I fancied revisiting – and came across the rather uninspringly named “DrivingGame” (I’ve mentioned before that the first thing you need for a new project, even before you’ve drawn a pixel or written a line of code, is a name for your game, and I’ve long-since given up trying to be clever with these).

Regardless, I want to do something nice and quick, and this feels about right. It was originally meant to be a very simple game of dodging traffic, with the player not having full control of the car – just the ability to switch lanes, and accelerate and brake. It was loosely based on a spiteful old arcade game that I have a fondness for – Road Fighter:

 

This first attempt never went anywhere – perhaps because it felt a bit “appy”. But firing it up again, I rather liked the look of it, and remembering the game it was based on, I came up with a new idea and a new working title – Road Bastard! This isn’t just a working title – this is pretty much my entire game design document right now. Enable the player to be a “road bastard” (whatever one of those is), and reward them for it.

 

A word on game design documents. When I worked as a Creative Manager, and then as a Game Designer, game design documents were things I came to hate with a passion. You had to write one for every project, detailing the story, and the characters, and the gameplay mechanics, and every other aspect of the game to win a contract with a publisher initially, and that’s fine and understandable. But the moment you win that contract the thing should be thrown in the bin and never mentioned again. It isn’t though. It’s maintained throughout the duration of the project to record the current state of the game. But because the game will almost certainly deviate from the design document within weeks of the start of development (at most) and continue to do so throughout its development, the game design document then spends the entire project chasing the current state of the game, needing to be updated every time a new change is made. It’s a colossal waste of time for a document that I’m pretty sure never gets read by anyone other than the poor sod who has to maintain it.

 

Anyhow, the first thing to do to make this better was to rip out the old control method and put in a new one, allowing proper freedom of movement. First up this meant just getting the car to move across the road, rather than snapping from lane to lane. This was an improvement, but not enough. So then I just added the cosmetic touch of rotating the car as it moved from side to side, and that immediately felt so much better with the car weaving, rather than sliding, around (so often these tiny touches are critical). Obviously, this is made entirely out of placeholders so far, but it has potential, I think:

 

As you can hear in the video, the car has a horn – if you’re making a car game then you can’t add the horn early enough, IMO. Maybe wait until it can move and steer first, but there’s no harm in doing it first. It doesn’t matter if you don’t plan on making it affect the gameplay at all – there is no downside to adding a horn. In the case of this game I’m thinking of perhaps making it intimidate the car ahead of you – maybe make them act erratically – that could be funny.

 

So, that’s the current state of play. Next up, I want to work on some “low hanging fruit” to push it towards where I want it to be. I’ll add in some scenery to fill in the gaps off to the side because they’re bugging me. I also want to add a night-time mode. Whilst working on this I remembered some of the very early arcade driving games like Night Driver, and I think a brutally dark colour scheme would work well here (whilst the player should be a bastard, the game will probably be a bastard right back at them). Also – and this is very important – I’ll look at replacing the current horn sound (beep) with an angrier looping sound, so that the player can hold it down for as long as they want – that’s what a “road bastard” would want.