Saturday 19 January 2008

Re-Visiting My Engine

The above screenshot is a pleasant suprise to me.

It's now the early hours of Sunday and I'm doing a quick stock take of my exisiting engine code. I'm suprised to see that I have so far cobbled together a rather nice set of functionality. It's even more suprising, because the functionality is largely based on the tutorials and samples that are on the creators club site.

Upon firing up my engine for the first time in months. I was greeted with a fully functional menu system. You can use an XBox 360 controller (I had an old wired one that came with my core system) to move up and down the menu. Each item highlights and changes colour when selected.

I have implemented this system by using a series of self contained screen objects. Each screen is responsible for it's own content. They can utilise any of the classes of the engine to provide the visual or functional items.

I had created an interface that forces each screen to provide a known set of functions, namely load, unload, draw and update. This allows me to use delegates if necessary and also has allowed me to have a screen manager that simply loads or unloads each screen as necessary. The entire system relies on some global managers being initialised before any screens are drawn though. These sub-systems (as I'm now calling them) are the input manager, gui manager, the screen manager, the content manager and of course the game loop itself.

I currently have three screens implemented. The first is the obligatory kudos screen. This is the one that contains the logo images and does the usual skip to next logo, fade in/out and a simply ping sound effect.

The next screen creates a menu that links all of the actual game parts together. These are the continue functionality, the start new game functionality (which effectively just resets all states for the game to their defaults), the options functionality and the quit. So far only quit and start do anything useful.

All of this is a lot more than I thought I had. It means that I now have to start thinking about what I need to do next. All I know for the moment is that the game will have a mission based system, where the player (and later their squad of hand picked helpers) will go out and perform various tasks. To this end, I will need at least the following:-

* Mission generator.

* Map generator.

I know that I like the sound of having the game generate random levels. The only issue being that the levels need to remain the same throughout a single game, even if the player has sved and quit in the mean time.

Well, it's getting late and I need to sleep too!

No comments: