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

learn more… | top users | synonyms

11
votes
5answers
852 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 ...
0
votes
4answers
373 views

Twin stick shooting with keyboard

In a top down shooting game, what alternatives are there for input if I want the direction of movement to be independent from the direction I'm shooting at? I'd like to avoid shooting with the mouse ...
-2
votes
1answer
123 views

Java Translate Key Input [closed]

I decided to randomly start a small OpenGL 2D game, and the problem is, my keyboard input isn't working. There are no errors or anything, however, the little square I've created refuses to move. ...
1
vote
1answer
143 views

If statement causing xna sprites to draw frame by frame

I’m a bit new to XNA but I wanted to write a simple program that would fire a cannon ball from a cannon at a 45 degree angle. It works fine outside of my keyboard i/o if statement, but when I ...
4
votes
5answers
2k views

Input/Output console window in XNA

I am currently making a simple game in XNA but am at a point where testing various aspect gets a bit tricky, especially when you have to wait till you have 1000 score to see if your animation is ...
4
votes
1answer
512 views

How would I handle input with a Game Component?

I am currently having problems from finding my way into the component-oriented XNA design. I read an overview over the general design pattern and googled a lot of XNA examples. However, they seem to ...
1
vote
1answer
580 views

Input Handling and Game loop

So, I intercept the WM_KEYDOWN and other messages. Thing is, my game can't/shouldn't react to these messages just yet, since my game might be currently drawing to the screen or in the middle of ...
1
vote
3answers
4k views

How can I make a C++ countdown timer that doesn't freeze user input?

I'm planning to use the Sleep() function to implement a countdown timer. But this freezes the input of the user at the same time. Thus I wanted to ask if it is possible to have the countdown still ...
5
votes
2answers
823 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 ...
1
vote
3answers
421 views

How can I make smoother upwards/downwards controls in pygame?

This is a loop I use to interpret key events in a python game. # Event Loop for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() if event.type == ...
0
votes
1answer
457 views

Maximum number of controllers Unity3D can handle

I've been trying to find out the maximum amount of xbox controller Unity3D can handle on one editor. I know through networking, Unity is capable of having as many people as your hardware can handle. ...
5
votes
2answers
921 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... ...
1
vote
2answers
201 views

Making an interface for input in C - How?

I have a big question. I started to develop a simple 3D engine (or should I call it framework?). I use OpenGL for rendering and it is developed for Windows. It is all written in C. But I don't know, ...
-2
votes
2answers
333 views

Inputting cheat codes - hidden keyboard input

Okay, here's what I want to do - when the player is at the main menu, I want them to be able to type in cheat codes. That's the only place I want it to work. I don't want to give them a text box to ...
2
votes
1answer
317 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 ...
0
votes
2answers
200 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 running, the animations are updating, but the keyboard input is not ...
2
votes
1answer
994 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 ...
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 ...
2
votes
1answer
391 views

How to handle input for both UI and game

So I originally had my input system set up with only the game part in mind. It listens to keyup/down events, marks the key as pressed/unpressed and then when the next update comes around, it sends ...
0
votes
1answer
194 views

Supporting Multiple Input Devices

I'm currently developing a PC game with the assistance of XNA and I'm integrating keyboard and gamepad control support. Up until now I've only supported gamepad control, and finding an elegant way to ...
1
vote
2answers
662 views

Using two joysticks in Cocos2D

Here is what I am trying to do: With the left joystick the player can steer the figure and with the right joystick it can attack. Problem is that the left joystick seems to get all the input, the ...
0
votes
2answers
882 views

Action button: only true once per press

I'm using SFML2.0 and am trying to make a wrapper class for my controller/joystick. I read all the input data from my controller and send it off to my controllable object. I want to have two types of ...
6
votes
2answers
787 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 ...
3
votes
3answers
735 views

Detecting extremely fast joystick button presses?

Is it usually possible for the player to press and release a button within a single frame, so that the game engine doesn't have time to detect it? How do programmers usually handle this situation? ...
1
vote
3answers
1k 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 ...
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 ...
1
vote
2answers
543 views

What is the best way to handle MouseEvents in AS3?

What is the best way to handle MouseEvents? Should I add an event on each MovieClip I want to work with, or a general Event at a holder MovieClip (or even at the stage) with internal control from the ...
-1
votes
1answer
524 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 ...
2
votes
1answer
164 views

Game testing using mock input

In this post Patrick Hughes suggested, and michael.bartnett was kind to explain a bit how to do that. While it seems rather clear how to implement and use it, I'm still a bit doubt if this useful ...
1
vote
2answers
231 views

What is a library for event-driven mouse and keyboard input in Java?

The title basically says it all. The only thing to take into consideration is it needs to be cross platform.
0
votes
0answers
31 views

Voice Commands Using Microphone [duplicate]

Possible Duplicate: Voice input in games beyond voip chat I recently made a game where you say something into the microphone, and the computer repeats it, but I was wondering how to make ...
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 ...
0
votes
2answers
145 views

How much to bake user input in a client-server?

Assume a client-server game where there server manages all state and the clients are simply rendering / input. How much should I bake user input from the client before sending it off to the server? ...
4
votes
1answer
3k views

libGDX Multitouch Controls

Has anyone had any trouble implementing multitouch on-screen controls in libGDX, such as multiple joysticks? I've tried and I can't seem to get libGDX to play nice with multitouch/multiple pointers on ...
2
votes
5answers
2k views

Implementing pausing functionality

I'm working in LWJGL and trying to implement pausing when the user presses the 'P' key. Thus far I have this: boolean gamePaused = false; while(!Display.isCloseRequested()){ ...
1
vote
2answers
584 views

Detecting a click on a tile

I'm making a simple tile-map system in LWJGL, and I'm trying to figure out how to detect if the mouse is clicking inside of a tile. So far no matter where I click it's always the same tile that is ...
3
votes
3answers
814 views

How to refactor and improve this XNA mouse input code?

Currently I have something like this: public bool IsLeftMouseButtonDown() { return currentMouseState.LeftButton == ButtonState.Pressed && previousMouseSate.LeftButton == ...
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 ...
3
votes
1answer
1k views

XNA mouse position in windows forms

I am using this code in Update method in XNA RenderControl in Windows Forms: ... Mouse.WindowHandle = renderControl1.Handle; MouseState stat=Mouse.GetState(); ... Everything works fine but when I ...
3
votes
2answers
1k views

How can I map thumbsticks to cardinal directions?

I've got a tile based game that has notions of moving up, down, left, right and the diagonals (by alternating horizontal/vertical movement). I've found that if I use the default ...
3
votes
2answers
416 views

Is this aiming mechanic usable in a third-person top-down game?

Long story short: I've switched to a third person - top down perspective. The camera is fixed and looks down at the player. How can I implement 3d aiming ? The player needs to aim left and right as ...
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 ...
0
votes
1answer
289 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
167 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
141 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
701 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
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 ...
2
votes
3answers
804 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?
1
vote
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() { ...
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, ...