How are you guys handling menu type GUIs in your games?

Previous topic - Next topic

Falstaff

So far my game's prototype just consists of the core gameplay experience, which I've been having fun tweaking and adding to. Now I'm thinking of adding an overall "game state", for managing things like the main menu / options / game mode selection, etc. I'll also be needing to implement a decent GUI to do this. I'm curious what sort of approach you guys have found easiest to work with in your games.

Some questions I have are: how do you manage the different buttons or 'hot spots' in the screen..? I noticed something about a lib called "DDGUI", and have started reviewing the docs. Is this what you guys use?  For example for a level select screen, we could have several places on the background that are clickable. Also if it matters my main target is going to be android/iphone.

Thanks!

MrTAToad

I use DDgui.  IMGui is good, but needs an on-screen keyboard added...

bigtunacan

GLBasic has 2 GUI APIs, DDGUI and an implementation of TKinter.
I've played with both a little and got the impression that DDGUI is more mature.  That said, I feel both are more suited to a traditional window type app rather than games.  In my case I am using DDGUI for a level editor, not in any of my games.

I havent tried this yet, but there is a post here for an immediate mode GUI more targeted for in game menus.

http://www.glbasic.com/forum/index.php?topic=5431.0

Personally, I tend to roll my own for in game, a simple system which is all most games need can be completed in a couple of days.

bigtunacan

@MrTaToad,

Any chance you could post a pic?

MrTAToad


bigtunacan

From one of your in game interfaces. I was just wondering if you were using standard look and feel, or overriding with custom graphics, etc. No biggie either way.

MrTAToad

Its all standard stuff - I dont change the look and feel of DDgui :)



[attachment deleted by admin]

ampos

I noticed that DDGui is a ugly interface, not suited for games, at least.

Most of my projects use just buttons.

I have a function createbutton()

Code (glbasic) Select
function createbutton: id,text$,x,y,w,h
   strecthsprite spr_button,x,y,w,h
   cprint(text$,x+(w/2),y)                    //prints text centered
   createzone(id,x,y,w,h)                    //check my zones lib for hotspot creations
endfunction


And here a example of my button/interface

Buttons:

http://www.glbasic.com/forum/index.php?action=dlattach;topic=6711.0;attach=3750
http://www.glbasic.com/forum/index.php?action=dlattach;topic=6711.0;attach=3752

Sliders:

http://cdn.downloads.palm.com/public/9078/es/images/4/L/04.jpg

If you need keyboard input, you have also a lib IMPUT for virtual keyboard on all devices. Just redraw the sprite image if you want.

bigtunacan


Falstaff

Thanks for the suggestions! I liked the features of DDGUI but wasn't sure if it'd be worth the effort to try to re-skin the look.. I don't really need much from the interface specifically, probably mostly just different sprites representing buttons for the various menus. I was already considering rolling my own minimalistic code.

I'll also look into that IM GUI.

Ampos do you have a link for your zones lib you mentioned? Sounds really neat :)

edit: found it!

Ian Price

I hate all the GUI interfaces, so I always use my own, specially created for each and every game that needs one. One size NEVER fits all. I really hate iOS games that use the iOS GUI menus - they stand out unnecessarily, taking you out of that game "zone."
I came. I saw. I played.

MrTAToad

I use DDgui so that text will fit properly for the different languages that I usually support...

Crivens

Yeah, I just roll my own. Pre-defined interfaces always look generic and stand out a mile (a bit like in the old days when someone released a game using inbuilt fonts and mouse pointers in STOS and the like).

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

Kitty Hello

DDGui is not ugly. You can change the looks totally with the callbacks. Also, you can add user defined widgets (current method with prototypes can do this even easier now!!)
See the attached image for some standard DDgui stuff.

I really don't understand why you don't like DDgui all. I put so much effort into it and everyone complains but I heard no reasons that I can grab and change.

[attachment deleted by admin]