Using 2 mouses as input in C# game?

  • Thread starter Thread starter Brian Basquille
  • Start date Start date
B

Brian Basquille

Hello all.

Due to the short time remaining to my project handup for my Air Hockey game,
i've abandoned the idea of implementing it over a network.

But since the only real way to play Air Hockey is using a mouse, i was
wondering if it is possible for 2 people to use 2 mouses while on the same
computer? For example, 1 mouse could be in USB port and other in PS/2 port.

Does C Sharp support this? And if so, can anyone point me to some examples
or documentation on how to implement this?

Many thanks in advance,

Brian
 
OTTOMH I think you're out of luck. I have a mouse and a graphics tablet and
they both work as mouse input. If I use the mouse then the cursor follows
that, if I move the graphics tablet pen the cursor jumps to it's position.

I suppose key inputs are a pain.

How about using a game input pad / joystic arrangement. They have two player
inputs.

I've never seen two pointer devices configured independently.

PS. I think everyone would like to see your final code for the game if you
feel like posting it somewhere.


--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
A few years ago I used a PC for image analysis which had a mouse and
trackball, so I know its possible, but I think you may need an adapter to
create multiple pointers.

ok,
aq
 
Cheers for the quick replies!

Looks like i'm stuck with keyboard input.. or i might configure it for one
player to use mouse and other to use keyboard!

But will consider Bob's idea regarding user a joystick / gamepad.

PS - regarding posting of my game code: as soon as my project presentation
is completed (end of March / start of April), i'll make the code freely
available but it's possibly the most poorly written code i've ever seen.
Anyways, about a month or so to go until i handup my code and a lot more to
do!!
 
Ahmed, you're a lifesaver!

Thank you for that link!

When i ran the demo included with the file.. i realised that i can use my
laptop for the game - my USB Mouse as input for 1 user and the touchpad on
the laptop as input for the other user.

Problem solved!

Thanks again!

Brian
 
My mistake.. think i got a little too excited about my idea!

I was using it and it seems to override one of the inputs if you use them at
the same time.
 
Back
Top