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

learn more… | top users | synonyms

4
votes
3answers
3k 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 ...
0
votes
1answer
312 views

Delay The Polling Events Of Xbox360 Gamepad With XInput

My team and I are currently developing a 2D platformer with SDL/OpenGL and we want to add support to the Xbox360 Gamepad with the XInput library from Microsoft, but we are currently having a problem. ...
1
vote
2answers
171 views

What is the best way to funnel input to the correct entities?

I have an input pipeline that stores InputObjects into a queue, which I then iterate through once every frame. while(!inputQueue.isEmpty()) { InputObject inp = inputQueue.pop(); boolean ...
1
vote
1answer
142 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 ...
2
votes
1answer
725 views

How to move a 2d sprite to a target location while avoiding obstacles?

How can I get a 2d sprite to move to a position clicked on the screen, without bumping into other objects? I'm programming in java using the android API library I have created a surface view and ...
5
votes
1answer
709 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 ...
2
votes
3answers
919 views

Does VK_SNAPSHOT not send a WM_KEYDOWN; only WM_KEYUP?

On my machine, every key sends a WM_KEYDOWN message except for SysReq/Print Screen key: which only seems to send WM_KEYUP. Is this actually the case?
2
votes
1answer
2k views

SFML - Moving a sprite on mouseclick

I want to be able to move a sprite from a current location to another based upon where the user clicks in the window. This is the code that I have: #include <SFML/Graphics.hpp> int main() { ...
7
votes
3answers
6k 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, ...
3
votes
4answers
6k views

How can I process continuously-held keys with SDL?

I have created a cube in opengl using SDL. Now I am trying to move the camera in X direction if user presses left or right arrow keys and Y direction if user presses up or down arrow keys. Right now ...
2
votes
1answer
4k views

How move sprite in Java 2d (swing) with keyboard?

I'm practicing some simple techniques with Java swing games, to learn the basics. Right now I'm practicing how to move a sprite... but it's not working! whhyyyy Here is what I've come up with so far ...
3
votes
2answers
997 views

Is there a universal method to send key or mouse input to any application from C#?

I need method or group of them to send signals to any application (browsers, games, et cetera) about mouse movement or key input. I can easly retrieve an IntPtr to any process, but I don't know what ...
2
votes
2answers
479 views

How do I design a game framework for fast reaction to user input?

I've played some games at cca 30 fps and some of them had low reaction time - cca 0.1sec. I hadn't knew why. Now when I'm designing my framework for crossplatform game, I know why. Probably they've ...
0
votes
2answers
702 views

Ogre3D: customize water demo

On the water demo supplied with Ogre3D's SDK, controls are set to actually control the camera and environment, but not actually the ogre head that generates the disturbances. I tried digging into the ...
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 ...
2
votes
2answers
458 views

How do I handle user input with good class structure/architecture for an Android game?

How do I handle user input having "good" class structure and following normal game architecture*?(see below). At first I didn't think this question was Android specific, although, after seeing a great ...
4
votes
5answers
398 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 ...
10
votes
2answers
571 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 ...
0
votes
2answers
304 views

how can I move an actor in opposit direction of mouse's position in GameSalad?

I have a moving actor named ball and I want to move it in the opposite direction of my mouse's position. In my code in Move To behaviour for X-axis location I write -game.mouse.position.X and ...
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 ...
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 ...
15
votes
1answer
3k 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 ...
1
vote
3answers
599 views

What should I use to handle input? [closed]

What should I use to handle input? I am wanting to use OpenGL so that my games are cross platform. DirectX provides input libraries, and OpenGL does not. Because my games need to be cross platform, I ...
2
votes
3answers
393 views

Efficient way of detecting a touched object in a game?

Imagine a Sims-like 2D game for a touch based mobile phone where one can interact with virtually any object in the scene. How can I efficiently detect which object is being touched by the player? In ...
3
votes
1answer
307 views

How do I use a PC Dance Pad with Xna?

I have a Dance Pad and I want use it in XNA as a controller. It has a USB connection. Can someone help me?
3
votes
2answers
714 views

How do I get consistent Xbox360 Controller input across Linux, Mac, and Windows?

I'm developing a browser plugin to provide joystick access to all browsers on all platforms. The issue that I'm running into is that OS X doesn't seem to provide Xbox 360 joystick input without ...
10
votes
2answers
643 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 ...
4
votes
2answers
1k views

How can I get six Xbox controllers to provide input to an HTML5 game?

I'm creating a six player HTML 5 game designed to be played locally (Red Ice). I've previous set up handling 7 Wiimotes using something along the lines of Joy2Key to map each input for each player ...
6
votes
3answers
636 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 ...
2
votes
1answer
322 views

iPhone, iPad Rendering Ahead of Input (4-5 seconds)

UPDATE I think I solved this one, though any thoughts or suggestions are always welcome! This one is truly bizarre... I'm developing using both an iPhone 3GS and an iPad 2. This symptom is ...
10
votes
5answers
826 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 ...
-2
votes
1answer
488 views

Did first generation Pokemon games use event driven input or poll based input?

Did the first generation Pokemon games for gameboy poll for the d-pad state or was the input state done based on events? I'm currently trying to implement a similar control and I'm interested in ...
3
votes
1answer
566 views

How to handle input from user

I am making an iphone opengl es 1.0 game. I am using a fixed timestep with interpolation on the end. One thread only. I am using CADisplayLink to fire the game loop. First question: is it okay to use ...
17
votes
3answers
5k 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 ...
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 ...
11
votes
6answers
16k 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 ...
2
votes
1answer
767 views

Linux: find force feedback device for joystick device

Because SDL 1.3 is still a long way coming I implemented native force feedback (rumble) support for Aquaria: https://bitbucket.org/panzi/aquaria/ However, I could not find a way to find the according ...
3
votes
2answers
376 views

Where should input be used?

I'm working on an input system (in C#) and now I'm wondering, what is the best place to put input functionality? Currently what I was coding was a bunch of delegates which act as callbacks (i.e. ...
4
votes
1answer
2k views

Unity MouseWheel weapon change

I am trying to make a simple weapon change in Unity3D. The best way to do this is with the mouse scroll wheel, as far as I can see. I googled on how to do this and found that I have to use ...
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. ...
7
votes
2answers
884 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 ...
5
votes
3answers
723 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 ...
2
votes
2answers
466 views

Push or Pull Input Data In the Game Logic?

In the process of preparing my game for networking I'm adding a layer of seperation between the physical input (mouse/keyboard) and the actual game "engine"/logic. All input that has any relation to ...
3
votes
3answers
425 views

Pen tablet input for FPS

So in my FPS camera look code, I have something like this: window->camera->stepYaw( getMouseDx()*speed ) ; // mouseDx is mouse change since last frame window->camera->stepPitch( ...
2
votes
3answers
5k views

Understanding MotionEvent to implement a virtual DPad and Buttons on Android (Multitouch)

I'm trying to implement a virtual DPad in android, but I'm still very confused about how do I keep track of each trouch point, from the moment it is pressed, till it is released. In my code, I test ...
1
vote
1answer
604 views

Tetris Movement - Implementation

I'm developing a Tetris clone and working on the input at the moment. When I was prototyping, movement was triggered by releasing a directional key. However, in most Tetris games I've played the ...
6
votes
1answer
391 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 ...
1
vote
2answers
507 views

Improve mouse movement in first person game

In my current FPS game, I have the mouse setup in a way, that it always forces the position of the mouse to be centered at the screen. This gets the job done, but also gets very annoying, since the ...
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
4answers
672 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 ...