Tagged Questions
3
votes
3answers
219 views
Unable to detect continuous keypress event in SDL
I am developing a game using SDL, and am unable to do continuous motion for my object when a key is held down.
I'm calling SDL_PollEvent() to retrieve all events during a frame, and passing each ...
1
vote
2answers
554 views
Efficiently checking input and firing events
I'm writing an InputHandler class in XNA, and there are several different keys considered valid input (all of type Microsoft.XNA.Framework.Input.Keys). For each key, I have three events:
internal ...
0
votes
0answers
246 views
Windows Events lag behind
I'm making a simple openGL application and so far I can get the window to display, the update/render loop work, and it processes windows events (like WM_QUIT and WM_MOUSE). I've found though that ...
1
vote
1answer
129 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 ...
8
votes
5answers
702 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 ...
14
votes
3answers
2k 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 ...
18
votes
3answers
585 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 ...