Interaction from the player that corresponds to action in the game. Or in simpler terms - pushing buttons!

learn more… | top users | synonyms

0
votes
1answer
94 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 ...
0
votes
1answer
195 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[] = ...
2
votes
3answers
524 views

How To Export Blender Game Logic for Controlling Actor Actions?

Question: How does one export Game Logic ("Sensors") that Unity references for controlling actions from Blender's "Action Editor" or "Dope Sheet"? Problem Statement: I have a Blender model that has ...
0
votes
1answer
53 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
39 views

How do I make multiple buttons that are clickable? [on hold]

I have buttons in my game, I tried to use an InputListener then use the touchDown method but for some reason that only works with one button, all the rest don't work. So I am wondering how I would ...
0
votes
0answers
19 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 ...
2
votes
6answers
2k views

Implementing pausing functionality

I'm working in LWJGL and trying to implement pausing when the user presses the 'P' key. Thus far I have this: boolean gamePaused = false; while(!Display.isCloseRequested()){ ...
2
votes
2answers
271 views

Adding touch/click event to a bitmap in android

In my android game, there is a surfaceview which has 36 bitmaps drawn on it. I want to change the bitmaps when they are touched. Is there a way implement touch or click event to the bitmaps ? Adding ...
1
vote
5answers
80 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
1answer
23 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 ...
2
votes
3answers
7k views

InputManager in Unity

I´m having a rough time trying to figure out a proper way of dealing with key mapping and key bindings in unity. The built-in unity input manager is useless to me since it doesnt support key mapping ...
0
votes
2answers
2k views

Detecting key press only once in Libgdx [duplicate]

Have a question on keyboard inputs. Currently I am using this method to read my input, Gdx.input.isKeyPressed(Input.Keys.A), it is working fine. But I do realized at times there are multiple instances ...
1
vote
1answer
108 views

Input handling between game loops

This may be obvious and trivial for you but as I am a newbie in programming I come with a specific question. I have three loops in my game engine which are input-loop, update-loop and render-loop. ...
0
votes
0answers
89 views

class instance issue

Currently, i am working on a project which deals with several parts. First, I want to interface with a Sidewinder Force Feedback 2 joystick in Unity using SharpDX and SharpDX.DirectInput libraries. ...
0
votes
0answers
10 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?
0
votes
1answer
93 views

Press multiple switches to unlock the door

