Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
92 views

SDL2 Events how to avoid monolithic control statement?

I'm using SDL2 in my game engine and I'm trying to figure out how I can prevent having a monolithic control statement like this: ...
Konjointed's user avatar
0 votes
0 answers
192 views

Good design for player input handling in 2d game

I am working on a java 2d game. Keeping things short, I'd like to improve my current input handling. Basically the player can move up/down/left/right with WASD, perform an attack with mouse left click ...
magister's user avatar
0 votes
1 answer
80 views

First Person shooter look direction abstraction for InputController, AIController and NetworkController

The problem Suppose I have a game where there are multiple Input Controllers: LocalPlayerController: Reads inputs from the keyboard/mouse/gamepad. ...
Ciberman's user avatar
  • 135
0 votes
1 answer
1k views

Is Dedicating A Thread To Inputs A Good Idea In Game Design?

Say I design my game targeting a specific PC to run it on 120 frames per second. And say I need to get Input data from the controller at a frequency of 800 times per second, and feed that input data ...
Physician's user avatar
  • 101
0 votes
0 answers
112 views

Handling "nested" user actions in client/server card game

I'm developing a card game in JavaScript in a functional programming style and I'm unsure what is the best way to implement the flow of player actions that require other player actions for their ...
Thiatt's user avatar
  • 101
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 ...
FM Productions's user avatar
5 votes
5 answers
2k views

Is it acceptable to use Hash Maps for input, copying one hash map to an another during the game loop?

I recently started developing a simple 2D game in Java using JavaFX and no proper game library (libgdx etc.) and among the things I did was to make an InputManager to handle every input from the ...
Nick's user avatar
  • 153
2 votes
1 answer
288 views

How to stop diagonally in an event driven input system?

Example scenario: Assume 2 dimensional top down movement system. Given that I have 4 directional keys ( UP / DOWN / LEFT / RIGHT ), I am able to move in 8 different directions 4 perpendicular and 4 ...
Ceiling Gecko's user avatar
3 votes
2 answers
1k views

Handling input through callbacks or through game loop?

I've tried to figure out how to handle player input properly, but without luck so far. As far as I have figured out, I can either: Call the respective methods directly through the callback fired ...
Tc_'s user avatar
  • 143
1 vote
3 answers
258 views

How to architect input code to utilise state machine?

I have an InputController which currently handles all user input, so it looks at button states and updates entity intentions according to some simple rules. I'm ...
Adam Naylor's user avatar
0 votes
2 answers
473 views

Handling player and AI in a component based structure dynamically?

I'm trying to find a way to allow both input and AI to call actions of an actor in a component based structure for a 2d turn based game. The actions make use of the components. To keep the system ...
Cyborg's user avatar
  • 45
7 votes
5 answers
3k views

Networking gampeplay - Sending controller inputs vs. sending game actions

I'm reading about techniques for implementing game networking. Some of the resources i've read state that it is a common practice (at least for some games) to send the actual controller input across ...
spaceOwl's user avatar
  • 909
0 votes
2 answers
392 views

Java applet game design no keyboard focus

THIS IS PROBABLY THE WRONG PLACE. POSTED ITHERE (STACKOVERFLOW) I'm making an applet game and it is rendering, the game loop is ...
Sri Harsha Chilakapati's user avatar
2 votes
1 answer
3k views

Managing the user input

I'm studying a good number of articles about this topic and seems to me that there is just one way to do this: a signal/slot design. I was also looking at some more complex async examples but I don't ...
user827992's user avatar
  • 1,971
7 votes
2 answers
2k views

Observer Pattern Implementation

To teach myself basic game programming, I am going to program a clone of Pong. I will use the Observer design pattern, with an interface between the input and the game engine. However, I'm not sure ...
Shivam Sarodia's user avatar

15 30 50 per page