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

learn more… | top users | synonyms

0
votes
1answer
171 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 ...
3
votes
1answer
167 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
1answer
10k 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 ...
2
votes
1answer
51 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 ...
10
votes
2answers
7k 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? ...
2
votes
1answer
70 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" ...
1
vote
1answer
65 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 ...
1
vote
1answer
204 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
2answers
169 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
61 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 ...
0
votes
1answer
93 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
155 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
647 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
49 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
432 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
240 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
31 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
64 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
160 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 ...
2
votes
1answer
369 views

Odd Android touch event problem

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 ...
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
99 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
102 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
83 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
100 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 ...
1
vote
2answers
170 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
160 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
210 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
177 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
174 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
1k 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
1k 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 ...
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 ...
0
votes
1answer
284 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 ...
4
votes
2answers
938 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 ...
7
votes
2answers
3k 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
293 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
147 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
442 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 ...
-1
votes
1answer
640 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 ...
1
vote
1answer
681 views

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

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 ...
8
votes
4answers
2k views

Camera Control Techniques in Games

I am an MPhil student in Computing Science working on the problem of camera control in graphics. Though the literature of camera control dates back to the end of 1980s, the majority of them (up to my ...
5
votes
3answers
442 views

Accelerometer or on screen controls for mobile UI in 3D games? [closed]

I can think of several 2D games which use the Accelerometer successfully, but in my experience as a player, character control in a 3D environment tends to be frustrating. Mostly because a 3D ...
1
vote
4answers
324 views

Mahjong solitaire - navigating between open tiles

I am looking for an algorithm to help me navigate between 'open' tiles in a Mahjong solitaire game. The game is to be played on a limited device with only left-right-up-down buttons and I want to ...
1
vote
2answers
240 views

What are some techniques used for mouse tracking, with a bit of “emulated lag”?

I am trying to implement a system, where the cursor (in my case the player's avatar) is always about 1.5 seconds (a configurable interval) behind where the mouse actually is. If I change the cursor's ...