I made 2 scripts, one that is a switcher and one that checks if object is switched (Switch, SwitchCheck). Switch script (it's on 2 objects that are switches and both objects have colliders with ...
0
votes
2answers
166 views

Problem with moving player through a secript by a set distance

I am currently trying to add a sort of "dash"-ability to my sidescroller. What I try to do, is to let the player press a key where a simple key-press causes the player to move quickly into one ...
9
votes
5answers
7k views

Handling keyboard and mouse input (Win API)

There is a number of ways to catch mouse or keyboard under Windows. So I tried some of them, but every of them has some advantages and drawbacks. I want to ask you: Which method do use? I've tried ...
11
votes
6answers
15k views

How to handle mouse input in XNA?

I am developing a card game in XNA. Is there any OnClick event in XNA for objects? I am trying to make cards move when the player clicks on them. In this project, there is a Sprite class that draws ...
3
votes
1answer
478 views

AndEngine- OnAreaTouched

In my AndEngine-based game there are a few sprites on the scene. One sprite acts as a surface and the rest of them are placed on top of this surface. I want to take unique actions whenever any of the ...
0
votes
1answer
28 views

Moving multiple hingejoints based on joystick input

I'm controlling a 2D side-viewed (facing right) stickman with a joystick. The movements are fairly intuitive: Joystick down -> Stickman crouches down Joystick up -> Stickman stretches out ...
12
votes
3answers
234 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 ...
0
votes
1answer
166 views

C++ timer function acts as if time limit is instantly reached if it is less than 1 second [closed]

I'm trying to make a Snake clone with C++ and OpenGL/GLUT, but I've been having trouble with programming the timed input. I made a timer class, as you'll see below, to be used for the short time ...
1
vote
1answer
87 views

game server/client user input/event handling

I'm currently getting my feet wet in the realm of networking, so I set a goal to make a simple client/server game using SFML for both graphics and networking. In my head it seemed easy at first, but ...
1
vote
2answers
161 views

Act on Right Mouse Button click on Button

I want to be able to listen for a right mouse click onto a TextButton. Is this possible without removing the default ClickListener of the TextButton? If yes, how? Or should I use a different listener? ...
1
vote
3answers
60 views

Key Handling mechanics

I am new to game development and am working on my first game using OpenGL and C++. I have a game class which handles everything necessary in an update() function. Now i want to handle keyboard inputs. ...
0
votes
0answers
38 views

XNA Guide text input - maximum length

so I am using Guide.BeginShowKeyboardInput to get the user to enter their username. I would like this to be limited to 20 characters, and it seems to break expected behaviour to let them input ...
0
votes
1answer
39 views

When to get input state: multiple times or one time in a static class?

Let's say I have these classes: Player Here I want to make the player jump: current_state_ = Keyboard.GetState(); if ((current_state_.IsKeyDown(Keys.Space) || ...
0
votes
1answer
91 views

SDL2 - Ignoring repeated key input until key is released

I'm currently using SDL_GetKeyboardState to capture key states once per frame. This works great for input that I want to handle for as long as a key is pressed (i.e character movement) but creates a ...
0
votes
1answer
87 views

LWJGL - Keyboard.next() not firing

I am trying to make a class which will handle all of my inputs, however Keyboard.next() isn't returning true. Here is my code. while(Keyboard.next()) { if(Keyboard.getEventKey() == ...
1
vote
1answer
57 views

Multiple keypresses causing wierd results in SDL

I have been building a pong clone. I've been using a mixture of peoples different code to understand the way they structure their games as well as reading on game patterns. Currently I've gotten to ...
2
votes
1answer
206 views

How do I determine a device's default orientation?

I am developing a game with accelerometer controls. This works well on all the mobile phones I've tested it on. However, when testing on a tablet, the y and x axes are reversed, presumably because the ...
0
votes
2answers
98 views

Smooth input handling in Java [closed]

I am writing a Java game. My problem is to get a really smooth input. If I hit the key W the character has to go forwards, but if I hit A and release the W key, the character doesn't go left ways :( ...
1
vote
1answer
550 views

Handling XBox 360 Controller Connections in LibGDX after Game has Started

I am currently making a game with the java library LibGDX and want to add XBox 360 controller support using the GDX-Controllers extension. At the moment I have a setup where I create a listener to ...
1
vote
1answer
153 views

How do I make my SFML mouse position capture fast enough?

I'm new to game development and making a Pong clone in SFML. I am trying to set the screen's top and bottom as bounds for the paddle. Here is my attempt: #include "main.h" #include "objects.h" int ...
5
votes
3answers
4k views

Trap mouse in SDL

How can I trap the user's mouse inside my game? It's not a fullscreen game, but I want it so that the user cannot drag the mouse to outside the screen. Do I have to check the coordinates of the mouse ...
-1
votes
1answer
570 views

Windows Events lag behind

I'm making a simple openGL application and so far I can get the window to display, the update/render loop work, and it processes windows events (like WM_QUIT and WM_MOUSE). I've found though that ...
1
vote
1answer
83 views

XNA - Prevent Holding of Mouse Button as Part of an Input Handler Game Component

I'm using C# XNA 4.0 Refresh. I'm working to create an InputHandler Game Component for my XNA game to handle all of the keyboard and mouse input. I used SixOfElevens RPG Game Tutorial (Here - ...
1
vote
1answer
66 views

How can I check for key releases between keyReleased callbacks?

Slick2D's Input class has a isKeyPressed() method that returns a boolean value according to whether the specified key has been pressed. I want to check if a key has been released in the same fashion. ...
1
vote
1answer
165 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, ...
2
votes
1answer
112 views

Passing Input to Compute Shader

I am using D3D11 on D3D10 hardware, trying to get a very simple compute shader to run (my hardware supports cs_4_0). What is the best way to pass data to the compute shader? I've seen some samples ...
13
votes
2answers
512 views

How can I stop the player from drifting due to local input prediction when they stop?

I'm working on a 2D server-client multiplayer game engine (which you can try here). It uses WebRTC DataChannels. (The connections are peer-to-peer, but the host peer still acts as a server.) The ...
1
vote
1answer
297 views

Decoupling rendering pipeline (for UI responsiveness): Multithreading and multiple contexts?

Warning! Wall of text (see <TL;DR> paragraphs below for short version) I have been noticing something in quite many games (most recently in cutting-edge RTS games such as Uber Entertainment's ...
22
votes
2answers
10k 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
1answer
502 views

Can not enable IME to capture Chinese characters in SharpDX

Just found that direct integration of IME is blocked in Windows 8, moving on to TSF now. By now, there is lack of Microsoft's Document about TSF, this will be hard. I am using SharpDX and the ...
2
votes
1answer
213 views

does order of updates and renders matter?

I know in a game loop there needs to be an order like physics should update before rendering. So, I have created two separate functions: update and render and the game loops like below: ...
1
vote
2answers
194 views

Can I trigger input/controls via code?

I have the 3rd person controller in my game, which moves with the WASD keys. But since I am developing for a mobile release, I want touch controls. I have already the touch control-script in a new ...
0
votes
1answer
245 views

How to handle simultaneous mouse and keyboard input with sdl?

I'm making a game in SDL2 that so far is basically just a top down shooter, where the player aims at the mouse. When I run the game, you can move properly and shoot properly, and shoot and move the ...
1
vote
3answers
1k views

Efficiently checking input and firing events

I'm writing an InputHandler class in XNA, and there are several different keys considered valid input (all of type Microsoft.XNA.Framework.Input.Keys). For each key, I have three events: internal ...
0
votes
1answer
126 views

Why does my object “jump” immediately as the game starts?

I'm having a problem where, when I start my game, my game object (a 3D plane) immediately jumps 300 pixels or so. I suspect this has something to do with my joystick handling code that I've written to ...