Slick-AE Development

I started worked on Slick on Android again (mostly inpsired by JPCT :)) a couple of days ago. Outlook seems to be good:

http://dl.dropbox.com/u/1668516/android/kitipong.jpg

Performance is good and response is fine.

Thanks to the wonderful LibGDX!

Kev

;D/

Probably runs killer slow on anything but Desire HD level hardware but still, for those who have the time to test:

http://dl.dropbox.com/u/1668516/android/Slick-Android-Test.apk

Kev

Cool! Runs fine on the Droid. Maybe log Gdx.graphics.getFramesPerSecond() every 5 seconds or so? Doesn’t run on the G1:

11-28 17:54:32.163: ERROR/dalvikvm(1129): Could not find method org.lwjgl.opengl.GL11.glMatrixMode, referenced from method org.newdawn.slick.opengl.renderer.ImmediateModeOGLRenderer.enterOrtho
11-28 17:54:32.163: WARN/dalvikvm(1129): VFY: unable to resolve static method 4917: Lorg/lwjgl/opengl/GL11;.glMatrixMode (I)V
11-28 17:54:32.163: WARN/dalvikvm(1129): VFY:  rejecting opcode 0x71 at 0x0004
11-28 17:54:32.163: WARN/dalvikvm(1129): VFY:  rejected Lorg/newdawn/slick/opengl/renderer/ImmediateModeOGLRenderer;.enterOrtho (II)V
11-28 17:54:32.163: WARN/dalvikvm(1129): Verifier rejected class Lorg/newdawn/slick/opengl/renderer/ImmediateModeOGLRenderer;
11-28 17:54:32.163: WARN/dalvikvm(1129): Exception Ljava/lang/VerifyError; thrown during Lorg/newdawn/slick/opengl/renderer/Renderer;.<clinit>
11-28 17:54:32.163: DEBUG/AndroidRuntime(1129): Shutting down VM
11-28 17:54:32.163: WARN/dalvikvm(1129): threadid=3: thread exiting with uncaught exception (group=0x4001da28)
11-28 17:54:32.173: ERROR/AndroidRuntime(1129): Uncaught handler: thread main exiting due to uncaught exception
11-28 17:54:32.203: INFO/ActivityManager(84): Process com.android.vending (pid 1122) has died.
11-28 17:54:32.383: ERROR/AndroidRuntime(1129): java.lang.ExceptionInInitializerError
11-28 17:54:32.383: ERROR/AndroidRuntime(1129):     at org.newdawn.slick.SlickActivity.start(SlickActivity.java:47)
11-28 17:54:32.383: ERROR/AndroidRuntime(1129):     at org.newdawn.slick.android.SlickTestActivity.onCreate(SlickTestActivity.java:24)
11-28 17:54:32.383: ERROR/AndroidRuntime(1129):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
11-28 17:54:32.383: ERROR/AndroidRuntime(1129):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364)
11-28 17:54:32.383: ERROR/AndroidRuntime(1129):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417)
11-28 17:54:32.383: ERROR/AndroidRuntime(1129):     at android.app.ActivityThread.access$2100(ActivityThread.java:116)
11-28 17:54:32.383: ERROR/AndroidRuntime(1129):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
11-28 17:54:32.383: ERROR/AndroidRuntime(1129):     at android.os.Handler.dispatchMessage(Handler.java:99)
11-28 17:54:32.383: ERROR/AndroidRuntime(1129):     at android.os.Looper.loop(Looper.java:123)
11-28 17:54:32.383: ERROR/AndroidRuntime(1129):     at android.app.ActivityThread.main(ActivityThread.java:4203)
11-28 17:54:32.383: ERROR/AndroidRuntime(1129):     at java.lang.reflect.Method.invokeNative(Native Method)
11-28 17:54:32.383: ERROR/AndroidRuntime(1129):     at java.lang.reflect.Method.invoke(Method.java:521)
11-28 17:54:32.383: ERROR/AndroidRuntime(1129):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
11-28 17:54:32.383: ERROR/AndroidRuntime(1129):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
11-28 17:54:32.383: ERROR/AndroidRuntime(1129):     at dalvik.system.NativeStart.main(Native Method)
11-28 17:54:32.383: ERROR/AndroidRuntime(1129): Caused by: java.lang.VerifyError: org.newdawn.slick.opengl.renderer.ImmediateModeOGLRenderer
11-28 17:54:32.383: ERROR/AndroidRuntime(1129):     at org.newdawn.slick.opengl.renderer.Renderer.<clinit>(Renderer.java:23)
11-28 17:54:32.383: ERROR/AndroidRuntime(1129):     ... 15 more

Worked fine on the Samsung galaxy, android 2.1. Nice work!

Good job! Drop me a line if you decide to move the nob to 11. Lot of stuff that could make it faster.

Didn’t really expect it to work on the G1 but then I didn’t expect it to fail that way :wink:

Thanks for testing folks!

@badlogicgames I’ll happily move it to GL11 if thats what you mean, what sort of stuff can be done to speed it up?

Kev

Just got it tested on the local G1 here:

http://dl.dropbox.com/u/1668516/android/g1.png

Though this one is running a MOD, not sure what the difference would be in classloading.

G1
1.6
2.6.29.6-cyanogenmod
CyanogenMod-4.2.15.1
DRC83

Runs like a dog as expected but came up and resumed fine.

Kev

or for those of us that dont want to type :slight_smile:

http://qrcode.kaywa.com/img.php?s=5&d=http%3A%2F%2Fdl.dropbox.com%2Fu%2F1668516%2Fandroid%2FSlick-Android-Test.apk

works fine on my x10 - do make buttons large, hate small buttons… you’d think we were using a stylus :slight_smile:

Heh, fair point. It was really just to prove an old Slick game would work on Android with the new stuff - so the game wasn’t really designed for the small screen.

Kev

Sorry for spammy updates but Endolf confirms it works (albeit slowly) on the Hero too.

Kev

GL11 wouldn’t help a lot (and isn’t supported by all devices either). But that game could run perfectly fine on the G1. Just need to rework some of the renderer stuff.

Ooh… now we’re talking. I’m already working with Slick for my desktop projects, and Slick for Android would be very interesting (assuming I could get it to work for 1.5). Will test this on my Magic later.

@badlogic - any details?, I’ll start making the changes at lunch :slight_smile:

@strategy - have to keep pointing it out, Slick works on Android - but it’s really down to the LibGDX which is totally awesome. it’s an enabler for me but it’s a fantastic library on it’s own!

Kev

Absolutely. But having a good 2D abstraction layer around libgdx’s 3D world should make for cleaner code - code that is hopefully easier to build and maintain - for those of us who do 2D apps, but would like to leverage the GL for the performance benefits. At least in theory. :slight_smile:

On the bright side it’s forcing me to tighten up code I would have otherwise ignored :slight_smile:

Kev

Thought I’d try it with something a bit more meaty, see what breaks. This is my latest hack job “Warpstone”. It does procedural dungeon generation, navmesh based path finding and dynamic lighting using tile based vertex colours with smoothing…

http://dl.dropbox.com/u/1668516/android/warpstone-android.png

Yep, it runs like a dog, still playable though. Seems good for a non-optimized first hack at this stuff. Android really is starting to look great! :slight_smile: No difference to code to the desktop one that looks like this:

http://dl.dropbox.com/u/1668516/concept/warp3.png

Kev

Crashes instantly on my Samsung Galaxy with Android 1.5. Exception is something about java.lang.VerifyError in Renderer.java line 23 (can’t post the complete log right now, but it’s not much more illustrative anyway).

Probably similar to the G1 failure above.

Kev