A very common input device in computer games. It offers a more direct form of movement compared to directional input.

learn more… | top users | synonyms

5
votes
1answer
674 views

Isometric - precise screen coordinates to isometric

I'm trying to translate mouse coords to precise isometric coords (I can already find the tile the mouse is over, but I want it to be more precise). I've tried several different methods but I seem to ...
-3
votes
1answer
372 views

Isometric Rendering and Picking [duplicate]

Possible Duplicate: Isometric rendering and picking? I've been looking for a formula to plot (world->screen) and mouse pick (world->screen) isometric tiles in a non-diamond-shaped world. ...
-1
votes
1answer
365 views

Help needed throwing a ball in AS3

I'm working on a flash game, coding on the time line. What I'm trying to accomplish is the following: With the mouse you swing and throw/release a ball which bounces against the walls and eventualy ...
2
votes
1answer
255 views

Turning to face mouse

Given three points on the same Y plane; A ship A point along the ships heading A mouse cursor How can I find which direction and angle the mouse cursor is from the ships heading? I have a limited ...
2
votes
2answers
223 views

What sort of data should be sent for mouse-based movement in a multiplayer game?

I'm new to the Multiplayer Rodeo here so please bear with me... I am just getting started and I'm trying to figure out how to deal with movement. I've looked at the question Best way to implement ...
0
votes
2answers
299 views

AS3 Stage3D Mouse click problem?

I have a problem with Mouse interaction and Stage3D. The only way I found to register to listen to mouse clicks and interact with Stage3D, is to add a mouse eventListener directly to the .stage. ...
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 ...
3
votes
1answer
796 views

Rotating To Face a Point

I am trying to rotate a line to point to the mouse's world coordinates (rather where the mouse lies on the plane where y=0). I am running into a couple of problems though: Whilst it follows the ...
0
votes
1answer
267 views

Java Slick2d - Mouse picking how to take into account camera

When I move it it obviously changes the viewport so my mouse picking is off. My camera is just a float x and y and I use g.translate(-cam.cameraX+400, -cam.cameraY+300); to translate the graphics. I ...
2
votes
2answers
3k views

How can I do Mouse Selection In OpenGL 3.0?

Hello I'm pretty good programmer I've made my own 2D games in SDL and made a gui in 3D using Old OpenGL and Modern OpenGL but.. I'm having problems with trying to click 3D models with opengl I have no ...
4
votes
2answers
304 views

Minesweeper: Mouse listener problem

