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

learn more… | top users | synonyms

1
vote
2answers
74 views

Calculate 8 different directional input based on arrow keys combinations

Considering I have four variables event binded to each arrow key, that can be 0 or 1 My current approach to this issue is simply 8 nested ifs checking each combination or keys Is there a more math-y ...
0
votes
2answers
103 views

How do I hide an Input field?

I have in my hierarchy tab a Canvas. Inside the canvas I have an Input Field that holds a placeholder and a text. I read the documentations and didn't find how to hide the Input field. I want that ...
1
vote
2answers
29 views

Can't move rectangle constantly with key down

I can only move the rectangle every time I push a key down. How would I continuously move my shape when the key is down? Here's my code: for event in pygame.event.get(): if event.type == ...
0
votes
1answer
26 views

Unlock cursor through script

I am using unity's default FPS controller script. My game switches scenes, and when it does I can't move the mouse. I know that this is because of unity's m_mouselook's lock cursor is on. What I don't ...
0
votes
1answer
61 views

Managing left and right direction buttons being pressed at the same time

I am currently programming a Tetris clone. In Tetris, there is a system being used called DAS, or Delayed Auto Shift. It works similarly to the keyboard auto-repeat used in Windows. For example, if ...
0
votes
1answer
35 views

How to handle keyup events in game loop?

I'm writing a simple game in JavaScript, which already handles basic keyboard input like so: var input = {}; while (!done) { handleInput(input); update(); render(); } document.onkeydown =...
0
votes
2answers
50 views

Add a random number to an existing number to produce output in Unity

I am trying to add a random number to an existing number. I am able to get the output in Unity console, but in the inspector, I can see that the public variable is on a non stop loop. I intend to ...
0
votes
0answers
17 views

Executeable Jar - getResourceAsStream()

I'm trying to create an executeable jar, but i have a problem. On some parts of the code I'm using a BufferedReader to recive a String Array. Now I've seen somewhere that i need to use SomeClass.class....
0
votes
1answer
44 views

Accessing soft keyboard on Android via Monogame

I have a game built in Monogame targeting the Android and iOS platforms. I need to develop a login form for the game. I've begun to roll out my own UI components (text inputs, buttons, so forth), as I'...
1
vote
1answer
87 views

Camera rotation in 4D

What practical choices do I have in order to rotate a camera in 4D space? I would like to make it as intuitive as possible. A camera in 3D space can be represented by a point where it is located the ...
0
votes
1answer
12 views

Unity Controller to Make Reticle Orbit based on the right stick input

d platformer arena like game. Right now I have it so a reticle moves around the player based on a controller's right stick's horizontal movement using the rotate around function and while it works ...
1
vote
0answers
32 views

Is it possible to simulate different vendor gamepads?

As a developer it would seem natural that I would like to support as many possible hardware compositions as I can, however as I'm not a big studio I have a limited budget, which means I have to get by ...
2
votes
1answer
57 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 ...
0
votes
1answer
36 views

How does input work when exporting to Android?

I know I must add Android sdk , but my question is this : If I make a game that works with the mouse, for example a puzzle game, then I output my game to Android, do I have to rewrite it to work with ...
1
vote
1answer
53 views

Any good pattern for managing user input in XNA

I'm doing some experimentation on XNA, and unlike past experiences with XNA, I wanna do stuff right. Are there any good patterns for managing user input? Like... how do I manage what components get ...
1
vote
0answers
34 views

How does Unreal Engine 4 manage received user input?

I have developed an application which runs on my laptop (the client). This client-application captures key presses and sends them via UDP to another application, which is running on a remote machine. ...
1
vote
1answer
54 views

How do I get the InputManager to recognize a certain axis/Vector2D with a Vive motion controller?

Right. So basically I want to map the Vive motion controller touchpads (certain locations) to the certain inputs in Unity's InputManager. How do I do this? Like I want a certain area on the touchpad ...
1
vote
3answers
128 views

Delay for seconds when key is held down?

Hello I am very new to Unity and am trying to make a shooting game in which when the space key is pressed down the gun charges then shoots. I want it to wait for 0.3 seconds before the gun fires off ...
1
vote
0answers
118 views

