Hello Guest

lwjgl Applets on Macs

  • 13 Replies
  • 20772 Views
*

Offline AGP

  • **
  • 51
lwjgl Applets on Macs
« on: August 13, 2009, 17:57:57 »
I've not found a single Mac capable of running lwjgl applets. Is it (unnecessarily) compiled for Java 1.6? I got my wife a Mac with 4 GB of RAM which should therefore be 64-bits, right? Should mean I could upgrade to Java 1.6 according to Apple, but it still won't!

By the way, can anyone other than me run this? http://www.agpgames.com/agpstuff/RogueSquadron.html

*

Offline kappa

  • *****
  • 1319
Re: lwjgl Applets on Macs
« Reply #1 on: August 13, 2009, 18:11:57 »
- lwjgl applets can be made to run on java 1.4 (but you'd have to not use the pack200 stuff), however they should at least run on java 1.5 provided the classes are compiled for 1.5+.

- Your applet runs fine for me, spinning room with starwars music.

- few applets you can try on mac to see if they run

http://www.lwjgl.org/applet

or

http://gamejolt.com/online/games/puzzle/hexx/249/

or

http://gamejolt.com/online/games/platformer/castle-of-dread/324/


- as for your applet make sure you always use <param name="separate_jvm" value="true"> in your applet tag, makes lwjgl applets run much better.

- also leave <param name="al_prepend_host" value="false"> as true or commented out, only make it false if you really have a use for making it false.
« Last Edit: August 13, 2009, 18:15:31 by javalwjgl »

*

Offline AGP

  • **
  • 51
Re: lwjgl Applets on Macs
« Reply #2 on: August 13, 2009, 18:14:49 »
That was a mission-selection room for an actual game (just press ENTER), but thanks for testing it for me. I will test your applets, thanks a lot. Rogue Squadron, for one, I compiled with -target 1.5 and it doesn't run on Macs.
« Last Edit: August 13, 2009, 18:47:46 by AGP »

*

Offline kappa

  • *****
  • 1319
Re: lwjgl Applets on Macs
« Reply #3 on: August 13, 2009, 18:17:32 »
That was a mission-selection room for an actual game, but thanks for testing it for me. I will test your applets, thanks a lot. Rogue Squadron, for one, I compiled with -target 1.5 and it doesn't run on Macs.

what error message do you get? a console dump would be useful.

do note there were some issues with java 6 where it didn't compile to 1.5 even though you set the parameter for it.

*

Offline AGP

  • **
  • 51
Re: lwjgl Applets on Macs
« Reply #4 on: August 13, 2009, 18:21:22 »
Really? Even update 13? What about 14 (should I get it)? I will post the console dump, but I doubt it's very informative.

Re: lwjgl Applets on Macs
« Reply #5 on: August 13, 2009, 19:43:57 »
(...) I will test your applets, thanks a lot. Rogue Squadron, for one, I compiled with -target 1.5 and it doesn't run on Macs.
That won't run with Java 1.5 unless you use the Java 5 SDK, that's possible by directly compiling with the Mac OS Java SDK. -target 1.5 is an indication that your code is compatible to compile with 1.5 but  doesn't do any check.
yet compiling with 1.5 is downgrading perf's when using the JRE 6 to execute the app. ;)

*

Offline AGP

  • **
  • 51
Re: lwjgl Applets on Macs
« Reply #6 on: August 13, 2009, 21:18:49 »
Thanks for the info, broumbroom, I appreciate it.

It's, of all things, an OutOfMemoryError. Actually so many people have been getting that that I wrote a Rogue64.html that allocates 1 GB of memory (whereas 256MB does the trick for me), but OutOfMemory still happens on the Mac.

*

Offline AGP

  • **
  • 51
Re: lwjgl Applets on Macs
« Reply #7 on: August 13, 2009, 21:34:11 »
Same thing with 2Gb. OutOfMemory at 2GB of heap for an applet that runs smoothly with 256MB.

*

Offline kappa

  • *****
  • 1319
Re: lwjgl Applets on Macs
« Reply #8 on: August 13, 2009, 21:43:02 »
applet memory is shared, so all applets share the same vm, so each time you run it, you'll be using the same vm, hence you run out of memory the second time you run your applet.

as mentioned above use the seperate_vm parameter to get round this.

*

Offline AGP

  • **
  • 51
Re: lwjgl Applets on Macs
« Reply #9 on: August 13, 2009, 22:00:31 »
No, I got that the first time. But since when you close the tab the browser kills the VM, I knew it wasn't it. I tried it just now anyway just to report back, and it didn't help, the mac still gives me OutOfMemory. Same is true for Vista x64, by the way, but at least Vista runs Java 1.6.

*

Offline kappa

  • *****
  • 1319
Re: lwjgl Applets on Macs
« Reply #10 on: August 13, 2009, 22:07:36 »
allocating memory for applets will only work for applets on Java 1.6.0_u10+ any java version before that doesn't support the parameter.

*

Offline AGP

  • **
  • 51
Re: lwjgl Applets on Macs
« Reply #11 on: August 13, 2009, 22:12:35 »
I didn't know that, so we're back to the original problem that no matter what anyone does, games won't run on Macs until Apple gets its head out of its ass and makes 1.6 available to every Mac.

*

Offline kappa

  • *****
  • 1319
Re: lwjgl Applets on Macs
« Reply #12 on: August 13, 2009, 22:19:21 »
well the seperate_vm parameter is also java 1.6.0_u10+, so your best bet is just focus on the platforms that do have it and hope that apple will catch up soon.

or try to remain in the 64mb memory size limit and make sure you clean up any resources when the applet closes (the destory() is called).

*

Offline AGP

  • **
  • 51
Re: lwjgl Applets on Macs
« Reply #13 on: August 13, 2009, 22:30:31 »
Yeah, thanks a lot. I'll just write it for the ones that do, hahah. 64MB is a little too little.