Translation of user input (via mouse, keyboard, gamepad, touchpad or other hardware interface) into in-game actions

learn more… | top users | synonyms

-3
votes
0answers
26 views

How to do movement controls for android device?

I am having problems with this. I am a new game developer and I am using a Unity tutorial. But I want to add touch input for car movement to left and right.How can I do this? using UnityEngine; using ...
0
votes
0answers
11 views

Examples of movement control by drawing paths/trajectories

Can anyone think of game examples that use the type of movement controls that Strikefleet Omega employs for mobile devices? There you basically use a swipe motion to drag a path for a unit to follow. ...
1
vote
0answers
37 views

Are accelerometer based games a bad idea because it limits playability? [closed]

I'm making a mobile game where the main control mechanism is tilting the phone to control movement. I'm worried that this is a bad idea because it limits how a user must be positioned in order to ...
0
votes
1answer
43 views

In Unity, what does the camera script's “Behaviour missing” error mean?

I started in Unity few days ago and made a cube with a tank control style. Now I'd like to create controls similar to 3D fighting games (Gunz, Blade Symphony, …): Control body direction with the mouse ...
0
votes
1answer
43 views

Twin-stick controls for a cohesive group of agents

I'm trying to implement a classic twin-stick controller for a group of physics-based game objects. Here are the rules I'm trying to follow: Agents always stay close to each other within a certain ...
1
vote
3answers
644 views

Unity rigidbody2d.velocity jumping causes weird bouncing

Im working on a game 2d game that has some platforming. I followed this video as guidance and produced the following code: public class PlayerControler : MonoBehaviour public float ...
12
votes
4answers
785 views

How could I constrain player movement to the surface of a 3D object using Unity?

I'm trying to create an effect similar to that of Mario Galaxy or Geometry Wars 3 where as the player walks around the "planet" gravity seems to adjust and they don't fall off the edge of the object ...
0
votes
2answers
359 views

How can I move objects pixel by pixel in the scene editor?

I'm trying to find a way to move objects pixel-by-pixel(on my screen at least) in the scene editor. I tried a lot of different buttons but nothing seems to work, please tell me Unity has this ...
0
votes
1answer
223 views

Box2D platformer: Why does horizontal movement stop jumping?

