The People’s Popular Front (End)

Not much action on the dev front for a while, partly because I had a coding thing I needed to do that was a little on the boring side, so found motivation tricky. I’ve since mustered up the chutzpah to break the back of that, but it still needs a bit more work. (It’s all about traffic control, and I’ll blog that later).

Today though I got around to playing with a bit of front end (UI), which – in the early stages at least – I usually tend to enjoy. When working in the industry I found front end was often treated as a necessary evil – nobody really wanted to do it, but it had to be done. And OK, there’s a lot of unglamorous stuff in there that is a right PITA (and that’s why it can become a chore) but it’s also a massive opportunity. This is the first thing the players will ever see of the game, so this is where you should be setting the tone, and the feel. It should be treated as an opportunity, rather than a burden.

First off I had a choice to make – I either use Unity’s UI system, or I make my own. Neither is ideal. Unity’s UI stuff seems pretty good, but I don’t know it that well, so there’s learning involved in bending it to my will, and even then I’m sure I’ll find something I want to do that it’s going to have a hissy fit about. Whereas implementing it myself involves, well, implementing it myself. I did that for my Picross game, and the front end for that is a right royal mess (I’m talking about the code, which is borderline diabolical – I think the user experience is at least adequate).

However, I’ve got loads of past projects to loot for old code, and one of those has a menu system that makes a stab at simplifying some of this stuff. It also currently uses 3D objects rather than fonts for all the letters, numbers and symbols, which brings a raft of advantages and disadvantages (you can do a lot of cool things with 3D objects, but you’re wrangling it all yourself, so things like word-wrap and letter-spacing are now your problem, rather than the system’s, and that’s just for starters). However, all I want to do is get a front end up and running fast and worry about the actual implementation later, so yoinking this and pasting it into Road Bastard is the quickest way to go.

A bit of copypasta later and I have a rudimentary front end in place (the font is what was used for the old game obviously – I’ll make a new one if I decide to keep this system). I also have a new working title – International Road Bastard. This was a fairly obvious step. The game is nice and small in scope – a vertically scrolling racing game. What it needs is variety to keep things fresh. So the idea is to make it a global rally type of thing – an International Cannonball Run perhaps. Ice stages, desert stages – a nice change of scenery and a chance to add a bit of local fauna and flora (to smash up like a bastard).

Previously all my front ends have been largely hard-coded – and that works, but starts getting unwieldy as the number of menus and sub-menus increases. This new system is implemented in the editor largely by setting up individual menu items that can either launch a sub-menu, or call a function – such as starting the game, or quitting. It’s much easier to work with for these straightforward things, but at the moment I haven’t considered the awkward bits – volume sliders, reconfiguring controls, choosing screen resolutions etc. A problem for another day… The other thing I need to do is find a way to make this localisable (is that a word?). Currently the text for the menu options is English only – I need to find a simple way of redirecting this to any number of languages. Again – a problem for another day.

So next I start thinking about look and feel, and the first thing that occurs to me is to get car sounds in there. When I start a new project (however short-lived it may turn out to be) I always copy three sound effects from an old project across to the new one – menuMove01.wav, menuSelect01.wav, and menuBack01.wav. It’s so important to get feedback on a user’s actions that these get plumbed in immediately I get a front end up and running. So replacing the beeps I’d copied across initially with a revving sound and horns gets me this, which is a start:

And then I take into consideration that the game is called Road Bastard, and the next step seems very obvious. Bear in mind this took twenty minutes tops, and is just a case of me twiddling (technical term) with the pitch and volume a tad. I like it (I’m tempted to try making it top out with angry horn beeps on top of the revs).

So, that’s where it’s at right now. I’ve no idea how much of this will make the final cut, but I had fun doing it for the most part. I do need to sort the issues with my front end system – doing it right isn’t the nicest job and will take time, but could be so useful in any future projects. However I know myself well enough by now – I’ll probably kick it in the right direction a bit, and then leave it until next time to do it properly. It’ll slowly work its way toward completion, and that’ll have to do.