Input is data provided to a game via player interaction (through the mouse, keyboard, gamepad, et cetera).

learn more… | top users | synonyms

0
votes
3answers
60 views

Get pressed character in LWJGL (Ignoring modifier keys)

I have a basic text field setup in LWJGL, however pressing any modifier keys (Shift, F1-19, Page Up, etc.) inputs a space into the text field. How would I ignore those characters? Here's some code so ...
0
votes
3answers
99 views

How to make inputing large inputs more engaging [on hold]

I asked this question on another exchange "Encrypted content in games" and it made me wonder about game design. The basics of that question is that you are using user-input, either directly or ...
0
votes
2answers
57 views

How to know when user has stopped dragging

How can we know when user has stopped dragging fingers over screen if user has not removed finger from screen but stopped dragging ?
1
vote
0answers
13 views

Unity: onEditEnd and onSubmit only firing from Return key

I have an InputField in my UI, but currently I can only submit its contents via the Return key. I tried mapping other buttons to the Submit action (e.g. the tab key on keyboard and the X button on my ...
1
vote
0answers
19 views

Unity keyboard GUI navigation priority

I noticed something strange while playing with my menu on keyboard. I have four items arranged in a square (i.e. the top-left item should be able to navigate to the top-right and the bottom-left). If ...
0
votes
1answer
28 views

How to enforce touching within a ring shape?

I'd like to have the player moving the finger within the shaded ring: The game should be able to detect "out-of-boundary" events once the finger moves outside the ring. How can I accomplish this?
0
votes
1answer
73 views

Handling Back Button in Android without implementing InputProcessor

Please advice/clarifyon below issue in libgdx while handling back button in Screens. I have already gone through these 2 threads, ...
0
votes
0answers
15 views

How to hook up mouse listener in Slick2D

I'm trying to code a "Button"-class in java using the Slick2D-GameEngine. Does anyone who is familiar with this engine know where and how exactly to hook up this class to the GameContainer's ...
1
vote
2answers
64 views

Detecting first or second Mouse Button Release?

I want to know how to detect if the user has released the mouse button the first time, or the times after that: Pseudo-Code: if *first* (Input.GetMouseButtonUp(0)) { do something } ...
3
votes
3answers
65 views

MonoGame - Ordering Movement Key Presses

I'm looking for a way to retrieve the last key pressed even when other keys might be pressed for a top-down four-directional game. For example: W is pressed → Move up D is pressed → Move ...
4
votes
1answer
56 views

What is an OO way for my input layer to act upon objects?

I'm building a top-down RPG specifically to practice Object Oriented thinking and design. I am keeping in mind coupling, single-responsibility, and so forth. One design issue that's been bugging me is ...
0
votes
0answers
41 views

Simulate a touch on a point where ray hits in Unity

I want to simulate a touch input on the position where a ray hits an object, and only if it hits something. I know that it's not common to do it with a raycast, but I need it this way for the HTC ...
1
vote
0answers
19 views

What are some different types of device motion gestures? [closed]

Complex touch events are well-defined and can even be categorised as seen in this Wikipedia article We have great names for various touch gestures like: Double-tap Pinch / Zoom Long Press etc. ...
0
votes
0answers
36 views

How to activate user input modules with platform defines in unity?

I'm having some trouble understanding the activation process with input modules. I'm making a game that can work on mobile or on Desktop in VR. Basically, it works by creating a world-space canvas ...
2
votes
1answer
60 views

Unity Controller navigating UI

I want players to be able to use a controller to navigate our game's menus. We use Unity's new UI, and in the EventSystem have specified a controller axis for our vertical axis. However the selection ...
0
votes
1answer
40 views

Import JXInput by StrikerX3 Into Eclipse

I'll be honest, I'm stumped, I've been trying all night, googling away, made multiple attempts and failed every time. The library in question that I'm trying to add to my project is: ...
0
votes
1answer
30 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 ...
0
votes
1answer
23 views

Setting the cursor's location in JavaFX

Is there a way to set the cursor's location in JavaFX while the window is in focus? I've searched the possibility of the Scene's cursor object, but that leads to a dead end.
3
votes
1answer
62 views

Testing SFML sf::Touch on ordinary PC

So I’ve created a small app that is designed to be used on smartphones and tablets. Accordingly the app makes use of the sf::Touch class which determines the point on the screen of the device that the ...
3
votes
0answers
133 views

Input.GetAxis(“Horizontal”) not updating

I'm having trouble with Unity's basic character controlling. After i implemented the crouching in the code below the Input.GetAxis("Horizontal") does not update (while the left control is pressed ...
1
vote
0answers
26 views

Help with open and close UI Menu on background mouse click

I am trying to make a point and click game in unity 5.2.2. My problem is that I need to have a UI menu to open, when the player clicks with the left mouse button on the background sprite, and it ...
1
vote
1answer
55 views

How to handle complex input

In my Libgdx project i need to handle several types of inputs. In particular these input events are needed in order to interact with the Actors that the user puts in the Stage. The possible ...
1
vote
1answer
42 views

Java game LWJGL input doesnt work properly

Im making a game in LWJGL 2 and Slick2d. Im trying to add an item to my inventory by releasing a key (the inventory system works properly, the part where I have to see if the button was RELEASED is ...
1
vote
1answer
60 views

LibGDX Headless System.in

I started developing a little multiplayer game with LibGDX and Kryonet. I'm also using the headless backend for the server. So far everything went well, but now I'd like to create a command-line ...
0
votes
1answer
67 views

Handling multiple input mapped to single in-game controls

I am trying to map multiple input types to single in-game controls using libGDX's InputProcessor and ControllerListener interfaces. Currently, I have created a single InputType interface which is ...
15
votes
2answers
2k views

How to avoid ghosting when pressing multiple keys?

I am working on a 2d side-scrolling pc game that uses SFML game library. The problem that I am not able to solve is that in many keyboards combination of three or more keys (like w + d + k) is not ...
23
votes
4answers
6k views

Is it normal for a game to use 100% CPU?

I just implemented multi-threaded input handling in my game engine where the code that polls the OS to gather input from it and time stamps them is in a separate thread and each frame in the main ...
6
votes
3answers
949 views

How do I accept only one directional input per update?

I'm coding "Snake" as my first game and I'm facing the logical fail when pressing multiple keys simultaneously eg. { up, right}; {up, left}; {down, right}, etc. Snake is able to go back and forth and ...
0
votes
0answers
41 views

Input management with context mapping for javascript game (I need a boilerplate code sample)

I have been working on an entity component system latelly and now it is time to add input management into the mix. I have read through a few tutorials about input management and as far as I understand ...
1
vote
1answer
94 views

How to stop movement when an action key is pressed even if movement key is pressed

I'm making a 2d side-scrolling fighting game in game maker:studio and I want to make a code that when the player attacks he stops moving. I've tried some options: keyboard_check(ord("D")); both ...
1
vote
1answer
67 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 Player class which ...
0
votes
1answer
51 views

How to create axes for a console controller

What should I change in the input manager to enable me to use a joystick? I have a usb cable to connect the joystick to the computer but how do I set up the controls?
1
vote
1answer
37 views

SDL.NET no longer detecting modifier keys

I'm using SDL.NET with C#. Recently, a bug has appeared where the library does not detect if the shift key is held down; although it used to do so. private static void KeyboardEventHandler(object ...
1
vote
2answers
58 views

Handling Input During Frame Drop?

So i was wondering how games handle input so that the input is still handled even in cases of the frame rate being really low. Assuming the input logic is in the same thread as the rendering in the ...
1
vote
4answers
97 views

Moving Object on One Axis

Hi Im trying to move some 3D text on one axis, but for some reason it moves on 2 with this code. Can someone explain why this is/ how to fix it? Maybe this is a simple solution but i cant find it. ...
0
votes
1answer
73 views

Getting mouse movement value with DirectX Tool Kit

today I want to ask a question about how to get mouse movement value with DirectX Tool Kit. While I can certainly use Mouse::SetMode(MODE_RELATIVE), to do this, I want to be able to get the mouse ...
2
votes
1answer
87 views

Using USB sound input for an android game - is it possible?

We are brainstorming ideas for an app, for a major project using Android Studio, and writing in java. My major is game development, so I intend on trying to build a video game based off the use of an ...
1
vote
1answer
43 views

Multiple input not working properly

I have 3 different buttons, one for each action. I want to be able to jump and walk at the same time, but there's a little problem. jumpButton doesn't work while I'm pressing leftButton or rightButton ...
0
votes
0answers
119 views

GLFW - Event Polling System

I need some help on design. I'm making an event polling system, where a window is notified of events as they happen. I handle events at a system level in my GLFW backend, by using callbacks. ...
1
vote
3answers
71 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 looking to add a new state to the game ...
1
vote
1answer
30 views

libGDX sprite image not updating Event Handling InputHandler

I created a separate inputHandler class implementing InputProcessor. I'm using Event Handling (libgdx github page: https://github.com/libgdx/libgdx/wiki/Event-handling) public class inputHandler ...
0
votes
2answers
114 views

Getting if a key was released/pressed this frame (C++/SDL2)

Getting if a key is currently down is easy. Just return keys[scancode]: switch (ev.type) { case SDL_KEYDOWN: keys[ev.key.keysym.scancode] = true; break; case SDL_KEYUP: ...
1
vote
1answer
191 views

libGDX: Why doesn't Gdx.input.isKeyJustPressed() work?

I'm trying to use the method Gdx.input.isKeyJustPressed() to check if the Android BACK button was just pressed. I don't want to use the Gdx.input.isKeyPressed method to avoid multiple calls. Here is ...
1
vote
2answers
70 views

Using fixed timestep and interpolating states makes physics fall behind one frame. Does that affect responsiveness?

The title says it all, but let me build more into the question: I suppose everyone by now knows the Fix Your Timestep article, and its proposal to free your physics engine steps from your rendering ...
1
vote
1answer
138 views

LibGDX : Textfield input type

I want to change TextField input type . When I click on the textfield the android keyboard appears with all the symbols , but I want only numbers and dot (.) . TextFieldStyle textFieldStyle = new ...
1
vote
1answer
834 views

How to create scrolling input text field using Unity UI

How to create scrolling input textfield using UI in Unity 4.6.6 problems in my project are 1.Cursor is not masking 2.Scrollbar size is automatically become 0 to 1 size 3.Scrollbar is not working ...
0
votes
0answers
66 views

LibGDX with Parallax Camera, unable to accurately select objects

So, basically I borrowed the ParallaxCamera test that LibGDX provides and got the camera set up rather nicely. However, I noticed that when I specify a speed other than 1, my game objects shifted ...
1
vote
1answer
21 views

Unity: Can't access repeatDelay from StandaloneInputModule?

I have a very specific problem. I'm trying to change the repeatDelay variable within my StandaloneInputModule, but it's not coming up as a variable. All of the other variables come up when I use ...
1
vote
1answer
208 views

Event-/Input system with SFML: Cannot move diagonally in 2D

I am a beginner in anything with game development. I written a small prototype in which i can move a square around with the arrow keys. For that i use SFML. At the moment i experiment around with my ...
2
votes
1answer
416 views

GetButtonDown for Unity keyboard UI navigation?

By default, Unity's keyboard navigation for buttons seems to check for GetButton rather than GetButtonDown--if a menu has 5 items and I hold the down arrow, it'll scroll very quickly to the bottom. ...