Interaction from the player that corresponds to action in the game. Or in simpler terms - pushing buttons!

learn more… | top users | synonyms

60
votes
5answers
23k views

Good 2D Platformer Physics [closed]

I have a basic character controller set up for a 2D platformer with Box2D, and I'm starting to tweak it to try to make it feel good. Physics engines have a lot of knobs to tweak, and it's not clear to ...
22
votes
2answers
9k views

How to make a character jump?

I am currently making a game in C# using Direct X 9.0. The game remake is Donkey Kong NES. I have nearly everything completed, but I am having problems with the physics of Mario's jump. I have ...
18
votes
3answers
738 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 ...
17
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 ...
13
votes
2answers
508 views

How can I stop the player from drifting due to local input prediction when they stop?

I'm working on a 2D server-client multiplayer game engine (which you can try here). It uses WebRTC DataChannels. (The connections are peer-to-peer, but the host peer still acts as a server.) The ...
12
votes
6answers
5k views

Making (or emulating) a “D-Pad” on a touch-screen; virtual d-pad

With the proliferation of touch based devices, many lacking a true D-Pad, I'm wondering if anyone has any resources on how to emulate a D-Pad on a touch screen? I'm specifically interested in XNA ...
12
votes
1answer
2k views

Using PS3 controller for input on Mac OSX

I've managed to find a USB driver to connect to the PS3 controller in OSX, and as reported here, can connect to the controller via Bluetooth. I've verified that the input is working properly via ...
12
votes
3answers
208 views

Player fatigue for tablets?

I'm thinking about making games for tablets. Coming from a PC/console background, I'm keenly aware of the huge differences in the user interfaces, and that I need to design it with the target platform ...
11
votes
6answers
15k views

How to handle mouse input in XNA?

I am developing a card game in XNA. Is there any OnClick event in XNA for objects? I am trying to make cards move when the player clicks on them. In this project, there is a Sprite class that draws ...
11
votes
3answers
1k views

Why is forward=down mouse orientation commonly called “inverted”?

If you look at 3D games that allow you to control the camera using the mouse--most notably first-person and third-person shooter style games--you'll usually find two specific details: By default, ...
11
votes
5answers
4k 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 ...
11
votes
5answers
840 views

What is a suitable input method to use for a 2D platformer on a touch device?

I am creating a 2d platformer game like Super Meat Boy in which precision of movement of my lead character matters. I am using libgdx. The keyboard controls on the PC work precisely, but when it comes ...
11
votes
2answers
4k views

Game state and input handling in component-based entity systems

My question is: How can I handle game states in my entity system, without resorting to keeping a stack of game state objects around? So the design of my entity system means that when an entity needs ...
10
votes
2answers
616 views

In a GUI, should input be handled when the button is pressed or released?

In the menu system for our game (selecting levels, options, etc.), the player presses the a button on the gamepad to go to the next screen. I coded the menu system to wait until the button is released ...
10
votes
5answers
798 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 ...
9
votes
2answers
528 views

Correct way to abstract an XBox Controller

I've got a XBox360 controller which I'd like to use as input for an application. What I can't work out is the best-practice way to expose this via an interface. Behind the scenes, the class which ...
9
votes
5answers
6k views

Handling keyboard and mouse input (Win API)

There is a number of ways to catch mouse or keyboard under Windows. So I tried some of them, but every of them has some advantages and drawbacks. I want to ask you: Which method do use? I've tried ...
9
votes
1answer
631 views

Portable buffered keyboard input for XNA / MonoGame?

As a preliminary solution, I am currently using the Nuclex framework in an C#/XNA game project for buffered keyboard input. Sadly, nuclex relies on SlimDX.Directinput.dll and therefore to my knowledge ...
9
votes
1answer
411 views

Is there a gold standard for touch controls in scrolling shoot-em-ups?

Is there currently a "standard" for touch controls in shooters on platforms such as iPhone or Android? I've noticed that many of them enable auto-fire by default, or control the character via direct ...
8
votes
6answers
4k views

How should I parse user input in a text adventure game?

Parsing user commands in a text adventure is a spectrum from Adventure's simple "go north" to some mind-bogglingly clever ones in hhgttg. I seem to remember reading nice how-tos in computer magazines ...
8
votes
2answers
2k views

Input management techniques in large games

