Saturday 1 May 2010

1 May 2010 - Back in control

Something just fell into place today - with a financial contribution and some help from the UDK forums. The control system is now customised, in a crude fashion, to allow a player to use an XBox 360 Gamepad with the game, and to play it in a similar fashion to a 'real' racing game.

This is a big deal for me. It's a REALLY big deal.

Interaction is everything. If the player can't interact with the game properly, it might as well be a rendered screenshot or an animated sequence. Okay, so a steering wheel would be far more immersive but a game pad almost makes it into a game for me. A game lacking in gameplay elements maybe, but to be able to drive around my project work using a similar control system to a game like Forza Motorsport 3 is such an amazing feeling.

A 360 Pad for Windows (not a standard 360 console pad) was required because it needs to be installed on the PC - and fortunately, the UDK is already set up to fully support the gamepad. The controls needed to be changed for it to behave like a typical current-gen racing game which looked to be a complex coding job. Asking on the UDK forums seemed to confirm that notion, but it was far simpler than I thought. In fact, it was a copy and paste job - and when tested, it worked wonderfully. It's all in one file - UTInput.ini:

Three commands were changed to give the control system I wanted

The Left and Right trigger buttons on a 360 gamepad are 'mapped' to firing weapons by default in the UDK. I looked for the lines of script that were responsible for player movement (which are the W and S keys on the PC keyboard) , copied and pasted those commands over the Trigger Button commands. A quick test in-game proved that this was all that was necessary to sort the control system out - taking up just 5 minutes of my time! The commands highlighted in green (above) are the ones that were changed in order to get this to work.

An additional bonus to this is that up to now, the car still had a 'default' weapon from the UDK that a player could fire in-game, which wasn't something I wanted. By replacing the fire button with an accelerator function, i've solved both the movement and the weapon issue in one go. While I was at it, I also disabled the ability to get in and out of the car, as I don't want players to be able to move around on foot. By changing the command to a nonsensical one (highlighted in red, above) the button is disabled and made useless. No longer do I have to worry about a player accidentally jumping out of the car in-game!

So, all in all, a very satisfying day so far. I'm backing everything up before something bad happens!

In other work-related news, the Maxton itself is nearing completion - which is what i've spent most of my time on this week. Admittedly I wish i'd done this a LONG time ago, because quite frankly I could have, but it's getting done at least. Using multiple materials has definately enabled the car to look a lot better texture-wise. I decided to start with the read textures of the engine and chassis - because they are what the player will see most of, and I didn't want to have to rush them in case time was short (well, it ALWAYS is, but you know what I mean).

I can possibly have some semi-transparent glass for the windows too - which won't be seen much in-game but it'll look much better on the still images of the steamcar. All that's left to do is the cab, brasswork and windows and the Maxton will finally be complete!

If this is what you see while operating the Maxton-Muycrosse Steamcar, you're doing it wrong

There's still a monumental amount of work to do but as far as the basic criteria are concerned, almost everything has been touched upon. I won't be able to produce a finished, polished game for the final hand-in but that was never the intention. As long as I can provide a decent overview or demonstration of the basic game elements i'll be more than happy.

1 comment:

  1. Hey, love it Rich. Interesting vehicles, dark sepia landscapes - even the gradients give me that feeling of the Welsh coalmining claustrophobic industrial nightmare (period of prosperity???). I think it is excellent (F gave me preview a while back, but this is so much better). Where/what is Igford??? BTW, Lerida here! - Sorry - comment doesn't give option of facebook so you can see who is commenting.

    ReplyDelete