0
votes
1answer
160 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
158 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
1answer
222 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
1answer
145 views

Brief pause after keypress

After i press and hold the key it goes forward once then pauses for a second or less then goes forward on forever. My problem is the brief pause I cant locate the issue. Thanks for your help. ...
0
votes
1answer
95 views

What input and window handler should I learn for complement OpenGL? [closed]

I have a good base in C++ programming and I did some 2D games using SDL. Now I want to start making 3D games, but as much as posible, I want to learn following the standars of the profesional ...
9
votes
2answers
2k views

Input management techniques in large games

Is there a standard technique for managing input in large games. Currently, in my project, all input handling is done in the game loop, like so: while(SDL_PollEvent(&event)){ ...
1
vote
2answers
912 views

Entity system game design and input handler

I have started create a lightweight game engine with Ogre and C++. I have a abstract component class and an abstract entity class. #ifndef ENTITY_HPP_ #define ENTITY_HPP_ #include <string> ...
4
votes
2answers
257 views

Manage user input and diffentiate it between the player and the app

I hope the title makes sense. Basically, I am trying to figure out how the app will know I the input I am sending it is meant for the app and not the player, and vice-versa. (It is very similar to ...
5
votes
1answer
2k views

How do I read input from multiple keyboards/mice on one computer?

I want to be able to read inputs from multiple keyboards and still differentiate them. It's for split-screen. I know it's possible, because Serious Sam 3 allows it. Edit : Well a whole lot of my ...
1
vote
0answers
209 views

Why is my XInput gamepad press stamp not working?

I'm trying to add basic gamepad input to my c++ DirectX game but i'm having some trouble creating a press stamp (registers the press only the first time it's pressed if button held down). The entire ...
0
votes
3answers
596 views

Input handling with callbacks

I have set up a class for input handling that allows me to create key bindings with different key behaviours such as single press action bindings where the action will only happen once if the key is ...
1
vote
1answer
538 views

Moving the camera as in a first person shooter

I am trying to implement the movement of the camera with the mouse. The result I want to achieve is the same that you get when you move your aim in a first person shooter. Here is the code I wrote, ...
-1
votes
1answer
158 views

My ClanLib based Keyboard Manager not working [closed]

I created a simple Keyboard manager to detect whether buttons are currently pressed, or if where pressed in that frame. It seems like it should work, yet it seems to not read anything. Here is my ...
0
votes
1answer
338 views

Problem with GLFW input

I am using GLFW for the input in my game. I just started learning it and I have encountered a problem. The problem is the input, I have a callback function, where I check for keypresses. I want the ...
1
vote
0answers
169 views

Help with Windows RawInput

I am having some trouble to receive and interpret mouse movement data from RawInput. Generally mouse input seems to work, I can query mouse buttons and receive updates of mouse movement. The problem ...
1
vote
3answers
4k views

How can I make a C++ countdown timer that doesn't freeze user input?

I'm planning to use the Sleep() function to implement a countdown timer. But this freezes the input of the user at the same time. Thus I wanted to ask if it is possible to have the countdown still ...
2
votes
1answer
1k views

Managing the user input

I'm studying a good number of articles about this topic and seems to me that there is just one way to do this: a signal/slot design. I was also looking at some more complex async examples but I don't ...
0
votes
2answers
915 views

Action button: only true once per press

I'm using SFML2.0 and am trying to make a wrapper class for my controller/joystick. I read all the input data from my controller and send it off to my controllable object. I want to have two types of ...
-1
votes
1answer
559 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 ...
0
votes
1answer
295 views

Delay The Polling Events Of Xbox360 Gamepad With XInput

My team and I are currently developing a 2D platformer with SDL/OpenGL and we want to add support to the Xbox360 Gamepad with the XInput library from Microsoft, but we are currently having a problem. ...
2
votes
1answer
2k views

SFML - Moving a sprite on mouseclick

I want to be able to move a sprite from a current location to another based upon where the user clicks in the window. This is the code that I have: #include <SFML/Graphics.hpp> int main() { ...
0
votes
2answers
669 views

Ogre3D: customize water demo

On the water demo supplied with Ogre3D's SDK, controls are set to actually control the camera and environment, but not actually the ogre head that generates the disturbances. I tried digging into the ...
4
votes
5answers
382 views

Identifying connected lines drawn free-hand by a user

I have a series of 'images' described by a mixture of connected lines and curves. Users will draw on the screen, free hand, and my goal is to break their drawing down into a series of lines and curves ...
12
votes
1answer
2k views

Using PS3 controller for input on Mac OSX

I've managed to find a USB driver to connect to the PS3 controller in OSX, and as reported here, can connect to the controller via Bluetooth. I've verified that the input is working properly via ...
6
votes
3answers
593 views

How standardized are joystick / gamepad configurations?

Right now I'm working on input for my game. The only controller I own is an XBOX 360 one. From what I can see, if a controller's stick has a Z axis, these are actually triggers. Essentially I'm ...
5
votes
3answers
693 views

What's a good way to check that a player has clicked on an object in a 3D game?

I'm programming a 3D game (using C++ and OpenGL), and I have a few 3D objects in the scene, we can say they are boxes for this example. I want to let the player click on those boxes to select them ...