Problem with LWJGL game on a Mac

Started by Torradin, December 25, 2010, 21:50:13

Previous topic - Next topic

Torradin

I've been developing a game using the LWJGL game library on a PC for a few weeks now. It is a 3D First-Person game. The game is very, very basic, and ran perfectly on my PC. Today, I have bought an iMac running Mac OS X Snow Leopard. I have installed Eclipse IDE, with the LWJGL library, and imported my workspace which I had on my PC. After I go to run the game on my Mac, It runs good, and the mouse works to look around, although I cannot move around with my W, A, S, and D keys, in which I could on my PC. Could someone please help? This is somewhat urgent. Thanks!

If needed, I'll supply the source code.

Jens v.P.

Which version of Eclipse are you using on OS X? Are you using Carbon or Cocoa, especially for retrieving the key event? There is a known problem with Carbon applications, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=207298 .

Cheers,
Jens

avm1979

Quote from: Torradin on December 25, 2010, 21:50:13
I've been developing a game using the LWJGL game library on a PC for a few weeks now. It is a 3D First-Person game. The game is very, very basic, and ran perfectly on my PC. Today, I have bought an iMac running Mac OS X Snow Leopard. I have installed Eclipse IDE, with the LWJGL library, and imported my workspace which I had on my PC. After I go to run the game on my Mac, It runs good, and the mouse works to look around, although I cannot move around with my W, A, S, and D keys, in which I could on my PC. Could someone please help? This is somewhat urgent. Thanks!

If needed, I'll supply the source code.

Are you, by chance, launching the game main loop from a swing/awt Button's ActionListener or somesuch?  If you are, that will hang the event processing thread until your game exists, and on a Mac, LWJGL uses the awt keyboard events for input.  If that's the case, just run the game in a new thread.