I have wrote a code for game Minesweeper and there is no problem with the graphics,but there is some problems with MouseListener. Here is my code /* * To change this template, choose Tools | ...
1
vote
2answers
555 views

What is the best way to handle MouseEvents in AS3?

What is the best way to handle MouseEvents? Should I add an event on each MovieClip I want to work with, or a general Event at a holder MovieClip (or even at the stage) with internal control from the ...
0
votes
2answers
1k views

How to set blur on mouse over and remove on mouse out in AS3?

How can I do it? I want to active glow when the mouse is over a Sprite and remove it when the mouse is out. Is it possible? I have the following code: var myGlow:GlowFilter = new GlowFilter(); ...
1
vote
1answer
457 views

Mouse click rectangle doesn't update to actual mouse position

I'm making a menu in XNA; and to solve clunky input via arrow keys, I thought I would use mouse input. I got everything to work perfectly, then I tried to click on something specific and nothing ...
3
votes
1answer
465 views

Controlling the snake in a snake game with the mouse

I am trying to implement a snake game in C# using the WPF forms. Well I know to implement the snake game, where the snake is controlled by the keyboard. But how would I do it, if I wanted to control ...
1
vote
2answers
235 views

What is a library for event-driven mouse and keyboard input in Java?

The title basically says it all. The only thing to take into consideration is it needs to be cross platform.
3
votes
3answers
3k views

Java Slick2d - How to translate mouse coordinates to world coordinates

I am translating in my main class render. How do I get the mouse position where my mouse actually is after I scroll the screen public void render(GameContainer gc, Graphics g) throws SlickException ...
1
vote
2answers
188 views

What framework provides mouse-interactive components as game sprites? [closed]

Background: I wish to make a really flashy chess game. The squares on the board will be unique terrain. The pieces will be colourful images. The pieces will be animated. The pieces will sometimes ...
2
votes
2answers
786 views

Making mouse pos realtive to a moving object

I'm coding my first actual game, trying without following tutorials, just trying to use my knowledge so far to make something playable. I'm creating (attempting) a simple side-scrolling shooter. I ...
1
vote
2answers
591 views

Detecting a click on a tile

I'm making a simple tile-map system in LWJGL, and I'm trying to figure out how to detect if the mouse is clicking inside of a tile. So far no matter where I click it's always the same tile that is ...
3
votes
3answers
2k views

How do I shoot bullets towards the mouse in a top down shooter?

I have a formula for pointing my main character of the game towards the mouse, and it gets the angle he needs to be turned to point towards the mouse. But how do I get the bullets from the gun to use ...
1
vote
1answer
4k views

Looking at the mouse position in a top down Unity game?

I'm trying to make a simple top down game where the player looks at wherever the mouse is pointed. The player is only going to rotate on the Y axis. Here's what I have so far but I can't seem to get ...
7
votes
3answers
5k views

Is it possible to detect two different mice at the same time, and have their movements recorded seperately?

Im thinking of making a game that requires two mice to play. It needs to register the movement separately from one another. Is this possible? Or does the Windows architecture not allow for such ...
3
votes
1answer
930 views

Scrolling the camera when the mouse cursor gets to the edge of the screen

I was wondering if you could help me: In XNA I have a hexagonal map, and the size of the map currently exceeds the size of the window. There is already code in place to move the 'camera' around the ...
1
vote
1answer
3k views

Picking objects with mouse ray

I simply want to pick a few spheres in my scene using the mouse-ray. I have implemented(copied most of it but with little understanding) a ray-sphere collision code. Also I have implemented the code ...
0
votes
2answers
2k views

AS3 > Mouse Event not happening?

Background: Trying to make a ball appear in the same location the mouse is positioned. Using Box2D Library. Working on a class file (.as) Issue: The mouse event does not work (I click but nothing ...
0
votes
1answer
435 views

How can I respond to mouse events in AS3?

Background: Trying to make a simple "drop the ball" game. The code is located inside the first frame of the timeline. Nothing more is on the stage. Issue: Using QuickBox2D I made a simple If ...
1
vote
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() { ...
2
votes
1answer
1k views

2D Topdown Shooter - Player Movement Relative to Mouse

I'm trying to make a topdown 2D space game for my school project. I'm almost done but I just want to add a few little things to make the game more fun to play. if (keystate.IsKeyDown(Keys.W)) ...
6
votes
3answers
6k views

How do I simulate the mouse and keyboard using C# or C++?

I want to start develop for Kinect, but hardest theme for it - how to send keyboard and mouse input to any application. In previous question I got an advice to develop my own driver for this devices, ...
2
votes
2answers
2k views

Implementing a Custom Mouse Cursor in XNA

I have tried making a custom mouse cursor, hiding the real mouse, taking the real mouse delta and clamping it to a maximum speed. Here is the problem: In windowed mode, the "real" mouse cursor moves ...
3
votes
2answers
932 views

Is there a universal method to send key or mouse input to any application from C#?

I need method or group of them to send signals to any application (browsers, games, et cetera) about mouse movement or key input. I can easly retrieve an IntPtr to any process, but I don't know what ...
2
votes
2answers
2k views

Why isn't my mouse input working as expected in a DX10 game?

I've made myself a camera for a DirectX 10 game, and the keyboard control works fine. However, I can't see to get the mouse to work. My biggest problem is I can't find out how to hide the mouse on the ...
2
votes
1answer
720 views

Allegro 5 Mouse Look

I found good tutorial on how to do mouse look for 2D game here: http://www.atburrow.com/2010/03/08/objects-facing-the-cursor/ My code looks like this: w = (double)mouse_x - (double)pos_x; h = ...
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
2k views

XNA - Use Mouse To Rotate & Arrow Keys To Scroll A Linearly Wrapped Texture:

Using XNA I'm working on my first, relatively simple, videogame for the PC. At the moment my game window is 1024 X 768 and I have a 'Starfield' linearly wrapped background texture 1280 X 1280 in ...
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? ...
4
votes
1answer
3k views

Mouse location is off due to camera

I'm building a top down shooter but I have a little issue with my camera and mouse. When I add the camera that I use to my game (see here) my mouse pointer seems to be in the wrong location. When I ...
16
votes
1answer
5k views

Isometric rendering and picking?

I've been looking for a formula to plot (world->screen) and mouse pick (world->screen) isometric tiles in a diamond-shaped world. The ones I've tried always seem to be, well, off. What's the ...
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 ...
4
votes
1answer
2k views

Unity MouseWheel weapon change

I am trying to make a simple weapon change in Unity3D. The best way to do this is with the mouse scroll wheel, as far as I can see. I googled on how to do this and found that I have to use ...
32
votes
1answer
4k views

Mouse aim in an FPS

I would like to make a First Person Shooter and move the camera with the mouse. The problem is that when the cursor reaches the limits of the screen, the camera won't turn anymore. How can I keep the ...
3
votes
2answers
738 views

Mouse-driven Movement

I'm trying to write a game where player picks where they are going by just mouse-clicking on that position and it goes there (just like RuneScape's point-and-click mouse interface). I'm trying to get ...