Friday, March 30, 2007

SOGL Update 1

Well, after a couple of days of thinking and coding, SOGL has gotten another stage towards being something useful. This latest improvement is to have a decent input system, built to be included into the Event system programmatically using boost function pointers. As such, my input system can exist entirely independently of SDL and pretty much any other part of the system. All that is required to drop it into another application is for that application to have some way of updating the state of the components. I think this is pretty good for an input system :) I will just have to see later on if it can cope with a heavy input load though.

The other nice thing about the input system is that it lets you register actions, assign keys and button presses to them (either 2 keys, 2 mouse buttons or a combination at the moment) and then query the status of the action, which will perform the necessary checks on its assigned keys. This will allow me to write a keymap config file later, arong with a loader for it, and have a configurable key configuration. I have also steered away from making the EventPump class or any of the input classes singletons, which will allow for seperate input configurations at different points in the program simply by changing which event loop or action manager is active.

The next stage is to start wrapping the OpenGL calls into either classes with some state (such as for textures) or simply overloaded function calls. Once this is done, I can start showing off some examples next to the code producing it. Expect screenshots in a week or so ;)

No comments: