Tagged Questions
4
votes
1answer
73 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 ...
0
votes
0answers
62 views
Using boost function to wrap execution of a boost signals2 signal
I am considering using the boost library to design a simple yet effective callback event notification framework for my game application. The idea is that objects that can raise events would have a ...
1
vote
4answers
639 views
SDL - Getting a single keypress event instead of a keystate?
Right now I'm working on a simple SDL project, but I've hit an issue when trying to get a single keypress event to skip past a splash screen. Right now, there are 4 start-up splash screens that I ...
1
vote
1answer
201 views
Unit selection - logic & screen communication
I'm building a game using SFML, with disconnected logic & screen systems that run on different threads and communicate through synchronised buffers. Now, this system worked perfectly well when I ...
0
votes
3answers
181 views
A question regarding how to respond to 'events'
What is the best practice to use when events happen in a game? For example:
You have a sensor. When a particular game actor is near that sensor, a sound must be played and a door must be closed.
...
6
votes
3answers
364 views
Events, Posting vs Queuing
I'm implementing a messaging system and I'm wondering about how I should handle events. Should I post them and send them to the appropriate listeners as soon as I receive them, or should I queue them ...
12
votes
3answers
936 views
Avoiding singleton pattern for Event Scheduler?
I want to make an Event scheduler for my Game, I basically want to be able to schedule the triggering of a Game Event. This can be a one time trigger, or a periodic trigger (trigger event ...
7
votes
3answers
721 views
Best way to manage in-game events?
I'm working on a game where some in-game events need to happen once in a while. A nice example would be a tutorial.
You start the game, and at several points in the game an event occurs:
You ...
8
votes
5answers
696 views
Nested input in an event-driven system
I am using an event-based input handling system with events and delegates. An example:
InputHander.AddEvent(Keys.LeftArrow, player.MoveLeft); //Very simplified code
However, I started wondering ...
4
votes
4answers
1k views
One True Event Loop
Simple programs that collect data from only one system need only one (blocking) event loop. For example, Windows applications have the message loop, POSIX network programs usually have a ...
6
votes
4answers
2k views
Per-Frame Function Calls versus Event Driven Messaging in Game Design
The traditional game design, as I know it, uses polymorphism and virtual functions to update game objects states. In other words, the same set of virtual functions are called in regular(ex: per-frame) ...
35
votes
8answers
5k views
Event Driven Communication in Game Engine - Yes or No?
As I am reading book Game Coding Complete (http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/dp/1584506806/ref=sr_1_1?ie=UTF8&qid=1295978774&sr=8-1), the author recommend Event Driven ...
18
votes
3answers
575 views
Do I, and how, separate the concerns of input and game objects?
In probably every game a developer has to somehow deal with input, may it be simple keyboard and mouse events, touch events or something as accelerometer input. This input directly of indirectly ...
10
votes
5answers
2k views
Keyboard input system handling
Note: I have to poll, rather than do callbacks because of API limitations (SFML). I also apologize for the lack of a 'decent' title.
I think I have two questions here; how to register the input I'm ...
9
votes
2answers
448 views
What role does developing with events have in games?
Most application development is based around developing with events, but considering the game-loop style of developing games and the (often) need for high performance/throughput, what role does ...