Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Can i have 2 mouses moving independently of each other?

  • 05-02-2005 1:13pm
    #1
    Registered Users, Registered Users 2 Posts: 44,195 ✭✭✭✭


    Hello all,

    Am programming an Air Hockey game for two players..

    Is there any way i can have two mouses moving independently of each other?

    Basically, i have a laptop with a touchpad and also a USB mouse.

    Is there any way to have the USB mouse as input for Player 1 and touchpad as input for Player 2? Maybe it would involve some sort of adapter or something.

    Thanks in advance.


Comments

  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 93,567 Mod ✭✭✭✭Capt'n Midnight


    If it was a game where you could choose Mouse OR keyboard OR joystick then you could run each game with one of them - would be interesting with dual monitor. It's been done with Doom using a serial cable between com1 and com2 so that two players are playing a network game on the same computer.


    Having two mouse cursors would be messy. AFAIK in windows you can't - there is only one mouse routine.
    Many note books have the touch pad and ps/2 mouse setup in the bios so the OS only sees one or the other (or a combination of both)

    Conjecture
    If each person will only be in thier half of the screen then you could save/restore the second mouse and intercept mouse calls as relative to the saved position (this was in DOS , I don't know how the windows API's do it)


  • Registered Users, Registered Users 2 Posts: 44,195 ✭✭✭✭Basq


    Cheers for the advice, Capt'n.

    Yeah, tried using both my touchpad and USB mouse together.. and one always overrides the other!

    Will look into it a bit further.. as i really don't want to use a keyboard as taking into account the acceleration a paddle has towards a puck would be irritating using a keyboard.

    Anyways, thanks again!


  • Registered Users, Registered Users 2 Posts: 459 ✭✭Neuro


    basquille wrote:
    Is there any way i can have two mouses moving independently of each other?

    I think what you really want to know is if you can have two Windows cursors (as opposed to mice) on screen at the same time. I doubt this is possible.

    Windows can support more than one mouse in that it recognises multiple mice as independent devices in the Device Manager list. As you've witnessed, when you attempt to use both a touch pad and a mouse at the same time the Windows routines that draws the cursor onscreen interpolates the data from both devices.

    You're best option is to write your software to read the input from the mice via the Windows API at the device level rather than at the cursor level. It's obviously not as convenient as using the cursor APIs as you have to record the mouse movement, draw your own cursors in the playing field etc. but it's probably the best way to do what you want to do.


  • Registered Users, Registered Users 2 Posts: 1,865 ✭✭✭Syth


    MICE! The word is MICE!


Advertisement