Thursday 10 February 2011

Joystick inputs and content scripts

Short entry as I'm a bit busy.

Two things planned for this week, character animation export and more campaign coding. Both of which haven't happened at all. Instead I ended up revisiting input functions and audio scripts.

My original script which went through several drafts used a fair amount of UK/NATO vernacular, the opening mission/introduction was turned into a tutorial. New characters were added for mini story arcs and a third pilot character was added for Chinook/AI callouts.

We scripted way more than necessary and even if we can't get all the parts recorded they will as text messages. Working on the details of how elements (or chalks) talk to each other helps crystallize the AI logic. It wasn't until I received  a departure flow-chat that it dawned on me that this might require a bit more work on the event system to deal with all situations. Here's a reduced version you can't read but shows realistic radio traffic is complex. Will be great if we can pull that off, if not for the first release, maybe later.

First draft ATC departure comms protocol (shrunk)
Input functions were re-written at the end of Nov and I found some parts unfinished. It uses a cross platform library but I wanted to be able to plug and unplug joystick hardware and not have any problems. So all attached devices are identified by their OEM strings and assigned a virtual ID. All actions assigned to a particular joystick uses its virtualID and at game launch (or profile load) the actual device ID is allocated if available.

I'd included some fields to shape response curves etc. which I hadn't finished. What I want is a nice 'S' shaped response with a flat middle I can adjust the slope. Just adding that now.

x^2.28

Changing input is easily done if you don't mind editing an XML document. A gui will need to be sorted later for sure. Typical entry might be...

<control name="GAME_SCREENSHOT" type="key" key="CTRL F12" hit="1" />

And it will accept any combination of devices or multiple keys for the same action. And they are also game mode specific. There are separate control schemes for foot, flight, freecam. By organising controls into groups and passing the current game mode to the input functions, the search tree is narrowed down and you have some flexibility.

Also we took some iPhone interface experience and came up with a new way of navigating complex menus using a 360 controller. It's visually engaging and will work for joystick coolie hats too, 100% better than stabbing numbers on a keyboard.

I needed to finish up these new input functions before starting on the character animation. That's your toon walking, running, shooting, sitting, sidestepping. Which is going to be something of an exploration in animation blending with this particular 3D engine. One could try to blend animation with IK (ala Mechwarrior 2) however we're not that heavy a ground combat game. simple artist driven animation will suffice here.

Breaking down what animations are required in Combat-Helo: We're going to restrict ourselves to walking, running, sidestep, death, sitting and shooting. We'll be making use of 3DSMax for exporting individual animations from our US Marine model. Additional skeleton animations can be added later if we keep to using data driven animation for the blending.

2 comments:

  1. This looks like a fantastic project, can't wait to buy a copy! Until then I'll just have to spread the word to anyone who'll listen...

    ReplyDelete
  2. It's sure that you've a second buyer here, since the long time i waiting a new serious helo sim..

    Your game will counter-balance the (too much) no brain casual games we see these years.

    Keep it up !

    ReplyDelete