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
367 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 ...
3
votes
3answers
1k 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
37 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 ...
0
votes
0answers
73 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
1answer
388 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, ...
1
vote
2answers
403 views

LWJGL: Camera distance from image plane?

Let me paste some code before I ask the question... public static void createWindow(int[] args) { try { Display.setFullscreen(false); DisplayMode d[] = ...
0
votes
1answer
33 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); ...
1
vote
1answer
68 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
98 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 ...
0
votes
1answer
364 views

Unity3d - c# - changing FPSInputController controls through script

For a game I am making I would like the user to be able to change the controls (in game NOT through the clunky launch window (wich i disabled)) I have the system working but don't know how to change ...
0
votes
0answers
29 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
44 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
36 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
0answers
86 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 ...
0
votes
2answers
30 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 ...
4
votes
3answers
498 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 ...
1
vote
1answer
36 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
40 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 ...
2
votes
1answer
212 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
42 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
164 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
3answers
861 views

How can I export Blender game logic for controlling actor actions?

How does one export game logic ("Sensors") that Unity references for controlling actions from Blender's "Action Editor" or "Dope Sheet?" I have a Blender model that has game logic sensors that ...
1
vote
1answer
46 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
3answers
87 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 ...
3
votes
1answer
91 views

Proper joystick input processing

Take for example, the Xbox One controller. XInput returns joystick input along 2 axis (x & y). I'm not sure if the hardware just measures voltage across 2 axis or not, I'm not very knowledgeable ...
0
votes
3answers
122 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
86 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
36 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
32 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
35 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
0answers
34 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
89 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 } ...
12
votes
4answers
298 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 ...
3
votes
3answers
88 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 ...
5
votes
1answer
930 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
1answer
63 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 ...
1
vote
1answer
242 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 ...
0
votes
1answer
67 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: ...
28
votes
2answers
31k 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
0answers
23 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
49 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 ...
17
votes
3answers
8k 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 ...
0
votes
1answer
36 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
31 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.
11
votes
4answers
2k 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, ...
3
votes
1answer
109 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
250 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
1answer
84 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 ...
1
vote
1answer
80 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 ...
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 ...