• entries
    732
  • comments
    1562
  • views
    491988

Sue sells sea shells by the sea shore. Capitalist

Sign in to follow this  
Ravuya

106 views

Today I was working on the GUI system for Stick Soldiers 3. Like the one in Novarunner, it's based around the IMGUI principle and some previous code I had written not so long ago.

The big benefit of having IMGUI is, of course, reduced infrastructure. You're effectively adopting a more functional approach to GUI development than one with side effects (although side effects certainly do crop up and are a pain to resolve occasionally).

SimmerD is using IMGUI for his game, and check out the mind-boggling complexity of his editor and other stuff. Believe me: the framework code behind that is dead stupid simple. Oops, I guess I leaked his secret. [wink]

If you haven't looked at IMGUI, I recommend you do. It greatly simplifies the amount of work you have to do, and makes for some relatively simple controls and management code. Remember, we're making games, not full scale applications. We don't need a complex messaging system like the one in X11, Aqua or Windows. I'd be surprised if stuff like Flash and other "light" toolkits of the sort aren't doing a similar thing under the hood -- this just seems too good to be keeping to games alone.

What's left for this week? Well, probably some updates on Novarunner, but they'll mostly be backend work. I'm definitely going to try for getting weapons firing, but don't expect an inventory interface to go with it. I'll probably just bolt the weapons onto the ship for the first run-through.

Now for blessed sleep.
Sign in to follow this  


4 Comments


Recommended Comments

Last time I looked at "immediate mode guis" it was basically one C programmer's way of saying "I don't need any of this OO bollocks" and just a way that allowed him to hack things together really quickly. It didn't look like it'd scale very well for anything non-trivial (ie. more than one person working on it) and a nightmare to debug.

Share this comment


Link to comment
Yeah, that's pretty much it.

My position on it is that you can still make it pretty robust using C-style gubbins and it's easy to wrap with OO stuff and still get a lot of the benefits.

If you've got massive, massive GUI stuff, then yeah, think about doing it the "right" way, but if it's a couple of tabs and buttons like SS3's menus and my game's menus, then shit, why not do it the easy way?

My big thing is that it works without message passing or functors. You can just throw the cause and effect together in the same function and make it nice and clear.

Share this comment


Link to comment
Oh I'm sure it's a workable approach, especially when 90% of hobby games don't need anything more fancy than static text and buttons. But I don't see why it needs a fancy name and lots of pimping like it's something new and exciting, when basically it's the just pre-OO way of doing things.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now