Is there a standard technique for managing input in large games. Currently, in my project, all input handling is done in the game loop, like so: while(SDL_PollEvent(&event)){ ...
8
votes
3answers
1k views

Key combinations on poll-based input

So assume you have an input system that is based on polling void update() { if( Keyboard[ 'A' ] ) // A is down } Say you want to be able to recognize 3 to 8 length key combinations ...
8
votes
3answers
686 views

How does one separate the acceleration due to gravity from other motion in accelerometer input?

How does one separate the acceleration due to gravity from other motion in accelerometer input?
8
votes
5answers
2k views

How to get elapsed time of keypress?

I need to be able to determine how long a key has been held down with high accuracy. For example if they key tapped really fast it could report a time that is less than the time for each update frame. ...
8
votes
1answer
1k views

How does an Input Pipeline work?

I found this article on implementing an input pipeline for Android, but I don't really understand how it works. I also don't completely understand the programming concept of a pipeline or a pool ...
7
votes
3answers
3k views

Input handling in component based design

I know this question has been asked several times, but I'm still not sure how to implement input handling in a component based engine. The component based design I used was based on T=Machine's blog ...
7
votes
3answers
5k views

Is it possible to detect two different mice at the same time, and have their movements recorded seperately?

Im thinking of making a game that requires two mice to play. It needs to register the movement separately from one another. Is this possible? Or does the Windows architecture not allow for such ...
7
votes
2answers
781 views

How should i have the key/mouse input in an advanced java game?

I am a self taught programmer, so I do not know the proper ways to do things. I have made simple games like asteroids and snake, but in those games, you can easily modify the variables within the ...
6
votes
6answers
2k views

How do I identify mouse clicks versus mouse down in games?

What is the most common way of handling mouse clicks in games? Given that all you have in way of detecting input from the mouse is whether a button is up or down. I currently just rely on the mouse ...
6
votes
3answers
2k views

How do I organize my game into multiple classes in C#?

I've made two simple 2D games while following tutorials for the XNA libraries, and I wanted to make something myself, with only the knowledge I gained from these tutorials. This will be my first ...
6
votes
3answers
1k views

IDirect3DDevice9Ex and D3DPOOL_MANAGED?

So I wanted to switch to IDirect3DDevice9Ex, purely for the SetFrameLatency function, as fullscreen vsynced D3D seemed to produce noticable input lag. But then it tells me 'ha ha ha! now you can't ...
6
votes
2answers
785 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 ...
6
votes
2answers
2k views

How are components properly instantiated and used in XNA 4.0?

I am creating a simple input component to hold on to actions and key states, and a short history of the last ten or so states. The idea is that everything that is interested in input will ask this ...
6
votes
1answer
371 views

What are the benefits of designing a KeyBinding relay?

The input system of Quake3 is handled using a Keybinding relay, whereby each keypress is matched against a 'binding' which is then passed to the CLI along with a time stamp of when the keypress (or ...
6
votes
3answers
584 views

How standardized are joystick / gamepad configurations?

Right now I'm working on input for my game. The only controller I own is an XBOX 360 one. From what I can see, if a controller's stick has a Z axis, these are actually triggers. Essentially I'm ...
6
votes
3answers
5k views

How do I simulate the mouse and keyboard using C# or C++?

I want to start develop for Kinect, but hardest theme for it - how to send keyboard and mouse input to any application. In previous question I got an advice to develop my own driver for this devices, ...
6
votes
3answers
1k views

multi touch on HTML5 with JavaScript?

How action game controls should be implemented so that they would work on smart phones as well? At the moment I use wasd/arrow keys and I am able to handle for example two keys down at the same time. ...
5
votes
2answers
920 views

Checking for alternate keys with XNA IsKeyDown

I'm working on picking up XNA and this was a confusing point for me. KeyboardState keyState = Keyboard.GetState(); if (keyState.IsKeyDown(Keys.Left) || keyState.IsKeyDown(Keys.A)) { //Do stuff... ...
5
votes
3answers
3k views

Trap mouse in SDL

How can I trap the user's mouse inside my game? It's not a fullscreen game, but I want it so that the user cannot drag the mouse to outside the screen. Do I have to check the coordinates of the mouse ...
5
votes
3answers
687 views

What's a good way to check that a player has clicked on an object in a 3D game?

I'm programming a 3D game (using C++ and OpenGL), and I have a few 3D objects in the scene, we can say they are boxes for this example. I want to let the player click on those boxes to select them ...
5
votes
2answers
816 views

Fighting Game and input buffering

In fighting game, there is an important thing called input buffering. When your character is doing an action, you can input the next action that will activate as soon as possible (the buffer is 5-10 ...
5
votes
4answers
639 views

Optimal touch controls for a twin-stick shoot 'em up?

So we recently launched a shoot 'em up arcade-type game (think Smash TV or I Made a Game with Zombies in It!). You can move in one direction and fire in another, so the ideal control scheme is ...
5
votes
1answer
675 views

A pattern for a contextual InputState in a Game State Management architecture

Context of the question : When developing a game using Game State Management I came across a problematic when it came to handling user input : I want my game to retrieve user input a single way, but ...
5
votes
1answer
2k views

How do I read input from multiple keyboards/mice on one computer?

I want to be able to read inputs from multiple keyboards and still differentiate them. It's for split-screen. I know it's possible, because Serious Sam 3 allows it. Edit : Well a whole lot of my ...
5
votes
1answer
463 views

Character Movement in 3D games

I'm either not searching correctly or there is really not a lot of material on Character Movement in 3D games. I'm mostly interested in how people usually implement character movement in games like ...
4
votes
3answers
2k views

How can I stop looking for keyboard input for a length of time?

I'm pretty new to programming, and even newer to C# and XNA. I currently call a method that looks for keyboard input in my Update method. This method has if statements for doing what needs to be done ...
4
votes
5answers
380 views

Identifying connected lines drawn free-hand by a user

I have a series of 'images' described by a mixture of connected lines and curves. Users will draw on the screen, free hand, and my goal is to break their drawing down into a series of lines and curves ...
4
votes
2answers
118 views

Asking the user to place the joystick in the center while calibrating

I would like to know why exactly calibration programs (usually?) ask the user to place the joystick in middle, that is: Why isn't moving the handle in a complete circle (usually?) enough to calibrate ...
4
votes
11answers
388 views

Varying the strength of attacks by holding down the button

I am preparing a conference session about game design, and a question occurred to me that I haven't been able to answer with Google: In Mario the player varies the height of Mario's jump by holding ...
4
votes
2answers
245 views

Manage user input and diffentiate it between the player and the app

I hope the title makes sense. Basically, I am trying to figure out how the app will know I the input I am sending it is meant for the app and not the player, and vice-versa. (It is very similar to ...