Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (600)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2 3
  ignore  |  Print  
  Slick-AE Development  (Read 20947 times)
0 Members and 1 Guest are viewing this topic.
Offline kevglass

« JGO Spiffy Duke »


Medals: 211
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Posted 2010-11-28 00:33:32 »

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



Performance is good and response is fine.

Thanks to the wonderful LibGDX!

Kev

Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #1 - Posted 2010-11-28 03:05:45 »

\Grin/

弾幕 ☆ @mahonnaiseblog
Offline kevglass

« JGO Spiffy Duke »


Medals: 211
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #2 - Posted 2010-11-28 18:59:28 »

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

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Nate

« JGO Bitwise Duke »


Medals: 158
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #3 - Posted 2010-11-29 01:58:54 »

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

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
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

Offline CommanderKeith
« Reply #4 - Posted 2010-11-29 02:13:51 »

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

Offline badlogicgames

« JGO Bitwise Duke »


Medals: 74
Projects: 2



« Reply #5 - Posted 2010-11-29 02:30:24 »

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

http://www.badlogicgames.com - musings on Android and Java game development
Offline kevglass

« JGO Spiffy Duke »


Medals: 211
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #6 - Posted 2010-11-29 09:19:00 »

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

Offline kevglass

« JGO Spiffy Duke »


Medals: 211
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #7 - Posted 2010-11-29 09:41:59 »

Just got it tested on the local G1 here:



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

Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #8 - Posted 2010-11-29 09:45:42 »

or for those of us that dont want to type Smiley

Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #9 - Posted 2010-11-29 09:48:02 »

works fine on my x10 - do make buttons large, hate small buttons... you'd think we were using a stylus Smiley

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline kevglass

« JGO Spiffy Duke »


Medals: 211
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #10 - Posted 2010-11-29 09:48:57 »

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

Offline kevglass

« JGO Spiffy Duke »


Medals: 211
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #11 - Posted 2010-11-29 10:37:04 »

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

Kev

Offline badlogicgames

« JGO Bitwise Duke »


Medals: 74
Projects: 2



« Reply #12 - Posted 2010-11-29 10:38:06 »

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

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.

http://www.badlogicgames.com - musings on Android and Java game development
Offline strategy
« Reply #13 - Posted 2010-11-29 10:41:59 »

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.

Offline kevglass

« JGO Spiffy Duke »


Medals: 211
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #14 - Posted 2010-11-29 10:50:30 »

@badlogic - any details?, I'll start making the changes at lunch Smiley

@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

Offline strategy
« Reply #15 - Posted 2010-11-29 11:07:21 »

@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!

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


Offline kevglass

« JGO Spiffy Duke »


Medals: 211
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #16 - Posted 2010-11-29 11:14:29 »

On the bright side it's forcing me to tighten up code I would have otherwise ignored Smiley

Kev

Offline kevglass

« JGO Spiffy Duke »


Medals: 211
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #17 - Posted 2010-11-29 13:11:40 »

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



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! Smiley No difference to code to the desktop one that looks like this:



Kev

Offline EgonOlsen
« Reply #18 - Posted 2010-11-29 13:33:30 »

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

Offline kevglass

« JGO Spiffy Duke »


Medals: 211
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #19 - Posted 2010-11-29 13:37:58 »

Probably similar to the G1 failure above.

Kev

Offline EgonOlsen
« Reply #20 - Posted 2010-11-29 13:46:01 »

Yep, it's the same issue. I haven't seen that post correctly on the phone's browser... Wink

Offline kevglass

« JGO Spiffy Duke »


Medals: 211
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #21 - Posted 2010-11-29 13:49:42 »

Looks like something a bit different in the classloading in 1.5 vs 1.6. Thanks for testing!

Kev

Offline gouessej
« Reply #22 - Posted 2010-11-29 14:26:00 »

Hi!

It does not work on my HTC G1 with Android 1.5 (official version) neither.

Offline kevglass

« JGO Spiffy Duke »


Medals: 211
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #23 - Posted 2010-11-29 14:30:18 »

So do I try and fix it, or just stick a 1.6+ sticker on it Smiley

Kev

Offline badlogicgames

« JGO Bitwise Duke »


Medals: 74
Projects: 2



« Reply #24 - Posted 2010-11-29 17:10:47 »

@badlogic - any details?, I'll start making the changes at lunch Smiley

