Linked Questions

12 votes
2 answers
2k views

Good practices in screen states management? [duplicate]

I wonder what are the best ways to organize different screens in a game? I am thinking of it like this: Inheriting a base State class, and overriding update and render methods, to handle the current ...
2 votes
3 answers
3k views

Game state sharing data

A game is a set of Game States. Each Game State contains game objects, may be list, may be scene graph or any other data structure. We can use Game States as Game Locations, too. How do you share ...
3 votes
1 answer
394 views

How to handle complex inputs in 2D platform game?

I am trying to add keyboard control for my character in 2D platform game with JavaScript. The character can walk, dash and jump. Here is my current code: ...
0 votes
3 answers
5k views

C++ GameState management [closed]

I have been attempting to make a game engine in C++ and have come across the dilemma of game state management. I have done a lot of research and found numerous ways of accomplishing from game engine ...
25 votes
4 answers
34k views

Game state management techniques?

First off, I'm not referring to scene management; I'm defining game state loosely as any sort of state in a game which has implications about whether or not user input should be enabled, or if certain ...
1 vote
1 answer
133 views

What exactly is a 'set of states'?

Whilst looking into game-oriented applications of programming patterns I discovered a question on this site which suggests that a 'set of states' is superior to a 'stack of states' but does not ...
4 votes
1 answer
1k views

Should UI be part of the game-loop?

I can't really find a good answer to this anywhere, I have never worked on games in a proffessional environment and I am wondering; Do these games render their UI in the main game-loop? That is, do ...
0 votes
0 answers
582 views

How to implement a stack of game states in C++ [duplicate]

I'm new to C++ and as a college proyect I'm building a 2D platformer with some classmates, I recently read that it's a good idea to have a stack of gamestates instead of a single global variable with ...
1 vote
1 answer
826 views

Game State / Screen Management

What's the best way to handle game states / screens? My problem is this: PlayGameScreen adds a new InventoryGameScreen to the game during it's update. This immediately adds InventoryGameScreen to ...
2 votes
1 answer
381 views

How to organize timeline in a Flash project?

I am starting a new Flash game and I was wondering if there is a better way to organize the timeline of the project. In my previous games I define a keyframe for each possible status of the game (...
5 votes
2 answers
8k views

How should I structure my menu / game loop?

I'm trying to decide on how to structure my main game loop - every example I've seen of the game loop looks a bit like this: ...
3 votes
1 answer
2k views

Handling game states for Android

Currently developing a game for Android. I went through a tutorial to get sprites, loop, etc. up and running, and it all works fine. The way it is currently set up is that Main creates a canvas, the ...
5 votes
3 answers
2k views

Deal with mini states in game

Hi :) I want to ask what is the best way to deal with "mini-states" in game? For example I making game like Simcity, i can build buildings, roads, rails, or I can change something in economy. I am ...
12 votes
3 answers
4k views

What is the best way to make a main menu system?

I know that's it's easy to make buttons that highlight when you move your mouse over them, but when it comes to sub-menus I'm kinda stuck. Anyone got some tips on the best way to have a main menu with ...