a Game with 2 mouses on 1 LWJGL Applet, how to compile ??

Started by lwjgl001, July 15, 2009, 17:17:01

Previous topic - Next topic

lwjgl001

Hello!

I have my first LWJGL game on a go.

My game will have two players and it is ment to be a net game, still i wanted to add a possibility
to play my game with one computer.

My question is ->
As my game reguires two mouses, then what is the best way to read mouse event values and component names.
Im afreid that the x and y and left & right buttons are named differently on allmost every mouse.

i need to learn how to build the best way to read two mouses on a single LWJGL Applet ??

Im only a hobbyiest :)

//----

Thanks,,

Fool Running

I think (I'm not sure about this), that in order to be able to read the values from 2 mice the OS would have to support it.
To my knowledge, none of the OSs that Java supports (if there are any OSs at all) support 2 mice with 2 mouse cursors at once. What they usually do is have one mouse cursor that is controlled by either mouse. This would mean that any application getting the mouse values would only be able to get one set (for the one cursor that is used).

Again, this is to my knowledge, and I would be happy to be proved wrong as it would make some pretty sweet games. ;D

EDIT: clarification
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D

lwjgl001

Quote from: Fool Running on July 16, 2009, 12:23:37
I think (I'm not sure about this), that in order to be able to read the values from 2 mice the OS would have to support it.
To my knowledge, none of the OSs that Java supports (if there are any OSs at all) support 2 mice with 2 mouse cursors at once. What they usually do is have one mouse cursor that is controlled by either mouse. This would mean that any application getting the mouse values would only be able to get one set (for the one cursor that is used).

Again, this is to my knowledge, and I would be happy to be proved wrong as it would make some pretty sweet games. ;D

EDIT: clarification

Hello!

It is very easy to poll all controllers with JInput, and, then just add two GL sprites to controller coordinates. ( I have Ubuntu 9.04 )
My problem is with reading the mouse component names, my own mouses are x and y and left and right, but i dont know what
all kind of mouses there is out there.

the problem with two or more mouses on single applet is this polling the component names right :)

so, i still have a question, what is the best way to read component names for x y left right components, when using two mouses ??

//----

Thanks,,