Wednesday, September 22, 2010

Keyboard Controls

Up till now the controller code was pretty shoddy - hacked together to get gamepad input working so I could work on more interesting code. A lack of a gamepad has forced me to have another go at it, which is a good thing in the long run.

The controller code is now a lot more modular, which also meant changing some other parts of the code base that used it. Everything is cleaner, which made it easy to slot in keyboard controls as a fallback when a gamepad isn't present.

"Shouldn't a computer game have keyboard controls by default?", you might ask. Well, Mechanized may be a computer game, but I'm writing it with the main goal to be a release on Xbox Live Arcade and/or to be played in a living room with gamepads like a console game. Also, the gameplay really doesn't lend itself well to keyboard controls.

More back-end code changes are likely to come as I'll be developing on my laptop while traveling. It's a wee Inspiron and has trouble getting past 10 FPS, so graphical elements are tough to test on it.

No comments:

Post a Comment