Generally used in correlation with a state machine.

learn more… | top users | synonyms (1)

5
votes
5answers
584 views

C++: Game State Logic other than switch statement?

Executive summary Are there any good tutorials on Game State FSMs, particularly OOP/OOD-based and not switch-statement-based? Summary Is there a practical process for creating a game state engine ...
0
votes
2answers
97 views

Synchronizing mob states in online multiplayer game

I'm developing an exploration-based platform game in which from the start there were plans about including local multiplayer support, but recently I've been considering an online multiplayer mode, ...
1
vote
1answer
34 views

How do I change rasterizer state properly?

To set the rasterizer state I have to ID3D11Device::CreateRasterizerState() and then ID3D11DeviceContext::RSSetState. And then I should ID3D11RasterizerState::Release() it, right? How about when I ...
4
votes
2answers
403 views

Deferred contexts and inheriting state from the immediate context

I took my first stab at using deferred contexts in DirectX 11 today. Basically, I created my deferred context using CreateDeferredContext() and then drew a simple triangle strip with it. Early on in ...
1
vote
1answer
45 views

What is the correct way to seperate (react) view from state?

I would like to know the correct implementation to declare game logic and view logic: I see 3 ways of implementing this: 1.Storing (eg writing preprocessing to store the change to a property) ...
0
votes
1answer
91 views

Entity's FSM and exposing internals of the entity

I'm trying to implement FSM according to Programming Game AI by Example, it is a pretty standard and straightforward FSM that goes like similarly to this (some stuff omitted and translated from C++ to ...
8
votes
4answers
190 views

Sending state diffs (deltas) and unreliable connections

We're building a realtime multiplayer game, in which each player is responsible for reporting its state on every iteration of the game loop. The state updates are broadcasted using unreliable UDP. ...
0
votes
1answer
275 views

How to manage input state in Unity3D?

In Unity3D how do I manage input among many components, especially in relation to "blocking" input messages to certain components? To make my question clear, an example: Component 1: Input Manager ...
4
votes
2answers
766 views

Android: how do I switch between game scenes in a game? Any tutorials?

I am trying to create a simple game using the Android SDK without using AndEngine (or any other game engine). I have plenty of experience designing games from the past, but I'm having lots of trouble ...
17
votes
1answer
6k views

Behaviour tree code example?

http://altdevblogaday.org/2011/02/24/introduction-to-behavior-trees/ Obviously the most interesting article I found on this website. What do you think about it ? It lacks some code example, don't ...
0
votes
1answer
116 views

How to handle Gameflow and Progression

Iam building my own 2D Engine and i try to handle the Progression of my Character. For Example when the Player got an special Item an Door opens or when he talks with someone and got an Item the ...
0
votes
1answer
87 views

watching for changes in object state

I'd like to know what others do to watch for changes in object states while the game is running. Say you have an object and that object has a timer. The timer completes. What is the best way to know ...
2
votes
1answer
99 views

Using an FSM, how do you clean up state related attributes that may be used from several states?

I'm making a game that plays a bit like Diablo, but you can harvest resources like in an RTS. I have the following states in my FSM: IdleState, ApproachingTargetCoordinateState, ...
2
votes
1answer
403 views

Fuzzy State Logic or Finite State Machine for AI

My question is regarding the use of fuzzy state logic and finite state machine with AI. What I would like to know is what the key benefits are for both and also some examples of situations where you ...
-2
votes
2answers
143 views

Rendering structure [closed]

my question is "What is the best way to structure rendering code". Is it better to make a class with a render function that iterates through all game objects based on there name or type and have no ...
0
votes
0answers
100 views

inheritance and state machine with flyweight pattern

I everyone, i'm working on an indie game and i'm stuck with two problems I have many similar units on screen so i decided to implement the flightWeight pattern so there is intrinsic and extrinsic ...
11
votes
2answers
3k views

Game state and input handling in component-based entity systems

My question is: How can I handle game states in my entity system, without resorting to keeping a stack of game state objects around? So the design of my entity system means that when an entity needs ...
7
votes
2answers
1k views

How should I structure my turn based engine to allow flexibility for players/AI and observation?

I've just started making a Turn Based Strategy engine in GameMaker's GML language... And I was cruising along nicely until it came time to handle the turn cycle, and determining who is controlling ...
4
votes
1answer
142 views

Game State and Configuration via Events

Often "singletons" are problematic for testing, so with my next game I'm trying my best to avoid them. But there is bunch of data (configuration or game state information) that different parts of my ...
7
votes
4answers
575 views

Simultaneous game states

I think I understand the basic idea behind a Finite State Machine-based game loop. But I'm trying to write a little game in which the same object can simultaneously be in multiple, independent states. ...
5
votes
1answer
266 views

Design to handle logic within a state

I am designing a new game and I am trying out the entity-component design where entities are comprised of groups of components holding a bunch of attributes. I also have a stack of 'game states' and ...
1
vote
1answer
57 views

Resynchronize game state on reconnect

Suppose in a multiplayer first person shooter game that a player loses their connection. On reconnect they need to synchronize with the current game state. But while they are getting a snapshot of the ...
28
votes
10answers
4k views

Alternative to Game State System?

As far as I can tell, most games have some sort of "game state system" which switches between the different game states; these might be things like "Intro", "MainMenu", "CharacterSelect", "Loading", ...
41
votes
10answers
9k views

Game State 'Stack'?

I was thinking about how to implement game states into my game. The main things I want for it are: Semi-transparent top states-being able to see through a pause menu to the game behind Something ...
2
votes
2answers
940 views

Game State Management using Lua

I want to be able to (only) define game states using Lua script, but I'm not sure how I should do it. Here's what I have in mind currently: For each state, I will create a .lua file that contains a ...
4
votes
2answers
402 views

