473,413 Members | 1,811 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

Using 2 mouses as input in C# game?

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
Nov 16 '05 #1
6 3151
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.

"Brian Basquille" <re**********@please.com> wrote in message
news:eN*************@TK2MSFTNGP14.phx.gbl...
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

Nov 16 '05 #2
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

"Brian Basquille" <re**********@please.com> wrote in message
news:eN*************@TK2MSFTNGP14.phx.gbl...
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

Nov 16 '05 #3
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!!

"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:uM**************@TK2MSFTNGP09.phx.gbl...
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.

"Brian Basquille" <re**********@please.com> wrote in message
news:eN*************@TK2MSFTNGP14.phx.gbl...
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


Nov 16 '05 #4
Brian, if you are still interested, here is a port of RawMouse in C#, you
may be able to map the different user input data to your game objects. (See
rawinputsharp.zip in downloads section)

http://link.mywwwserver.com/~jstookey/arcade/rawmouse/

ok,
aq

"Brian Basquille" <re**********@please.com> wrote in message
news:eN*************@TK2MSFTNGP14.phx.gbl...
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

Nov 16 '05 #5
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

"Ahmed Qurashi" <ah**********@gmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Brian, if you are still interested, here is a port of RawMouse in C#, you
may be able to map the different user input data to your game objects.
(See
rawinputsharp.zip in downloads section)

http://link.mywwwserver.com/~jstookey/arcade/rawmouse/

ok,
aq

"Brian Basquille" <re**********@please.com> wrote in message
news:eN*************@TK2MSFTNGP14.phx.gbl...
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


Nov 16 '05 #6
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.
"Ahmed Qurashi" <ah**********@gmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Brian, if you are still interested, here is a port of RawMouse in C#, you
may be able to map the different user input data to your game objects.
(See
rawinputsharp.zip in downloads section)

http://link.mywwwserver.com/~jstookey/arcade/rawmouse/

ok,
aq

"Brian Basquille" <re**********@please.com> wrote in message
news:eN*************@TK2MSFTNGP14.phx.gbl...
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


Nov 16 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Jocknerd | last post by:
I'm a Python newbie and I'm having trouble with Regular Expressions when reading in a text file. Here is a sample layout of the input file: 09/04/2004 Virginia 44 Temple ...
12
by: Mark Constant | last post by:
I have a drop-down list now and I got it so when something is selected from the drop down list it calls a JavaScript function. I want it so the value selected from the drop-down list is sent as a...
7
by: David Jubinville | last post by:
Hi All, I've got another question for you... Same courseware-type application, new problem. What I would like to do is have the users mouse over each point to get a full description of the...
2
by: theinsanecoder | last post by:
Hi, i'm using the xmlserializer to load and unload data from my files but i want to crypt them using a not so secure cryptographic encoder. My code to encrypt "seems" to work fine, the file is...
1
by: CapMaster | last post by:
I've found some programs of how to create a standard game of blackjack on C++. But how would you do it using structs? Here is my assignment: Problem Statement: The purpose of this project is to...
13
by: Albert | last post by:
Hi I'm using the lcc compiler for win32. I tried compiling a program but there's an error stating: "cpp: Can't open input file clrscr()" I don't get it - I've included <tcconio.h>. (strange why...
6
by: pereges | last post by:
I want to begin by making simple 2D games for Dos. What particular features of C should I look to strengthen ? I am not asking about the graphics bit but in general.
13
by: ramprakashjava | last post by:
hi, i hav "java.lang.NullPointerException" error while Deleting table records using checkbox in jsp here i enclosed files help quickly plzzz.. ...
11
by: Rhodge09 | last post by:
Well this game is fairly easy you have to chose what you think the card is going to be either higher or lower or in the middle of the two images but im having a little bit of a glitch. Here is my...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.