Generally used in correlation with a state machine.
0
votes
0answers
41 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 ...
4
votes
1answer
81 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
475 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
192 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
45 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 ...
0
votes
1answer
155 views
Problem with enum as game state
In the current game I'm building, I'm having trouble moving from one game state to another. I'm using enum to control my states. As of now, this is my enum:
public static enum State
{
M_MENU, ...
0
votes
0answers
55 views
Syncing entities in a totally shared multiplayer environment
Typically, networked games designate a server (or host player) as being authoritative over all state shared between the players. Clients still simulate their own state, but also continuously ...
4
votes
2answers
274 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 ...
8
votes
2answers
915 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 ...
1
vote
1answer
57 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 ...
12
votes
2answers
587 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
151 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
233 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
49 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 ...
5
votes
3answers
621 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 ...
6
votes
2answers
391 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 ...
4
votes
1answer
141 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
4answers
234 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 ...
0
votes
1answer
152 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
452 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 ...
0
votes
1answer
281 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 ...
4
votes
2answers
1k 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
395 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.
5
votes
5answers
508 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 ...
1
vote
2answers
203 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 ...
6
votes
2answers
826 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 ...
10
votes
2answers
1k 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 ...
3
votes
2answers
484 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 ...
1
vote
5answers
2k 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
274 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
1k 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
627 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
315 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 ...
6
votes
1answer
673 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 ...
3
votes
3answers
217 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
...
0
votes
3answers
109 views
Keeping per-client data, when using singleton-based states
In my game, I deal with a lot of units. Every unit implements a state machine, and changes states quite often. As a result, I'd like to keep my states as singletons, since I want to avoid the creation ...
1
vote
3answers
137 views
Changing game object type: reinstantiating the object, or switching an object state
I work on a strategy game, where the player occasionally has to transform ordinary citizens into the so called "leaders". Leaders are temporary units, which the player can control directly, in order ...
8
votes
3answers
917 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 ...
8
votes
2answers
239 views
Is there a design flaw when an entity's state doesn't fully utilize enter(), execute() and exit()?
I'm following Mat Buckland's Programming Game AI by Example, and I find that I don't always have use for enter(), execute() and exit() on an entity's state. For example, in an RPG, a weapon may have ...
2
votes
2answers
790 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 ...
1
vote
2answers
335 views
How granular should entity states be?
I'm writing a component-based entity system and one of the components is the entity's state, which dictates how it reacts to game events. In case anyone has experience with implementing states, how ...
6
votes
3answers
910 views
How should the actual game interface with the menu system
I'm using the Game State Management (GSM) concept in my prototype and I like it very much. One of the screen has a "Game" embeded in it, where all the "good stuff" happens. The menu launching the game ...
5
votes
2answers
522 views
Integrating an AI state machine with actions that take more than 1 tick
Background: I'm having a problem conceptualising something which seems to be pretty fundamental. We have, what I believe to be, a traditional 'game loop', which runs at 60 fps and iterates through ...
2
votes
2answers
275 views
How do you handle animations that are for transitioning between states?
How does one usually handle animations that are for going between a game object's states? For example, imagine a very simple game in which a character can only crouch or stand normally. Currently, I ...
9
votes
3answers
2k 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
votes
3answers
2k views
C++ GameState management
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 ...
9
votes
1answer
4k 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 ...
4
votes
1answer
312 views
A few questions about entity states
This is the first time I'm trying to make a 2D game, so I'm having quite a few difficulties in getting things right. Right now I'm trying to figure out exactly how the entity state machine should ...
5
votes
3answers
472 views
For games that time stamp a saved game (think Half-Life), is the entire game state really being saved every time?
It seems to me if that were the case that your directory of saved binaries or serialized objects could get massive real quick. Is there some sort of strategy being employed on top of the State pattern ...
6
votes
1answer
340 views
What should “own” the battle state in combat between the player and NPCs?
I have a Map, a Tile, NPCs and the Player. When a player enters a tile in the map, a moveTo event is fired, which calls for any NPCs associated with that tile to be "activated". Those NPCs may be ...