Jump height being affected by the duration of how long jump button is pressed

So I've been trying to implement a controlled jump the way the title proclaims to make the game easier to play and having the ability to make harder challenges in each level. I have noticed how there ...
0
votes
5answers
149 views

What keys should I use for a four-player game with one keyboard?

I'm planning on making a multiplayer game for up to four people on a single machine. We want to have all input coming from players using the same keyboard (or multiple keyboards connected to the same ...
2
votes
0answers
54 views

Does the Windows Raw Input API provide lower latency input than WM_MOUSEMOVE?

I've read up a lot about the Raw Input API and so far could only tell that it bypasses os filters like mouse acceleration. However what i am looking for is a way to reduce input latency on mouse ...
2
votes
2answers
57 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 ...
0
votes
0answers
35 views

(Game-Maker GML) Keyword based conversation system with text input box (Ultima 6&7 style)

I would like to create a keyword based conversation system for my game with a text input box (like in Ultima's 6 & 7). For example an NPC may say "I'm going to the CASTLE to the NORTH but I need ...
1
vote
1answer
65 views

KeyCode dictionary in Unity

I found a strange problem while programming keyboard input in Unity (v5.3.5). public class AvatarInputMapperUnityContext : MonoBehaviour { private AvatarController _avatarController; public ...
1
vote
1answer
89 views

How to check strings from multiple lines in one input field?

I need help with input fields. I already set the line type to 'Multi_Line NewLine' in inspector, but I have problem with submitting the string. Here's the code: using UnityEngine; using System....
0
votes
1answer
40 views

Can't read input from keyboard

I'm new to game dev,and I just trying to create my first game,a simple pong game.But i can't handle the keyboard input. This is what i got : const Uint8 * keystates = SDL_GetKeyboardState(NULL); ...
0
votes
0answers
39 views

how do i drop a block into grid?

I am trying to drag a block and place it on a grid in unity5. The grid can be empty or already occupied. How do I handle the dropping of block ? I have a 2D array of blocks type, where: class ...
0
votes
1answer
60 views

SDL Key Input previous and current key states not working as expected, how to fix?

Here is my code that's part of the main game loop: // ResetKeyState stores currentKeyState in previousKeyState // and then clears currentKeyState engine.ResetKeyState(); // Fill ...
0
votes
0answers
38 views

What are the benefits of decoupling the input system from the gameplay system?

I want to decouple as many systems as possible from the main loop. Probably the most beneficial would be to decouple the renderer and the gameplay system. But I am wondering about what I should do ...
0
votes
2answers
43 views

Getting input from just one Axis at a time

I'm trying to make a CharacterController2D Script for a simple 2D TopDown game, but i was wondering, what would be the best way to disable 2-axis movement? just allowing one direction at a time (Maybe ...
1
vote
1answer
96 views

controll mouse cursor movement speed in unity

Im searching for a way to lower my mouse movement cursor speed and not to let the user move it fast but i dont know how. i searched in internet but could not find something Usefull. thank you for ...
0
votes
1answer
79 views

Libgdx unable to enter input in TextFields

Hello I am trying to make login screen for my game, I use TextField's. 1. I am not satisfied with how they look I want it to look like this but simpler - basically to have a white field next to the ...
1
vote
1answer
58 views

AntTweakBar doesn't register SFML mouse events

I'm trying to add GUI for easier level editing in our game engine. We're using SFML for all the basic stuff (window management, input events etc). I've chosen AntTweakBar because it is a well known ...
0
votes
0answers
125 views

How to convert mouse location with respect to any camera/object in Unreal?

I am currently working on a VR project (First Person Shooter) where the player can shoot any where on the screen. I am using a Render to Texture method. The VR part is working fine. The problem I am ...
0
votes
3answers
110 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
136 views

How to make inputing large inputs more engaging [closed]

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 ...
1
vote
2answers
136 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
74 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
43 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
39 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?
1
vote
1answer
1k 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, http://stackoverflow.com/questions/7223723/in-libgdx-how-do-i-get-...
0
votes
0answers
66 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 Input-...
1
vote
2answers
125 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
126 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
73 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
149 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
25 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. When ...
0
votes
0answers
59 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
410 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
128 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: https://github....