Menus, game states confusion.

Started by
2 comments, last by stonemetal 16 years, 3 months ago
I was wondering what the general thing to do is with menus. I've completed my basic game engine, made a few levels. Now I want to make a menu. How would you do this? Is it worth making a gui class that's really simple, or use an existing one? How should I decide what to draw/process? Using a state variable? Thanks!
OpensoftFreeware and open source reviews. Join and help us review!Can't find that freeware? We'll find it for you!
Advertisement
You can use the state design pattern. Here's a short article about it.

Regarding the actual rendering of the menu, I guess it depends on what you want. Do you want to program a GUI for this, or do you prefer to spend you time on other things? For many people it's the latter, in which case they just use an existing library. It will save you time and the library will be more robust and feature rich than the (probably simple and limited) solution you'll come up with.
Thanks, that's just what I need!
What is the most simple and lightweight GUI for OpenGL/freeglut?
OpensoftFreeware and open source reviews. Join and help us review!Can't find that freeware? We'll find it for you!
I haven't used freeglut but if it hold true to its glut roots it offers right click menus out of the box.

This topic is closed to new replies.

Advertisement