Input, Innnnnput

Part One
Today, I’m working on the Input component. I need to track previous state, current state, and allow for comparison between the two. The way the game pad works, is that a button us pressed, or it isn’t. There are no events for ‘button pressed’ or ‘button released’, so you need to compare the current state of the button to the previous state. I hooked that up, then tied the A button to a new SoundEffects class, and now the protoype plays a sound when you press the A button.

Part Two
I tried to be as hip as possible and went to a coffee shop to finish designing the base component system. I drank a big coffee, wrote in my notebook, and stared thoughfully out the window for about an hour. I want to get the component system as right as possible so it doesn’t cause me pain later on. I’m also trying to stick to edict #6 by coding what I need, and avoiding the urge to look ahead to every scenario that may pop up. There’s a balance there between too much and not enough. I’m still trying to find it.

Part Three
Once I started messing with the controller input, I realized I was going to need some kind of debug display to show controller button states. I drew a couple drafts and came up with something I kind of like, then found a nice controller button sprite sheet, and started working on the new DebugController class. Here is the sketch I’m working from. The outside rectangles at the top are the triggers and the inside ones are the shoulder buttons. The three circles in the bottom middle are the View, Xbox, and Menu buttons.

A sketch of the input debug component