Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 723025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:03:34+00:00 2026-05-14T06:03:34+00:00

I have not done any large game development projects, only messed around with little

  • 0

I have not done any large game development projects, only messed around with little toy projects. However, I never found an intuitive answer to a specific design question. Namely, how are different types/states of UI modeled in games? E.g. how is a menu represented? How is it different from a “game world” state (let’s use an FPS as an example). How is an overlaid menu on top of a “game world” modeled?

Let’s imagine the main loop of a game. Where do the game states come into play? It it a simple case-by-case approach?

if (menu.IsEnabled) menu.Process(elapsedTime);
if (world.IsEnabled) world.Process(elapsedTime);

if (menu.IsVisible) menu.Draw();
if (world.IsVisible) world.Draw();

Or are menu and world represented somewhere in a different logic layer and not represented at this level? (E.g. a menu is just another high-level entity like e.g. player input or enemy manager, equal to all others)

foreach (var entity in game.HighLevelEntities) entity.Process(elapsedTime);
foreach (var entity in game.HighLevelEntities) entity.Draw(elapsedTime);

Are there well-known design patterns for this? Come to think of it, I don’t know any game-specific design patterns – I assume there are others, as well? Please tell me about them.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T06:03:34+00:00Added an answer on May 14, 2026 at 6:03 am

    A menu in a game is pretty much the same as a menu in any application – it’s a collection of GUI elements with behaviours attached to them. This applies whether you have a distinct menu state or not.

    There are several reasons why games tend to have distinct menu states. One is because game menus date back to before we had usable GUI libraries for games and most of these menus would just be collections of sprites and some hard-coded routines to handle the mouse clicks. Another is because games often require very different input handling during the game to what is needed during the menu and therefore it’s often easier to have totally separate routines handling these.

    But really, there’s little need for a distinct menu game state. Your game typically has a GUI, with some elements visible, some invisible. To bring up a menu you simply create or display the elements you need. You may also need to pause the game at that point. (Or not, if it’s networked play.) If there’s no game in progress yet, no matter. Typically, your system will be a much less simplified version of this:

    // update
    world.update()
    gui.update()
    
    // render
    world.render3D()
    world.render2D_overlays()
    gui.render()
    

    The last 2 stages could even be combined, if your GUI system is adequate.

    Although I don’t always follow my own advice, I think there’s rarely a good reason to have a distinct top-level state machine for a game. There are a small number of objects which exist in a small number of permutations and you just have to update and render them all.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have experience in php but not with large scale projects. i am looking
I have done jQuery and Ajax, but I am not able to get the
I have not had to mess with mailto links much. However I now need
Note - I have not delved very deeply into Apple's iPhone SDK yet. However,
I’ve been working on a few small scale Access projects that have turned large
Do you guys have some tips to make any large table, with 500+ rows,
I have not used generics much and so cannot figure out if it is
I have not seen much support for Grails to develop facebook apps.I was just
I have not been able to find a way to cancel/terminate asynchronous read operation
I have not used Windows Vista. I knew that many APIs have been changed/deprecated

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.