All Questions
17 questions
1
vote
0
answers
93
views
Correctly handling input in case of frame drop
My game loop looks roughly like this:
...
0
votes
1
answer
275
views
Accepting user input in continous game loop
I have a game loop that simply iterates through every entity and calls entity.update()
...
0
votes
1
answer
210
views
Key presses and game quit sometimes delayed by seconds
U'm currently trying to develop a 2D RPG similar to early Final Fantasy titles for the NES.
Up until now I've been reading C++ tutorials on SDL2 and doing my best to convert the concepts into OCaml. ...
0
votes
2
answers
1k
views
Understanding User Input Behind the Scenes?
I am a bit confused on how user input is actually received and processed behind the scenes in a game engine. Let's say I have a simplistic game loop as follows...
...
0
votes
2
answers
798
views
How can I handle input in C without halting the main loop?
I want my C program to update the console every second, and it was working fine until I tried to handle input. Now the program halts since it waits an input from the user. How can I do this?
...
0
votes
0
answers
197
views
The Command pattern and multiple inputs per frame?
I'm reading Game Programming Patterns by Robert Nystrom. As a test I've implemented the command pattern, but a little farther in he changes it to return commands, rather than instantly executing them.
...
3
votes
1
answer
2k
views
SDL2 mouse motion event keeps occurring
The code I'm using is like so:
...
0
votes
2
answers
966
views
How to set up a key press to start the game
I've tried to create a simple start menu for my game which informs the player to press a key to start the game but the problem is that it works only if the key is pressed all the time...i'm not sure ...
3
votes
0
answers
2k
views
Framerate independent realtime input
I am currently working on a fighting game (with 3d graphics, gameplay like a 2d fighter) and encountered a pretty big hurdle I currently don't know how to deal with. For fighting games, input ...
1
vote
1
answer
906
views
How to handle keyup events in game loop?
I'm writing a simple game in JavaScript, which already handles basic keyboard input like so:
...
0
votes
1
answer
454
views
Competing keyboard events
When I was looking on how to handle key inputs in a game loop I came across the following pattern: All native key events (up or down) get queued in an event queue that is later processed. The outcome ...
1
vote
1
answer
652
views
Basic game loop, what does Update() and HandleInput() mean to you?
I have been developing a game and until now I have been handling input like so:
Player presses a key
HandleInput() acknowledges a key is pressed calls a function within the ...
4
votes
1
answer
3k
views
does order of updates and renders matter?
I know in a game loop there needs to be an order like physics should update before rendering. So, I have created two separate functions: update and render and the game loops like below:
...
1
vote
2
answers
423
views
Input of mouseclick not always registered in XNA Update method
I have a problem that not all inputs of my mouse events seem to be registered.
The update logic is checking a 2 dimensional array of 10x10 .
It's logic for a jewel matching game.
So when i switch my ...
2
votes
1
answer
1k
views
Synchronizing input, update and rendering threads
How do you synchronise the input-handling, state-updating and rendering threads?
If a sprite position is modified due to input, the wrong position of the sprite might be drawn to the screen if the ...