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

learn more… | top users | synonyms

10
votes
2answers
8k 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? ...
1
vote
1answer
708 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 ...
9
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 ...
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 ...
4
votes
1answer
298 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... ...