Real simple one this fortnight… A GUI!
Life has been pretty busy, but I’ve focussed on getting this GUI working, so here’s a little demo:
In the background, this is what’s happening:
- The engine starts up and loads all the other managers (about 10 of them at the moment)
- Logging, options and file I/O load up the basics.
- The Event Manager is set up and begins to get ready to process game events.
- The Ogre3D graphics manager reads in defaults and gets the drivers and graphics card ready.
- The GUI Manager stomps on in and begins to load in images, fonts, layouts and other resources. It synchronizes its setup with the operating system’s (mouse location and picture, for example)
- The Game State Manager gets given the reins and it sets up the splashscreen interface (which is really just an image, fades in and out and some input to skip through it).
- It next progresses to the Main Menu state, which brings in the background plate and sets that up properly. It sets up the buttons and lays them out in the right place. It renders all the fonts to textures for fast access on the GPU. It then sets up all the animations required (fade-in and hover animations)
- I click the Quit button (the only really functioning button at the moment) which then requests a shutdown from the game app and shuts everything down gracefully.
There’s a lot going on in the background for such a simple demo, but it’s required for a game engine.
I feel confident that I understand how CEGUI works now and I can get a basic, useful bunch of things working. The demo is far from polished or what I want it to look like in the future, but it allowed me to see how I’d go with custom fonts and imagery.
Now I think it’s time to commit all that code, and then move over to actual gameplay code. For fast iteration I’m hoping my graphics-free setup will work well – instead of doing all the GUI work, I’ll just have the game spit out stuff to a text file. Once that’s in a good state, I can weld the two halves together and have a bit of a prototype for The Day After. I don’t know if I can get it done by the end of the year, but it’s possible and my main focus.
The Short and Sweet
What I’ve done this fortnight:
- Got the GUI working! Woot!
- Fixed countless bugs with the resource managers, engine boot up sequence and input.
What I’m working on for the next fortnight:
- The actual gameplay loop and the scaffolding for scenes.