lwjgl Applets on Macs

Started by AGP, August 13, 2009, 17:57:57

Previous topic - Next topic

AGP

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

kappa

- 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.

AGP

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.

kappa

Quote from: AGP on August 13, 2009, 18:14:49
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.

AGP

Really? Even update 13? What about 14 (should I get it)? I will post the console dump, but I doubt it's very informative.

broumbroum

Quote from: AGP on August 13, 2009, 18:14:49
(...) 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. ;)

AGP

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.

AGP

Same thing with 2Gb. OutOfMemory at 2GB of heap for an applet that runs smoothly with 256MB.

kappa

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.

AGP

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.

kappa

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.

AGP

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.

kappa

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).

AGP

Yeah, thanks a lot. I'll just write it for the ones that do, hahah. 64MB is a little too little.