https://bob.newdawnsoftware.com/repos/slick/trunk/Slick-AE/src/org/newdawn/slick/renderer/GDXRenderer.java

I told you via IRC 2 days ago to switch to BufferUtils.copy() instead of this
1  
2  
3  
      vertices.put(verts,0,vertIndex*3);
      colors.put(cols,0,vertIndex*4);
      textures.put(texs,0,vertIndex*2);


in flushBuffer(). It should already increase your framerate.

Your 1.5 crashing issue is due to you referencing an lwjgl class:

1  
 Could not find method org.lwjgl.opengl.GL11.glMatrixMode, referenced from method org.newdawn.slick.opengl.renderer.ImmediateModeOGLRenderer.enterOrtho


Get rid of that in all Android code.

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

libgdx is not a 3D engine. It has a shitton of classes for 2D and 3D game development. No limits there, no scenegraph imposed on you. As said above, check the test samples or the 2D rendering part of the sample game. Or use Slick on top of libgdx Smiley

http://www.badlogicgames.com - musings on Android and Java game development
Offline kevglass

« JGO Spiffy Duke »


Medals: 211
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #25 - Posted 2010-11-29 21:39:25 »

Great stuff, yeah I missed the comments on IRC even the second time Sad

As to the class error above, I understand the issue but I can't quite see why it would be different on 1.5 to 1.6

Kev

Offline kevglass

« JGO Spiffy Duke »


Medals: 211
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #26 - Posted 2010-11-29 22:10:59 »

Updated the APK:

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

Might work on those 1.5 devices now, also added the optimization above. Thanks!

Kev

Offline badlogicgames

« JGO Bitwise Duke »


Medals: 74
Projects: 2



« Reply #27 - Posted 2010-11-30 01:12:02 »

Awesome! Did you measure the difference? I guess on your mighty Evo you won't see any. Will test on my 1.5 Hero and reprot back.

@Class loading issue: they change the Dalvik internals a lot in each version. Class loading on <= 1.5 is a bit of a pos. They fixed it in 1.6 (e.g. imports do not factor into the calculation anymore, only when you actually reference the class in executing code it will get loaded). Silly, but true story Smiley

http://www.badlogicgames.com - musings on Android and Java game development
Offline badlogicgames

« JGO Bitwise Duke »


Medals: 74
Projects: 2



« Reply #28 - Posted 2010-11-30 01:48:08 »

Still explodes on my 1.5 Hero. Verifier Error. Here's the problem.

In GdxGameContainer you have an import of LwjglApplication. Additionally you have a method called GdxGameContainer.start() which seems to be used on the desktop only, so that code path gets never executed on Android. Now, in your SlickActivity you instantiate a GdxGameContainer. On 1.5 all the classes in all of the code of GdxGameContainer are being loaded (well at least verified), be they executed or not. This makes kitty assplode in my face. Suggestions: make a base GdxGameContainer implementing the all the functionality except for start() and setAndroidApp(). Derrive one class for Android and one for Lwjgl and use those were appropriate.

You will make a lot of people happy. The market statistics are actually inflated. There's more 1.5 devices around than are shown on the dashboard. The reason is that people that just bought their phone are more likely to show up in the monthly statistics than people that bought a 1.5 device half a year ago.

Also, just because devices are >= 1.5 doesn't mean they don't suck still :p I could update my Hero to 2.1 and it would still run like shit. Low to mid-end hardware will not go away as that's actually one of the "strengths" of Android, allowing device manufacturers to create shitty phones for low prices, perfectly suited for the masses that are non-geeks. The bulk of the 2.1 devices that show up on the Android market dashboard are actually updated Moto Blurs, Heros etc. Sad but true story Sad

http://www.badlogicgames.com - musings on Android and Java game development
Offline kevglass

« JGO Spiffy Duke »


Medals: 211
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #29 - Posted 2010-11-30 07:58:28 »

New version here:

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

Kev

Pages: [1] 2 3
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (29 views)
2014-12-15 09:26:44

Mr.CodeIt (20 views)
2014-12-14 19:50:38

BurntPizza (40 views)
2014-12-09 22:41:13

BurntPizza (75 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (50 views)
2014-12-03 16:27:13

CopyableCougar4 (47 views)
2014-11-29 21:32:03

toopeicgaming1999 (113 views)
2014-11-26 15:22:04

toopeicgaming1999 (100 views)
2014-11-26 15:20:36

toopeicgaming1999 (30 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!