Re: [pygame] Multiple mice on windows
I think this is great and I plan on using it - but as it is platform specific it would be a poor thing to include as a component of pygame, as it is. On Mon, Jun 23, 2008 at 4:40 PM, Ian Mallett <[EMAIL PROTECTED]> wrote: > To the pygame people: This functionality should be supported by pygame. It > would make things so much more interesting... > Ian >
Re: [pygame] Multiple mice on windows
To the pygame people: This functionality should be supported by pygame. It would make things so much more interesting... Ian
Re: [pygame] Multiple mice on windows
If i'm not mistaken, this was one of the gsoc projects for SDL 1.3. (and could go into pygame, if possible. I would like to see it running in some games :) Igor -- WC Fields - "I am free of all prejudices. I hate every one equally."
Re: [pygame] Multiple mice on windows
Very interesting concept. I'm pleased that someone finally got this working!
[pygame] Multiple mice on windows
Hi, I just uploaded an early beta of something I've been fiddling around with on Windows: http://pymultimouse.googlecode.com/files/pymultimouse0.1.zip If you download it and run the pygamedemo.py, you will see an empty screen. When you start moving around all you mice connected to the computer, each mouse gets a mouse pointer of its own. I would be happy if you guys could try it out and give me some feedback. I'm hoping to hide most of the raw input details some time in the future, to be able to keep the same API between platforms. I would also like to make it work more "pygame-like", using the standard events and so on. It requires the win32con package (and pygame for the demo). And python of course. Regards, Oscar Lindberg
Re: [pygame] Multiple Mice
On 8/12/07, Campbell Barton <[EMAIL PROTECTED]> wrote: > > A heard somebody managed to make a multiple mouse game with this. > > http://jstookey.com/arcade/rawmouse/ I'll look into that, thanks! Ian
Re: [pygame] Multiple Mice
A heard somebody managed to make a multiple mouse game with this. http://jstookey.com/arcade/rawmouse/ Ian Mallett wrote: Hi, I'm trying to make a two player game, and I'm wondering if there is a way to use the input from two mice simultaneously. As far as I can tell, the answer is no, as the computer already seems to merge two inputs. Anyway, I thought I would ask in case anyone knows how to do it. Thanks! Ian -- Campbell J Barton (ideasman42)
Re: [pygame] Multiple Mice
Hello, you can access system messages with pygame... you need to dissect the structures yourself in a platform dependent way. you can for X, and windows at least. So maybe you can get multiple mouse events that way? It's how other people have added support for weird input methods before. On 7/18/07, Brian Fisher <[EMAIL PROTECTED]> wrote: Ignoring python & pygame for a moment, all the major popular platforms have a way to use multiple USB mice Windows XP & Vista support multiple mice through the WM_INPUT messages, which come to an app if it calls "RegisterRawInput" http://msdn2.microsoft.com/en-us/library/ms645590.aspx http://msdn2.microsoft.com/en-us/library/ms645600.aspx Mac OSX supports multiple mice through IOKit's Human Interface Device (HID) api (HID is basically a USB class interface thing) http://developer.apple.com/documentation/DeviceDrivers/Conceptual/IOKitFundamentals/Families_Ref/chapter_11_section_7.html I don't know the details of Linux, evidently it's the "evdev" interface, or I guess MPX must be some X-Windows way of doing it? There is an old c++ project called manymouse that was made to be cross-platform: http://icculus.org/manymouse/ also note that none of the multiple mouse approaches I mentioned actually have multiple mouse cursors at the OS level - they just let you get raw data from multiple mice. So OS cursor acceleration isn't used, and you also would want to disable the OS cursor and lock it to your app's window when your app is in some multiple mice mode. --- addressing multiple mice in python pygame... I don't know how to do that (but I'd like to). I suppose somebody could make a manymouse binding, which seems like it could work fine for Lnux and Mac OSX - except on windows, the app gets the raw input data through it's message loop, which sdl owns in pygame, so you'd have to somehow keep SDL from eating those events. However, you might be able to tell sdl to let WM_INPUT passthrough to your app with pygame.event.set_allowed. Then maybe some ctypes type things could let call RegisterRawInputDevices and GetRawInputData. Which should all be pretty easy. If you are able to somehow get te multiple mice data in pygame, then pygame can take care of locking the system cursor and hiding it fairly well --- btw, If anybody has any success with this kind of stuff through python and/or pygame, I'd be delighted to hear about exactly how they did things On 7/17/07, Ian Mallett <[EMAIL PROTECTED]> wrote: > Hi, > I'm trying to make a two player game, and I'm wondering if there is a way to > use the input from two mice simultaneously. As far as I can tell, the > answer is no, as the computer already seems to merge two inputs. Anyway, I > thought I would ask in case anyone knows how to do it. Thanks! > Ian >
Re: [pygame] Multiple Mice
Ignoring python & pygame for a moment, all the major popular platforms have a way to use multiple USB mice Windows XP & Vista support multiple mice through the WM_INPUT messages, which come to an app if it calls "RegisterRawInput" http://msdn2.microsoft.com/en-us/library/ms645590.aspx http://msdn2.microsoft.com/en-us/library/ms645600.aspx Mac OSX supports multiple mice through IOKit's Human Interface Device (HID) api (HID is basically a USB class interface thing) http://developer.apple.com/documentation/DeviceDrivers/Conceptual/IOKitFundamentals/Families_Ref/chapter_11_section_7.html I don't know the details of Linux, evidently it's the "evdev" interface, or I guess MPX must be some X-Windows way of doing it? There is an old c++ project called manymouse that was made to be cross-platform: http://icculus.org/manymouse/ also note that none of the multiple mouse approaches I mentioned actually have multiple mouse cursors at the OS level - they just let you get raw data from multiple mice. So OS cursor acceleration isn't used, and you also would want to disable the OS cursor and lock it to your app's window when your app is in some multiple mice mode. --- addressing multiple mice in python pygame... I don't know how to do that (but I'd like to). I suppose somebody could make a manymouse binding, which seems like it could work fine for Lnux and Mac OSX - except on windows, the app gets the raw input data through it's message loop, which sdl owns in pygame, so you'd have to somehow keep SDL from eating those events. However, you might be able to tell sdl to let WM_INPUT passthrough to your app with pygame.event.set_allowed. Then maybe some ctypes type things could let call RegisterRawInputDevices and GetRawInputData. Which should all be pretty easy. If you are able to somehow get te multiple mice data in pygame, then pygame can take care of locking the system cursor and hiding it fairly well --- btw, If anybody has any success with this kind of stuff through python and/or pygame, I'd be delighted to hear about exactly how they did things On 7/17/07, Ian Mallett <[EMAIL PROTECTED]> wrote: Hi, I'm trying to make a two player game, and I'm wondering if there is a way to use the input from two mice simultaneously. As far as I can tell, the answer is no, as the computer already seems to merge two inputs. Anyway, I thought I would ask in case anyone knows how to do it. Thanks! Ian
RE: [pygame] Multiple Mice
Two gamepads/joysticks would probably be a more workable solution for windows. I've found that 360 controllers work quite well for PC use. - John Krukoff [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ian Mallett Sent: Tuesday, July 17, 2007 12:29 PM To: pygame-users@seul.org Subject: [pygame] Multiple Mice Hi, I'm trying to make a two player game, and I'm wondering if there is a way to use the input from two mice simultaneously. As far as I can tell, the answer is no, as the computer already seems to merge two inputs. Anyway, I thought I would ask in case anyone knows how to do it. Thanks! Ian
Re: [pygame] Multiple Mice
Ian Mallett wrote: Hi, I'm trying to make a two player game, and I'm wondering if there is a way to use the input from two mice simultaneously. As far as I can tell, the answer is no, as the computer already seems to merge two inputs. Anyway, I thought I would ask in case anyone knows how to do it. Thanks! Ian Have a look at MPX, a project to do this on Xorg, if you wanted to use 2 serial ports Im sure its possible for a game but probably not a pretty solution. -- Campbell J Barton (ideasman42)
[pygame] Multiple Mice
Hi, I'm trying to make a two player game, and I'm wondering if there is a way to use the input from two mice simultaneously. As far as I can tell, the answer is no, as the computer already seems to merge two inputs. Anyway, I thought I would ask in case anyone knows how to do it. Thanks! Ian