Tuesday, August 10, 2010

Week Five / Day One

Once again, back to your regularly scheduled program.

Full steam ahead today, as things are finally starting to shape up, at least on the backend. I now have a working 'menu' system in place. The application holds various states, and depending on the current state, the renderer, gamestate, and application engines all perform different tasks. The initial state is just 'blank', which each engine is set to while everything initializes. Once the renderer is loaded and ready to draw, each is thrown into an 'intro' state, where you would put studio information and such at the beginning of a game. This than leads into the main menu. Now granted, for the time being the menu is just basic primitives. But you can click on the buttons, move to the level select screen and back, and get into the test level through the menus. There is quite a bit of hard coded hacks in the background, so to see what is actually going on is a little nasty, but it is very clean from the user perspective.

In regards to the untidiness I started to consider how the menus could be done differently. Much the same as I plan to have my level editor create basic plaintext versions of the levels which are then loaded into the game, a much more abstract menu, or 'scene' object with an associated scene editor could be used for the UI. Each scene would have a background rendering (perhaps a static image, or maybe the engine running in realtime), buttons, and actions tied to those buttons. While this would be much cleaner and 1000x easier to expand, the simplicity of my current project's needs combined with the time needed to rewrite this engine to handle that sort of UI system isn't worth it. Normally this isn't something I agree with doing, but I suppose you can't have/build every feature you want, especially on your first project. Just more ideas for the second though, I suppose.

Textures are still looming over me, as I'm getting to the point where they are going to be necessary for the game to start looking like a real game, and not a simplistic example. I also need to be able to render font, as I want to procedurally draw all the text in the game, rather than have create static images for each block. For those interested, here is the menu:

No comments:

Post a Comment