Friday, March 30, 2007

My first taste of Ostrich

Had quite a nice meal this evening. My sister came up for a visit on her way up to newcastle and her, her new boyfriend and my aunt and uncle that live close by took me and anita out for a meal at a nice chinese restaurant. Very nice food all the way through. As we were leaving, my uncle looks at the menu and announces that one of the starters was ostrich meat. Kind of surprising, but the meat was quite tasty :) Slightly like beef according to Anita.

So, my first taste of ostrich.

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 ;)

Tuesday, March 27, 2007

Current Project - SOGL

Well, I'm finally kicking myself into actually doing some game development work, and I'm starting with a framework that I can use to ease my way into larger projects. I'm building the library around SDL and OpenGL and I am currently calling it SOGL (soggle) :) My current plans (probably slightly ambitious, but we will see) are to have a more polymorphic and easier syntax for OpenGL and SDL, with some callbacks for events to make an initial project setup easier with almost no boilerplate code.

I also intend to make some classes around OpenGL style objects for certain things that are almost always done in the same way, such as textures and shaders. The intention with these is to ease the code required to set them up and run them, and also some small scale optimisations internally so that requests to change textures are only carried out if the texture isn't currently active and so on :)

There is also some vague idea in my head about some nicer maths objects and classes that I can integrate into the various areas, such as vectors and matrices that can be more easily used to shift between the more efficient opengl vector commands and a nice, object oriented approach to these ideas. This may be replaced with another open source package.

Anyway, my current status is that I have a window class that can create a window, and an event pump that can take SDL events and pass them out to various callback functions as long as they are defined. My next stage is to create a nicer interface to check keys and possibly to generate a system to assign named actions to keys and key combinations.

My ultimate aim is to build an extra layer of abstraction on top of SDL and OpenGL that will allow me to not end up worrying about the mechanics of how they are doing things. I'm doing this myself rather than using an existing framework is because I feel like it :) If I get the code into a decent state then I will probably release it to anyone who is interested as well, but currently this is not really an objective. I will be building some examples and little games as and when I can though, and hopefully they will be easy to understand.