Skip to main content
gamedev.net
🔒 Locked

Game Menu Techniques...

Started by IllMind Jul 13, 2003 at 1:38 AM 4 replies 1k views
Original Post
IllMind
IllMind
Hello everyone. I have been playing around with c# and managed dx9 to learn something new. My goal is to recreate pong, with all kinds of flashy effects. Im thinking along the lines of "Pong goes to hell" with lava background and a particle system to make the ball look blazing. Anyway''s to get to the point... Im at a stage where i want to implement a menu into the game. In my past efforts to create (much more ambitious) games, I would set up a state system where each state had its own init, update/render, and shutdown functions which were controled in the main game loop. This worked ok and i would have a menu state, a game state, and an options state. The problem was I didnt really like that design. So i was wondering how some of you design you main menu''s and ingame menu''s.
Holy Fuzz
Holy Fuzz
"States" seem to be the way most people do it. I have a seperate state for each menu screen, each state having its own game loop. I can''t think of an easier way to do it.
Grusifixi
Grusifixi
Object oriented menusystem. It can be also thinked as statefull system just without switch/case.
Code is everything. Open your code.
BeamMeUp
BeamMeUp
I had a front menu system that used a function per menu, each with its own game loop - that worked well at first, but it was a pain in the neck to make lots of submenus.

My in-game menu had a system that managed animation, selection etc. on its own; you just needed to tell it about each item in the menu. When a menu item was chosen, I had a massive switch statement (with more switches inside) to decide what to do about it. I don''t think that''s the best way, but it worked alright. It saved rewriting a lot of code, and made it more versatile.

Now I think the best way would be the object oriented menu system, as mentioned above.
-----------C++ is the language of the not-so-ancients.Learn to speak it well.BeamMeUp
shurcool
shurcool
just a thought... how about a windowed menu system? ie. u see a main menu window. u press options, and a new window pops up. there, u can adjust whatever u want. u press a little x (after moving the window around for fun), and u''re back to the main menu window.

sounds like a lot of fun 2 implement for me!

in the end, u''ll be kinda rewriting windows, only without all the low-level code (ie. how to write stuff to hdd, etc.). it''s like 5in1 dreams come true!

something like this, if u like visual examples.

---
shurcool
wwdev

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.