Game state management: the buck doesn't stop “here” soon enough

I realize there are already many Q&As on this site about GameState/GameScreen management, state machines, state stacks, etc. This question is meant as a follow-up: Suppose hypothetically I ...
1
vote
1answer
87 views

Drawing sprites messes up my model in XNA4

I have a model which draws correctly in XNA4. However if I try to add a background image (or any sprite), the rendering of my model is messed up. There are two problems with the rendering model is ...
13
votes
2answers
1k views

Design of a turn-based game where actions have side-effects

I am writing a computer version of the game Dominion. It is a turn-based card game where action cards, treasure cards, and victory point cards are accumulated into a player's personal deck. I have the ...
1
vote
2answers
180 views

persistence of objects between game states

What are the possible ways of sharing different objects between game states and how do other engines implement such system? Lets say a game has a couple of states (a menu state and a game state for ...
3
votes
1answer
535 views

Change the tilemap shown on stage in Flixel

I am building a simple platformer using Flixel, beginning with the source code from Flixel creator's EZPlatformer . I would like to adjust the level's tilemap when the player sprite enters/overlaps ...
2
votes
1answer
57 views

extrapolating object state based on updates

I have a networked multi-user collaborative application. To maintain a consistent virtual world, I send updates for objects from a master peer to a guest peer. The update state contains x,y,z ...
13
votes
2answers
2k views

Data-driven animation states

EDIT: To clarify what exactly my question is: is this a good way to handle animations / animation state in a game engine with the eye on content creation / management? What are the flaws in doing it ...
6
votes
3answers
1k views

How to update entity states and animations in a component-based game

I'm trying to design a component-based entity system for learning purposes (and later use on some games) and I'm having some troubles when it comes to updating entity states. I don't want to have an ...
8
votes
2answers
722 views

State changes in entities or components

I'm having some trouble figuring how to deal with state management in my entities. I don't have trouble with Game state management, like pause and menus, since these are not handled as an entity ...
1
vote
4answers
273 views

Knowing state of game in real time

I'm trying to code a tic tac toe game in java and I need help figuring out how to efficiently and without freezing the program check if someone won the game. I'm only in the design stages now, I ...
6
votes
1answer
801 views

What methods should save/load a game state

There are a lot of articles about how to save a state of a game and they are pretty good. But I have one conceptual misunderstanding where should I save the state? My game has number of screens and ...
0
votes
1answer
215 views

Structuring various game states and unique levels

I have a game design 'structure' question that I'd like to throw out there. This question is about various ways of designing game 'states', and specifically a system of 'levels'. Specifically, what is ...
0
votes
1answer
705 views

Managing Game States

I'm thinking about making a StateManager for my game. I want to know how to design it; that is, how to use a stack to push and pop states onto, and draw them to the screen. For example, should each ...
1
vote
1answer
382 views

Trouble with the State of things in XNA

I'd decided to break the mold and make my first game based on RPG mechanics (note sarcasm). An RPG style action bar would be a reasonable and fun way to get started as it's limited in scope but still ...
7
votes
2answers
3k views

How to structure game states in an entity/component-based system

I'm making a game designed with the entity-component paradigm that uses systems to communicate between components as explained here. I've reached the point in my development that I need to add game ...
0
votes
1answer
431 views

Handling game states like Braid's timeshift or Shooter's Killcam

me as very unexperienced game developer, I wondered how I could achieve something like re-winding the time in my game or jump back to a special moment (killcam) and replay it for the user.
19
votes
5answers
1k views

Reasons to disable game save during combat (e.g. Mass Effect 2)

So I've been playing Mass Effect 2 (PC) and one of the things I've noticed is that you can only save your game when you're not engaged in combat. As soon as the first enemy shows up on your radar, ...
1
vote
2answers
233 views

Game states affecting each other's objects

If I had given this question any other title it would have immediately looked like a dupe of this one. Although that has some nice ideas none of the answers actually address what I need. I'm ...
1
vote
5answers
3k views

How to pause and resume a game in XNA using the same key?

I'm attempting to implement a really simple game state system, this is my first game - trying to make a Tetris clone. I'd consider myself a novice programmer at best. I've been testing it out by ...
1
vote
0answers
338 views

In a state machine, is it a good idea to separate states and transitions?

I have implemented a small state machine in this way (in pseudo code): class Input {} class KeyInput inherits Input { public : enum { Key_A, Key_B, ..., } } class GUIInput inherits Input { ...
4
votes
3answers
2k views

GameState management hierarchical FSM vs stack based FSM

I'm reading a bit on Finite State Machines to handle game states (or screens). I would like to build a rather decent FSM that can handle multiple screens. e.g. while the game is running I want to be ...
0
votes
1answer
1k views

Is Goal-Oriented Action Planning (GOAP) a valid replacement for state machines outside the realm of AI?

I just learned about Goal-Oriented Action Planning (sources below) as used in AI programming. I'm making a state machine for a player-controlled character and was wondering if it can be replaced by a ...
6
votes
3answers
380 views

Common ways to keep up with character state in a 2D game?

I am currently developing a 2D Blockdude clone for learning purposes and am wondering about storing character state in the game. For example, the character can be facing either right or left. What are ...
3
votes
3answers
266 views

Avoiding bouncing between states in an FSM

Suppose you have a simple state machine for a game character with two states: StandingIdle Walking In the update logic for the StandingIdle state you have (pseudo code): if input received ...
9
votes
3answers
1k views

Is there a pattern for writing a turn-based server communicating with n clients over sockets?

I'm working on a generic game server that manages games for an arbitrary number of TCP socket-networked clients playing a game. I have a 'design' hacked together with duct-tape that is working, but ...