I'm writing my sBox2D game character's movement code, but my implementation of jumping is failing: When I press the Jump key, the character jumps OK. However, when I press jump and another key (like ...
2
votes
1answer
72 views

Giving one controler button two functions

I'm currently working on a game that allows the player to do some different actions. Dodge (X button) Attack (A button) Use Item (Y Button) Block (BButton) I would like to be able to use the "Y" ...
3
votes
1answer
87 views

Algorithm for sensing mouse movements like a wiimote

I want to make a driving game where you can do tricks with your mouse when you hold down LMB. Ex. if you move it up in a straight line really fast (your cursor goes from the bottom to the top of the ...
1
vote
1answer
401 views

MonoGame hosted in a control/form

I would very much like to host my monogame window inside a Form so that I can take advantage of the nice gui elements in the C# framework when creating a simple level editor. I have looked online, but ...
0
votes
1answer
498 views

Change players state and controls in-game

I'm using Unity 3D Let's say the player is an ice cube. You control it like a normal player. On press of a button, ice transforms (with animation) into water. You control it completely different than ...
1
vote
2answers
238 views

Can I have keyboard controls in an MMO and still do movement calcuation in the server?

I'm trying to decide between keyboard and mouse movement controls for a web-based multiplayer. It would be quite resource-intensive to use the WASD-keys and AJAX the server with controls every second. ...
1
vote
1answer
516 views

What alternatives are there for creating Keyboard/Mouse controls in LWJGL?

So I'm currently working my way through openGL tutorials, using LWJGL to do all my work in. However as I get to the part on how to access Keyboard and Mouse events in this library, I stumble across ...
1
vote
1answer
65 views

How can I assist players navigating narrow grid junctions?

I'm looking for a technique to help the player navigate a narrow path while the character is in constant motion. When changing direction in junctions, it's pretty hard to time the direction change for ...
1
vote
1answer
103 views

How to make loss of control acceptable?

Let's say the game we're talking about is some kind of platformer. With all the puzzles, mini-challenges and mechanics aspects it is very, very important to have good control over the character. A ...
1
vote
1answer
279 views

How can I have human-readable key names in a configuration file?

Given a file mapping keys to controls, such as this: up w down s left a right d jump space run shift crouch ctrl The values need to be converted into game commands, ...
0
votes
0answers
1k views

Unity working on wall jump

I have a 2D platformer game and in it I have recently implemented wall jumping, and the way I have it works great. However when one jumps with the character and moves towards the wall one can hold ...
0
votes
1answer
54 views

Proper Order to Process Each Frame

I'm writing a rudimentary 2D engine and am wondering what the proper or generally accepted order is for handling graphics, user input, sounds, and then other systems like physics. If you have written ...
3
votes
1answer
747 views

Unity Spaceship camera control

I'm trying to make a third person spaceship control system in Unity. In theory, it works like this: Let's suppose you move your mouse to the right. The targeted direction would rotate to the right ...
2
votes
1answer
361 views

How do I draw an animated object in OpenGL ES?

I have a VBO, which I initialise like this (just an example): - (void)setupVBOs { GLuint vertexBuffer; glGenBuffers(1, &vertexBuffer); glBindBuffer(GL_ARRAY_BUFFER, vertexBuffer); ...
0
votes
1answer
34 views

Weird case of a key not working [closed]

I finished a game in Java. It works perfectly fine on my computer. Sent it to a friend. On his computer, for some reason, one of the keys that are used to play doesn't work inside the game. (It works ...
1
vote
2answers
73 views

Controls: Rolling on a ceiling

Currently I'm writing an iOS game where the basic movement is rolling. Technically you make the player turn clockwise or counterclockwise. When you tilt the device to the right, you will rotate ...
1
vote
1answer
303 views

How can I use touch input for 3rd-person controls?

I have a 3rd-person controller in my Unity scene, which I can only control with the WASD buttons. But since I plan to make a smartphone game, I wonder how I can change these controls t swipe ...
23
votes
4answers
2k views

What is the point of “delta” in this code? Does it reflect a standard thing in game dev?

I know very little about game programming but would like to learn more. I am trying to understand the code for this game. I am trying to understand why the code is passing a "delta" to ...
0
votes
1answer
125 views

Variable number of GUI Buttons

I have a generic HTML5 Canvas GUI Button class and a Scene class. The Scene class has a method called createButton(), which will create a new Button with onclick parameter and store it in a list of ...
1
vote
1answer
114 views

Adding Leniency to Jumping Mechanic

I have written some jumping code for my player in a platformer game. At the moment it has some basic logic which says that the player can jump if he is on the ground. The pseudocode looks something ...
1
vote
0answers
94 views

Mobs living in the physics engine

So, yeah. Mobs (including, and indeed especially, the player), physics engine running (cannon.js), first-person perspective, fairly low-poly-count world because I'm targeting WebGL. I'm trying to ...
3
votes
1answer
119 views

How can one impliment multiple control schemes for a single player?

I am working on a platformer and I want to have the player be able to switch control types based on items that may be carried + default controls for things such as water, in the air, on the ground ...
3
votes
1answer
214 views

Algorithm for optimal control on space ship using accelerometer input data

Does someone have a good algorithm for controlling a space ship in a vertical shooter game using acceleration data? I have done a simple algorithm, but works very badly. I save an initial ...
3
votes
2answers
645 views

Odd Android touch event problem (Nexus 10)

Overview When testing my game I came across a bizarre problem with my touch controls. Note this isn't related to multi-touch as I completely removed my ACTION_POINTER_UP and ACTION_POINTER_DOWN ...
1
vote
2answers
239 views

Correct way/How to think to plan out “control/animation flow”?

So basically, a problem I've had in past attempt at making games (little playing around with stuff): how to do a correct, non-sloppy way of planning the flow of animations/control? Let's take an ...
0
votes
1answer
239 views

My logic in collision detection in diagonal code correct? [closed]

I made this code to detect collision from the diagonal(top left). I'm trying to find the problem on what I'm doing wrong. Is it necessary to have a diagonal collision for the wall? Player class: ...
2
votes
2answers
446 views

Smoother controls

I am trying to move my background left if the user hits the right key. and right if the user hits the left key, so that it will look like the player is moving. The problem is that whenever I hold the ...
1
vote
0answers
254 views

Moving an object (pong paddle) along the x,y axis in 3d-space with mouse/touch

First of all: Sorry, my English isn't quiet good, I'm very new in 3D and I'am using JMonkeyEngine. What I would like to do?: A 3d pong game and I want to control the paddle with the mousecursor ...
0
votes
1answer
209 views

Character movement relative to cursor position

I want my top-down shooter character to move towards the mouse when pressing the up arrow and strafe relative at right angles to it when pressing the left and right arrow keys. I can't figure out how ...
11
votes
3answers
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, ...
1
vote
1answer
2k views

Handling multiple pressed keys with KeyListeners

I'm making a game Applet with Java that uses KeyListeners to control a paddle (for a game like Breakout/Pong). My basic implementation goes like this: public void keyPressed(KeyEvent e) { switch ...
0
votes
1answer
364 views

Control convention for circular movement?

I'm currently doing a kind of training project in Unity (still a beginner). It's supposed to be somewhat like Breakout, but instead of just going left and right I want the paddle to circle around the ...
8
votes
2answers
5k views

How would I move a character In an RPG with Bullet Physics/Ogre3D?

lately I have been having problems with moving my character in my Ogre3D game. Basically I am moving the character with bullet's RigidBody->translate() function, but when doing so and bumping into ...
4
votes
1answer
313 views

How to handle walking into walls?

Say we have a player who's walking around in first person perspective. He would like to walk forward, but that would put him inside an object, and that's no good. Right now what I do is... ...
3
votes
2answers
149 views

What is a good way to test demand for a new game platform?

I'm working on a game platform that turns your iPhone, android or iPad into a steering wheel, for racing games (like need for speed and dirt 3) and flight simulators for example. I'd love to figure ...
2
votes
2answers
471 views

How do I handle user input with good class structure/architecture for an Android game?

How do I handle user input having "good" class structure and following normal game architecture*?(see below). At first I didn't think this question was Android specific, although, after seeing a great ...
3
votes
1answer
13k views

Examples of Android Joystick Controls? [closed]

I can't seem to find any well executed code examples for Android joystick controls. Whatever it may be, algorithms, pseudo code, actual code examples, strategies, or anything to assist with the ...
6
votes
6answers
2k views

How do I identify mouse clicks versus mouse down in games?

What is the most common way of handling mouse clicks in games? Given that all you have in way of detecting input from the mouse is whether a button is up or down. I currently just rely on the mouse ...
1
vote
1answer
754 views

What is the best mechanism for controlling a character in a 2D Android game? [closed]

Im developing a 2D RPG for Android where the character can move up, down, left, and right like in top-down RPGs like Pokemon. What is the best input mechanism to use to control the character? A ...
-1
votes
1answer
690 views

Common game controls/ User interface libraries or source code? [closed]

Sorry for the ackward title, but i don't know what to call it exactly. I'm looking for code or libraries that allow easy creation of commonly used user input devices, and code/libs that make gaming ...
10
votes
2answers
9k views

How do I generate projectiles toward the mouse pointer? [duplicate]

I'm making a top-down space shooter where the player controls a ship and can aim and shoot using the mouse cursor. How can I fire bullets from the ship at the angle from the ship to the mouse cursor? ...
4
votes
2answers
1k views

Execute code at specific intervals, only once?

I am having an issue with XNA, where I want to execute some code in my Update method, but only at a given interval, and only once. I would like to avoid booleans to check if I've already called it ...