Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
66 views

Finite-state machine with more than one concurrent state

I am using a FSM for the player entity and it is working fine. Currently the entity has one state and only one (e.g. paralyzed). The entity's state process() method is called every turn. It is ...
1
vote
2answers
88 views

Should character actions be considered states?

So I've been on a team that has been working on a game for quite a few months now and we're hitting some really nasty bloat problems with our character actions. Question in bold. Accompanying ...
1
vote
1answer
273 views

Can a behavior tree represent the same logic as a finite state machine?

So I was just learning about Behaviour trees and I thought they're really cool. So I decided to use them in my games. But what I don't quite understand is: Short: Can everything done in an FSM, be ...
6
votes
2answers
125 views

Must all AI states be able to react to any event?

FSMs implemented with the State design pattern are a common way to design AI agents. I am familiar with the State design pattern and know how to implement it. How is this used in games to design AI ...
1
vote
0answers
20 views

Internal FSM transition from an external Raycast's results

I'm making good progress on my shooter, I've now moved onto the AI. Currently I perform a Raycast from my base Weapon class to check for impacts, and then invoke a function on the hit object after ...
0
votes
1answer
137 views

How do I implement following behavior with a state-based AI? [closed]

I'm making a 2D game with two spaceships flying around shooting each other. One spaceship is controlled by the user, the by an AI. I want to use a simple Finite State Machine (FSM) for the AI. I'm ...
1
vote
3answers
377 views

How can I notify my AI systems that a target has died?

I am currently building a game focusing on AI for my university and this is my first time writing such a complex AI system. Naturally, I ran into a little logic problem: In the game, the AI uses a ...
0
votes
1answer
102 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 ...
0
votes
1answer
126 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 ...
2
votes
1answer
108 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, ...
3
votes
1answer
649 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 ...
4
votes
1answer
149 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 ...
4
votes
2answers
307 views

AI system recommendations for a Hive mind system

Im currently starting to work on a game project where a player will be faced against an enemy which has a hive mind. I was wondering if anyone could recommend an A.I system which I could use as at the ...
7
votes
4answers
605 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
274 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
146 views

State machine interpreters

I wrote my own state machine tool in C and at this point I'm faced with two choices for specifying state machines. Crafting a little language and writing a interpreter. Writing a compiler for that ...
1
vote
0answers
279 views

State Machine with State per Entity [closed]

I have a generic state machine implementation like this: public abstract class State<TOwner> { public virtual void OnEnter(TOwner owner) { ... } public virtual void OnExit(TOwner ...
0
votes
1answer
221 views

Implementing a FSM with ActionScript 2 without using classes?

I have seen several references of A.I. and FSM, but sadly I still can't understand the point of an FSM in AS2.0. Is it a must to create a class for each state? I have a game-project which also it has ...
0
votes
1answer
336 views

Basic AI FSM - Handling state transition

I'm starting to study on how to implement game AI, and it seems to me that a very simple FSM for my Pong demo would be a nice way to start. My vision on implementing this would be to have a basic ...
1
vote
1answer
231 views

Stack based state design for isometric character movement, am I doing it right?

I have been reading around about stack-based FSM, and I found it to be perfect for my game. However, when a character moves, it consequently have to face in some direction (and animation of each ...
5
votes
5answers
630 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 ...
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 ...
1
vote
0answers
361 views

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

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 { ...
5
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 ...
15
votes
3answers
4k views

How to wire finite state machine into component-based architecture?

State machines seem to cause harmful dependencies in component-based architectures. How, specifically, is communication handled between a state machine and the components that carry out state-related ...
7
votes
2answers
714 views

What is a convincing Berserker enemy AI finite state machine for a Roguelike

I'm looking for a way to create a convincing Berserker enemy in a Roguelike I've been creating for some time. You may assume a game like NetHack for this when considering what kinds of actions can be ...
3
votes
3answers
282 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 ...
1
vote
3answers
165 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 ...
5
votes
2answers
704 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 ...
3
votes
2answers
743 views

States, actions logic am I doing it right?

Currently I have the follow states: Need To Run Run Need To Walk Walk Need To Fight Fight Am I misunderstanding it and mixig possible actions with states ? I mean, to me Need To Run would either ...
6
votes
3answers
7k views

Using components in the XNA Game State Management example?

In the game state management example at the App Hub, they say that if you want to use components in the example you can extend the GameScreen to host other components inside itself. I'm having a ...
4
votes
2answers
3k views

finite state machine used in mario like platform game

I don't understand how to use a finite state machine with the entity controlled by the player. For example I have a Mario style game (2d platform). I can jump, run, walk, take damage, swim, etc. So ...
41
votes
11answers
7k views

How can I implement dialog trees into my game?

What is the best way to implement a dialog tree system in my game? I want an NPC to give the player different sets of responses, some which may only appear when the Player has an item or a previous ...