Evil Bug, Good Progress

posted in WISP
Published May 09, 2007
Advertisement
I did some refactoring today. And created a bug that took far too long to track down, and amounted to one single line that I forgot to add/copy during the refactoring. Typical.

But it seems to be working now. I attempted to make it easier to make states, by creating a couple of base states from which other states could inherit. One is just a basic state, has a base essence state with some things I plan on using in just about all states, as well as handles activating and deactivating a state, such as when a gameplay state goes into the background while the main menu is active. The other base state expands on this, and adds some standard GUI stuff, and is a basic menu state. All full-screen menus can inherit from this.

I also scrapped the single Process() call on states, and went back to two functions, PreProcess() and PostProcess(). It was getting way too messy otherwise. The PreProcess() primarily gets a list of components that need processing. These components are processed by the main loop, and then PostProcess() is called on the active state, which does anything it needs to in response to the processed components, and optionally sets the new state. I did it this time so that I still don't need boost::enable_shared_from_this, however, which is good.

In the way of progress, rather than the semi-progress of refactoring, I got the CEGUI component working pretty well. It followed the previous prototype's pattern pretty much, but I tweaked it here and there, and am happy with the changes.

I got the main menu actually displaying with CEGUI as well. I also added the options menu, not that it provides any options yet. I'm still mostly just copying from the old prototype, which did very little. Perhaps tomorrow (rather than my hoped-for last night) I'll have all the four menus available.
Previous Entry Slower
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

Advertisement