Best global menu templates
Blitz3D Forums/Blitz3D Programming/Best global menu templates
| ||
Can anyone recommend a template for a game menu? Most games have the same basic choices for a root menu with Play, Options, and Quit at a mininum and some other pretty common ones as well, such as Create Player. Within Options there will typically be Audio, Video, Graphics, Controls and possibly others. What I'm wondering is whether there is/are some code snippets somewhere that becomes a skeleton for everything but the gameplay itself. I'd love to see some discussion here about favorite methods as well; for example, the use of a Menu custom type would change everything, but might be too cumbersome? (Note that I am not talking here about GUIs; Putting the menu on the screen is not the issue. I'm more interested in what's under the surface.) If there is another post on this feel free to point me to it; "game" and "menu" are hard terms to search on! :) Thanks in advance. |
| ||
There is an interesting thread (somewhere on this site) that discusses the way in which a menu tab/button is activated. ie: Most amature attempts result in "If mouseover, do something" where as a professional approach is to activate a menu on mouse button release. All good software does this.....good place to start? |
| ||
Im working on a more generic menu system at the moment... It's Custom Type based, and unfortunately at the moment is pretty empty, as Im actually adding to it as-I-go. but here's what I have so far: It should be fairly self-explanatory as to how it works. I'll get back to you here once it's more complete too :) Function OpenMenu(sMenuTitle$) If (GetMenuExists(sMenuTitle)) Return Else CreateNewMenu(sMenuTitle) EndIf Return End Function Function GetMenuExists(sMenu$) For CheckMenu.Menu = Each Menu If CheckMenu\sTitle=sMenuTitle Return End If Next Return False End Function Function CreateNewMenu(sNewName$) NewMenu.Menu=New Menu NewMenu\sTitle=sNewName Select sNewName Case "Main Menu" NewMenu\nOptions=3 NewOptions.MenuOptions=New MenuOptions End Select newOptions\sParentMenu=sMenuTitle End Function Type Menu Field sTitle$ Field nOptions End Type Type MenuOptions Field sParentMenu$ Field sName$ Field nOptionFunctionRef Field sText Field bCheck Field fPercent# Field X Field Y Field Width Field Height End Type |
| ||
Ooops.. sorry for double post - Just found this: [url=http://www.blitzbasic.com/Community/posts.php?topic=78842] Devil GUI[/url] It's really simple to use, and very comprehensive. Looks good too :) |
| ||
Great responses so far folks. I didn't mention it before but I'm using sprite candy. In theory this doesn't matter since that's a display technology and should be independent of the underlying "choices" methodology. It should be possible to adapt it as necessary. I'll check out your suggestions; keep adding more ideas! Thanks! -Pete |