Input is data provided to a game via player interaction (through the mouse, keyboard, gamepad, et cetera).
0
votes
1answer
23 views
InputField text to string variables of a struct
So, here's my issue. I have a class that contains a struct. This struct contains about 7 different string variables. I can set the values of these variables via a constructor that takes the struct ...
0
votes
0answers
11 views
any help using LibGDX Gesture Listener?
I've been trying to use GestureListener to turn touchscreen into the effect of my dpad.
It all works pretty much, but the touch-held (or longpress) is not always working.
It mostly does work but will ...
0
votes
1answer
40 views
How can I detect if a gamepad stick has been pushed to the limit?
As in the question, really. I want to be able to detect if a gamepad has it's analogue input pushed as far as it can go in any direction.
Given x and y axis values in the range [-1, 1] (-1 being left ...
0
votes
1answer
33 views
Unity C# Input Buffering
So, I've got a fighting game with some pretty tight input windows, and I'd like to buffer the inputs for a few frames.
Basically, if the fighter is in the neutral state, pressing attack should lead ...
0
votes
1answer
16 views
Need help solving EventHandler issue
I have an issue with my EventHandler for Key events in my game.
The specifics are in this forum thread: http://www.java-gaming.org/topics/problems-with-key-event-handling/37998/view.html
Basically, ...
3
votes
1answer
48 views
Unity 5 - Input Field - How to confirm password entry with ENTER only and not a click/loss of focus
I have an input field password box, currently the password is 'submitted' either by clicking Enter or by clicking elsewhere on the screen.
This seems to be the designed way, as it states this in the ...
-2
votes
1answer
45 views
Can you please help me transform this script to adequate to mobile touch in unity?
My code here works with a keyboard:
if (Input.GetKeyDown (KeyCode.UpArrow)) {
if (transform.position.y < 1.662f) {
transform.Translate (0, 0.26F, 0);
}
}
if (Input.GetKeyDown (KeyCode....
1
vote
1answer
39 views
How to catch basic system events (such as input) in Linux/C++
As old and as standard as Linux/C++ is now, I would imagine there's an efficient method, even a library or three, for something as elementary as catching system events.
The types of events I need are ...
0
votes
0answers
24 views
Do GameObjects still get updated when playing a Unity Ad?
When you play a Unity add on android/IOS the entire screen is taken up playing a video the only thing the player can do is watch the video, click on it or close the ad at the end.
While this is ...
1
vote
1answer
75 views
Disable spaces in InputField
This is straight forward. I have an input field and I want to restrict the user of inputting any spaces. I was thinking to make a script that checks if the user typed in a space and then remove it, ...
0
votes
1answer
22 views
Handling mouse input depending on selected unit and clicked tile
I am making a turn-based tactical game (think something like X-Com) and I am currently trying to figure out how to handle mouse input in a clean way without a mess of if-statements.
I have a lot of ...
0
votes
2answers
67 views
Input's Not Changing on Keypress
So I have been following this tutorial.
https://www.youtube.com/watch?v=wdOk5QXYC6Y&list=WL&t=1226s&index=21
You can watch 16:00 - 18:20 to see what I am trying to do.
What should be ...
1
vote
1answer
80 views
Transform manipulator for Unity/Oculus Touch game like in Quill, Medium etc
I'm trying to create a script to manipulate the transform of a gameobject using the Oculus Touch just as in for instance Quill or Medium, with rotation, translation and scaling. Can somebody help me ...
0
votes
1answer
42 views
How to only allow one space in an InputField?
I've been messing with this for a while now and I can't get this to work 100%. I'm using an InputField for players to enter a character name, and I want to allow a first and last name. Here's how I've ...
0
votes
0answers
11 views
Does rawinput buffer during phases of rendering to give an identical experience on any computer
When polling raw input, does it mean that the input is buffered and I won't lose instructions?
For example, suppose someone has a really fast computer and the render() call takes 1 ms. Suppose ...
-1
votes
1answer
45 views
Remove delay when changing axis input in the Unity Input Manager
I had a problem playing with the Input Manager, where for example:
When Horizontal (+) is pressed, it increase its value but, when Horizontal (-) is pressed, the horizontal value stays positive ...
3
votes
1answer
62 views
Handling multiple controllers in a single player game
Currently implementing input support for a single player game and I'm unsure how best to handle the (admittedly odd) situation where the user plugs in 2 or more controllers. Should only one be active, ...
1
vote
1answer
110 views
Unity 5 - How to change Input Field 'Content Type' at runtime to toggle between asterisks and letters?
I have a password box set up in my project with the content type set to 'Password', so it shows asterisks when the user types in the box. However I would like a toggle switch so the user can click to ...
0
votes
2answers
95 views
Input.GetKeyDown need to press button more than once to work
So in Unity3D I'm checking for Input.GetKeyDown(KeyCode.E) for stuff like pickups and opening doors. Sometimes it doesn't work the first time I press it and I must press the key E like 2-4 times, and ...
0
votes
0answers
15 views
Issues with keyboard handling SDL_Input with Directx9 for graphics
I had a pseudo-engine made with OpenGL for 3D graphics and SDL2 for the window, input, files , textures, UI, audio... And it was just for especific purposes, so it didn't had an editor integrated, ...
0
votes
0answers
14 views
Reset Input.GetAxis ('Mouse ScrollWheel') when entering/exit ScrollView?
Situation is you have 2 ScrollViews(A & B) aside to each other, you proceed to scroll the mouse wheel to move them, the current focused ScrollView(A) moves and if you quickly focus B then it ...
1
vote
2answers
113 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
268 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
51 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
52 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
66 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
51 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
54 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
20 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
96 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
105 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
27 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
37 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
62 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
40 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
61 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
66 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
142 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
188 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
123 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
232 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
92 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
70 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
48 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 ...
2
votes
1answer
117 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
168 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
42 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
43 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
87 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
39 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 ...