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

learn more… | top users | synonyms

0
votes
0answers
15 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
51 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
13 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
1answer
31 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
29 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
41 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 ...
0
votes
0answers
14 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
66 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
41 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
12 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
67 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
52 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. ...
0
votes
1answer
66 views

Game Controller that is constantly changing

I'm writing a game where the main character is a ghost, and therefor can possess just about everything. The problem is, I'm not sure how to efficiently & effectively handle the changing actions of ...
0
votes
0answers
43 views

Unity Input manager with chain of responsibility and delegates

I am working with unity and I am trying to build a better input system for my game. In essence there would be a singleton class that is the input manager. The player would subscribe to the manager ...
0
votes
1answer
35 views

Unity3D - Change player input axes on trigger

Hope someone can help me with this, it seems like it should be a simple problem but that only makes it more frustrating! I have a simple game where you roll a ball around by applying force to the ...
0
votes
2answers
51 views

How can you have the Input Manager Axis values snap to 1 (or -1)?

When a selected key is pressed in Unity, the Input Manager's Input.GetAxis("Horizontal") function returns a gradually increasing number up to 1 (or negatively -1) for the length it is held down. The ...
1
vote
1answer
59 views

Actor not taking touch libGDX

I am trying to handle the touch of one of the Actors in the stage. The following is the code I have written: public class MyGame extends ApplicationAdapter { private GameStage gameStage; //Game ...
0
votes
0answers
20 views

In HLSL pixel shader, why am I getting [-256.0, 256.0] values in SV_POSITION input?

My question is basically in my DirectX11 pixel shader, why am I getting a range of values from -256.0 to 256.0 in the SV_POSITION input instead of the supposed values from 0.0 to ViewportWidth and 0.0 ...
1
vote
0answers
54 views

How do I manually submit a new UI InputField in code?

I need some conditions for submitting the text inside of an Inputfield, however I cannot find a way to do this via code. I was expecting something simple like with WPF or WinForms, but I cannot find ...
0
votes
1answer
45 views

Given a constant rotation and target point, find position so that point will be in camera center

Given a fixed rotation and a target "center" point, how to I find the position the camera should be in so that that point is the center? LookAt changes the rotation keeping the position constant. ...
0
votes
1answer
118 views

Handling input with callback functions

I'm not sure if I understand callback functions completely - they are functions that another function calls? This seems like a powerful tool, especially w/r/t handling input. I've written up this ...
0
votes
0answers
24 views

Change pointerDrag target during a drag

In Unity, I am trying to change which GameObject is receiving drag messages from my EventSystem's StandaloneTouchInputModule. E.g., while I'm dragging one object, a script reassigns who is receiving ...
0
votes
1answer
56 views

Button image on game menu is updating too slow

I'm using SDL2 and i'm facing a problem with my game menu buttons. Every time i detect that the mouse pointer is over a button of the menu i update the image of the button (from MOUSE_OUT to ...
0
votes
1answer
32 views

Making a ordered list iterator [closed]

Noob here, I am trying to display a list of a vector with ascending numbers. To display the list I iterate through the following code. cout << "\nYour games list is: \n"; for (iter = ...
1
vote
2answers
37 views

Flushing KeyboardState

I'm using a simple InputManager class for an XNA game with keyboardState and lastKeyboardState that gets updated and has KeyDown/KeyReleased/KeyPressed functions... but ran into a small problem: I ...
1
vote
0answers
60 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 ...
-1
votes
1answer
51 views

Sprite movement only works the first time, can't figure out why [closed]

In my libGDX game I have finally managed to get the sprite to move the way I want him to but for some reason my desired outcome only works the first time I run the code. If I try to run it again, he ...
0
votes
1answer
107 views

LibGDX how to efficiently handle button presses

I'm making a simple 2D game for android using LibGDX. My game needs to have many buttons in it that fire off a method when pressed, and I was wondering what the best way to do this would be. I tried ...
0
votes
1answer
150 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 ...
-1
votes
1answer
87 views

How can I implement input handling into my game?

I'm making a libgdx game where the player dodges falling objects. To move the player I have it set so that on desktop he moves left and right when you press A and D respectively. I am trying to ...
2
votes
1answer
100 views

Unity joystick input acting strange

After setting up my joystick axes in Unity and sweeping them around I find that the Y-axis jumps to the opposite direction in certain positions. So, when I press up on the joystick, the input will ...
0
votes
1answer
89 views

In Unity, how can I check if an input was made x seconds/frames ago?

I'm using the Rewired input plugin, and it comes with an input buffer. I enabled the buffer for my directional keys and airdash button so that the player doesn't have to hit both keys on the same ...
8
votes
2answers
891 views

Unity 3d 4 players Only 4 buttons can be pressed at a time

Only 4 buttons can be pressed at a time, so players cant move sometimes Each Player Has their own Controls i Change, Up Arrow and the other ones for each player---v InputsV-V-V public string ...
0
votes
3answers
130 views

What are real world uses of secondary key bindings?

I'm currently wondering if there's really a reasonable use that would justify making the effort of implementing secondary key bindings? If you don't know what they are: They allow multiple controls ...
1
vote
0answers
74 views

How can I hook up player input to an action in RPGMaker?

How do I set a player input to perform an animation such as swinging a sword. I tried doing it by creating a parallel process in which hitting z calls the following common event. Change Party ...
0
votes
2answers
184 views

Better ways to parse text adventure commands? [duplicate]

Currently I have got a system set up where I split each sentence handed to me into it's baser parts and then compare each word against a list of known words. Once I have the verbs, adjectives and ...
2
votes
1answer
143 views

How can I support multiple player inputs in Pygame?

I'm trying to develop a team-based Asteroids game. It's going well except for the "multiple user inputs to a single machine" part. Can anyone recommend a method for getting and updating 6 players ...
1
vote
1answer
105 views

Reference keyboard keys as “justPressed”, “pressed”, and “justReleased” with SDL in C++

I'm teaching myself 3D graphics with OpenGL and SDL in C++. I'm at a point where I need to be able to query states of individual keys, like so: if (InputManager::justPressed(SDLK_UP)) {} if ...
1
vote
0answers
232 views

In GM Studio, how do I prompt the player for a password?

I could make strings in earlier Game maker versions, but it doesn't work in the Studio version when I try. The code I used: When Left Mouse Clicked on Password Bar: var str; str=get_string("Crack ...
32
votes
6answers
5k views

Can I (safely) assume that people playing my game have a middle mouse button?

The title pretty much says it all. I am currently writing a desktop game, which will probably not be played by the casual gamer. Thus my expectation is that nearly every user will most likely ...
1
vote
3answers
258 views

Problem getting mouse events while keys held down in SDL2

I'm attempting to write input capturing code using SDL2 on Windows. However, I'm running into a problem. Whenever a key is held down, the SDL event queue has no mouse movement, nor will the mouse ...
0
votes
0answers
274 views

Unity3D C#: How to resize an inputfield according the content which is set dynamic

I've got an InputField where the text is filled in upon getting a string back from the server. We can debug the entire text so we receive it correctly. However the text is too long to fit in our ...
0
votes
0answers
55 views

Removing extra blank window when adding Jmonkey based sound to Java based game

I'm currently programming a simple run and jump game in java. I'm in the process of implementing sound and I'd like to use Jmonkey's sound because I'd like to eventually switch the whole game over to ...
1
vote
1answer
118 views

How to handle input in Monogame

I've just switched over to MonoGame from XNA. Since MonoGame is supposed to have the same API (implying that any copied code should work as usual), I've run into a strange issue- input doesn't seem to ...
0
votes
2answers
243 views

Handling player and AI in a component based structure dynamically?

I'm trying to find a way to allow both input and AI to call actions of an actor in a component based structure for a 2d turn based game. The actions make use of the components. To keep the system ...
4
votes
2answers
1k views

Getting a pixel of Sprite at the cursor position in Unity

Summary: I've been trying to figure out a way to use simple box colliders as a nice and efficient "first pass" collider. For the "second pass", I want to check that the area clicked has an alpha value ...
0
votes
0answers
50 views

how to disable touch in Quintus?

hi i'm new in web games development and trying to build card game using the Quintus game engine i have object called card i can touch and drag it in the screen but i want just to touch and drag it one ...
0
votes
1answer
81 views

Checking whether a specific key was pressed in enchantJS

I am using enchantJS and would like to use the letters and numbers as well as numpad on a keyboard to do different things (eg: hotkeys). From this page ...
1
vote
5answers
91 views

What to do with input during movement?

In a concept I'm working on, the player can move from one position in a grid to the next. Once movement starts it can't be changed and takes a predetermined amount of time to finish (about a quarter ...
0
votes
0answers
50 views

How do I simultaneously capture and play sound with SlimDX/DIrectSound?

Is it possible to simultaneously capture microphone input and play back some other sound, using DirectSound via SlimDX? How?