Event is action that is usually happenes "outside" of main program thread, but handled inside of it.

learn more… | top users | synonyms

0
votes
1answer
204 views

Implementing a Turn-Based Game with Windows API Window Messages

I'm trying to make a 2-player Connect 4 game, but I'm having trouble wrapping my head around some of the concepts related to incorporating event handlers while progressing with the game. On the one ...
1
vote
1answer
249 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
1answer
746 views

SDL mouse wheel not picking up

Running Ubuntu 11.04, SDL 1.2 trying to pickup mouse wheel up/down movement with this (stripped down) code: int main( int argc, char **argv ) { SDL_MouseButtonEvent *mousebutton = NULL; ...
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 { ...
7
votes
2answers
496 views

Handling commands or events that wait for an action to be completed afterwards

Say you have two events: Action1 and Action2. When you receive Action1, you want to store some arbitrary data to be used the next time Action2 rolls around. Optimally, Action1 is normally a command ...
1
vote
0answers
159 views

Farseer Physics EndContact events don't fire for all registered delegates

Here's my situation: I have several objects that contain a body and a fixture. They are set to sensor = true; atmosphere = BodyFactory.CreateCircle(world, atmosphereRadius / Level.METER_IN_PIXELS, ...
0
votes
3answers
192 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. ...
0
votes
2answers
492 views

Is it possible to generate Events and Hooks in Lua for any game without built-in support?

Does a game have to have built-in functions to accept and run lua scripts, or can I design Events and Hooks using Lua on any game I please, akin to the days where C code could be used to hook into the ...
2
votes
1answer
125 views

Any problems with Event usages within XNA on Xbox/Phone

This is a slightly vague one but I am currently looking at a couple of areas of my current framework, such as spatial partitioning and UI based menus, and with UI menus it makes sense to have an event ...
1
vote
4answers
763 views

How do I respond to keyboard events which occur between polling?

In my games update loop, which happens on a fixed timestep of 30 times per second, I am checking the current state of several keys to determine how to move the player. For example: ...
1
vote
1answer
141 views

How can I throttle certain player actions?

Background I have a variable time step, component based game, with components that collectively hold an entity's properties and different systems that act on entities with certain required ...
6
votes
2answers
283 views

Which code module should map physical keys to abstract keys?

How do you bridge the gap between the library's low-level event system and your engine's high-level event system? (I'm not necessarily talking about key events, but also about quit events.) At the ...
-2
votes
2answers
134 views

Should collision sounds and UI responses be deferred or processed immediately?

When checking for collisions between entities, should you play a collision sound immediately on discovering a collision or queue every collision and process the sounds later? Similarly for user user ...
9
votes
4answers
2k views

What technique should I use to facilitate communication between XNA GameComponents (or between components of any type in a game)?

I'm starting out on my first 'proper' game project, and I've inevitably hit a block trying to decide how game components in XNA should communicate. From previous (Java) GUI programming events, ...
9
votes
3answers
1k views

What should I be considering when designing an Event Manager System?

I have been puttering around with the fundamentals of a Java game engine, and I've reached the point where I'm ready to add in an Event Manager system. I know, in theory, what an Event Manager should ...
7
votes
3answers
2k views

Better Way To Set Up an Event System

Event Systems are amazing, they make extremely unwieldy code tame and really allow for dynamic creation of games through easy communication of objects and the game loop. I am having a hard time with ...
1
vote
3answers
775 views

create an event for every enum value (game action handeling)

I'm currently working on creating an input-action system for my game. I simply wanted an easy way to map an ingame action to a certain key. I've managed to do so with the following method: Create a ...
7
votes
3answers
434 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 ...
13
votes
3answers
1k 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 ...
9
votes
3answers
1k 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
4answers
3k views

Should I use Events in a XNA Game?

I created a button class which draw a button on the screen. When I click on it, I want to see something happening. In WinForm, I would simply use the event OnClick of the button. What about XNA? ...
10
votes
5answers
776 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 ...
3
votes
1answer
717 views

Flash AS3 Tower Defense MouseEvents

In my tower defense game and every tile has its own mouse event listener. I am wondering, would it be better to use one event listener (MouseEvent.CLICK) and then when it runs the function, should I ...
5
votes
4answers
688 views

Browser-board-game and server push

I want to start developing a browser game. Not for success, just for the sake of doing it and learning something from it. Now, a point where I have serious problems figuring out how to deal with it ...
1
vote
2answers
724 views

Flash Custom Events

I am working on a Flash Tower Defense game. I have a main game loop which is an eventListener for each frame. Whenever you gain money or lose a life, I want the GameUI to be updated to display this ...
16
votes
3answers
4k views

Polling vs event driven input

I'm developing a game using polling for the input method. However, now that I'm delving deeper into the game menus and other UI components, I'm finding that I'd probably like to have event driven ...
1
vote
2answers
476 views

Problems with Creating Snake's Clone on Java

I'm creating Snake's clone. My app have too classes: Snake.java and Board.java. Right now I have three problems: 1) There are two constants - BOARDS_WIDTH, BOARDS_HEIGHT. They are meant to be ...
4
votes
2answers
675 views

How should I manage events in XNA on the Windows Phone 7 without impacting performance?

It's best-practice to not to create lots of short-lived temporary objects the heap as it'll eventually force a garbage collection during game-play. It is best to create short lived value objects. ...
-3
votes
2answers
112 views

Are there companies that can store the stream of each user event? [closed]

I want a company that can store in a database of it's own the stream of clicks each user does (my game is programmed in action script), of course I will define what data and when to store it. Bear in ...
4
votes
4answers
732 views

Level editor event system, how to translate event to game action

I've been busy trying to create a level editor for a tile based game i'm working on. It's all going pretty fine, the only thing i'm having trouble with is creating a simple event system. Let's say ...
2
votes
4answers
1k views

Flash framerate reliability

I am working in Flash and a few things have been brought to my attention. Below is some code I have some questions on: addEventListener(Event.ENTER_FRAME, function(e:Event):void { if (KEY_RIGHT) ...
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 ...
7
votes
4answers
3k 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) ...
43
votes
8answers
8k views

Event-driven Communication in a Game Engine: Yes or No?

I am reading Game Coding Complete and the author recommends Event Driven communication among game objects and modules. Basically, all living game actors should communicate with the key modules ...
3
votes
4answers
3k views

Multiple Key Presses in XNA?

I'm actually trying to do something fairly simple. I cannot get multiple key presses to work in XNA. I've tried the following pieces of code. else if (keyboardState.IsKeyDown(Keys.Down) && ...
10
votes
3answers
2k views

Algorithm for determining random events

I'm struggling with coming up with an elegant solution to generating random events in the game that I'm working on. Say there are 4 classes of events that can happen, with varying events in those ...
18
votes
3answers
723 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 ...
12
votes
3answers
865 views

Game log format for MMO servers

A log of game events (as opposed to error / debug logs) for an entire cluster/shard is very useful for a commercial MMO that is in a live production environment, providing vital support for customer ...
11
votes
5answers
3k 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 ...
5
votes
2answers
490 views

Accuracy and frame-rate in a rhythm game

My question is related with Fixed time step vs Variable time step. But where a fixed frame-rate improve the consistency of a physics based game, is it the case for a rythm game, or wouldn't it be ...
9
votes
2answers
508 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 ...