473,667 Members | 2,528 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3158
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**********@p lease.com> wrote in message
news:eN******** *****@TK2MSFTNG P14.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**********@p lease.com> wrote in message
news:eN******** *****@TK2MSFTNG P14.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@_spamkille r_bobpowell.net > wrote in message
news:uM******** ******@TK2MSFTN GP09.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**********@p lease.com> wrote in message
news:eN******** *****@TK2MSFTNG P14.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.z ip in downloads section)

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

ok,
aq

"Brian Basquille" <re**********@p lease.com> wrote in message
news:eN******** *****@TK2MSFTNG P14.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**********@g mail.com> wrote in message
news:%2******** ********@tk2msf tngp13.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.z ip in downloads section)

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

ok,
aq

"Brian Basquille" <re**********@p lease.com> wrote in message
news:eN******** *****@TK2MSFTNG P14.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**********@g mail.com> wrote in message
news:%2******** ********@tk2msf tngp13.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.z ip in downloads section)

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

ok,
aq

"Brian Basquille" <re**********@p lease.com> wrote in message
news:eN******** *****@TK2MSFTNG P14.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
2651
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 14 09/04/2004 LSU 22 Oregon State 21 09/09/2004 Troy State 24 Missouri 14 As you can see, the text file contains a list of games. Each game has a date, a winning team, the winning...
12
6068
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 parameter to the xslt file. When I select a value from the drop-down list nothing appears. I want just a basic listing of Title, Image, and Description outputed. I have done a basic JavaScript that uses the .write() function and that worked so the...
7
1315
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 item - in this case a visual cut into sections. However, this is where things get complicated, I would like to block them from proceeding with the courseware until they have moused over each point.
2
2098
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 outputted but when i import the file again using the same concept (but in reversed form) i get XMLDocument is invalid (1, 1) exception thrown back at me. Here is the code : SAVING PORTION 'Save the game
1
5655
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 create a game of Blackjack, which can be played by one player against the dealer (represented by the computer). The deck of cards is to be stored as an array of Card structures. Blackjack is played with a deck of 52 cards, consisting of four...
13
3802
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 they couldn't have just left it as <conio.h>?): #include <tcconio.h> // code
6
1806
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
26913
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.. Regards Ramprakash /*Adminpage.jsp*/ <%@ page language="java" import="java.sql.*"%> <html> <head>...
11
2308
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 code and sometimes it works but when the cards are like say 5 and 6 and i chose it to be higher and the image that comes up is a 8 but it says i lose thats what im having problems with and heres the site:...
0
8459
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8889
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8790
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8570
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7391
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4202
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2781
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2017
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1779
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.