Two mouse

Hello,
i would like for my game configurate two (or more) mouses, each one for player, i.e. a mouse control the character of player 1, and the second mouse control the character of player 2.
Thanks for answers.

I’m 99% sure that what you are requesting is impossible.

(technically speaking it would be possible to track 2 mouse if you were reading hardware input directly, but that creates a lot of other problems (different mouses might return some different info, no processing of system mouse position optimization, not possible to do without admin/root privileges, etc.))

On windows you have to use Raw Input API. As far as I’m aware that’s the only set of APIs where you can get a HID-identifier for a mouse action.

Rendering the cursors also ends up entirely on you - windows has no means of rendering more than one cursor built-in AFAIK without resorting to a custom HID driver which isn’t what you want to be doing anyways.

Im 99.99999% sure that 99.99999% of all users are not going to plug in and use 2 mouses on their one computer, for your one game.

2 players with one keyboard? One left handed mouse and one right handed?
2 players on one keyboard is already overcrowding.
From the old games i used to play when i was kid, i remember if there was 2 players, it was often one player on the keyboard and the other with the mouse… With simple games that needs only 2 keys of course. No wheel mouse etc in these times :older_man:

Nowadays you can play with wireless console controlers which is far simpler than 2 mouses. Even big studios have not tryed it for 2 players.

Ok i will try, to find and configurate controllers like Playsataion dual shock or N64 (with cross numeric and analogic), not sure is optimise because the player need to move the character and move curser on screen (so the more optimised are keyboard + mouse.

Guys… look, I know that times have changed but really noone of you remembers playing settlers with two mouses in split screen?

1 Like

I didn’t exist back then… so nope : |

1 Like

You are forgiven then… also now I feel old, anyway as far as I know getting two mouse working became harder with newer OS…

I think Jimmy might be for quite a bit of challenge. Maybe you can describe your game and control scheme and we can brainstorm some alternatives.

1 Like

It’s ok thank, i need whatever players with controllers because (they are 4, but i had only 2 players when i asked and that seemsed more “idealy”), its just i had two mice and not yet controllers then i wanted to try that with mice.

Argh never could have this one back then. But I feel old too

1 Like

Yeah, in that case I suggest to give up on two mouses research… if it would be split screen RTS then there isnt way around it but if it was just for testing purpose and control scheme is appliable to controller this issue isnt worth to solve.

A mouse in each hand?! Blasphemous!

Solving this problem for the MonoGame community would do a great service, as multiplayer designed games are relatively easy using the MonoGame framework.

2 Likes