Main Menu

jPCT goes Android

Started by EgonOlsen, December 12, 2007, 12:20:23 AM

Previous topic - Next topic

EgonOlsen

I've started to port jPCT over to Android (http://code.google.com/android/). It can already do some nice things, as you can see here:





This will be a port, i.e. a branch exclusively for Android (called jPCT-AE). The "normal" version of jPCT isn't affected and both versions won't be compatible (albeit very close as far as Android permits it). Sadly, the emulator doesn't do hardware acceleration ATM, which makes the port run quite slow and it has problems with more advanced features like multi texturing. However, i'm quite satisfied considering that this is the result of one evening of porting.

BTW: Debugging Android applications isn't fun... :'(

raft

hey that's really cool  :o
here comes a new era, i believe such a port will enable so much possibilities for mobile 3d applications  ;D

i cant wait to see the progress..

r a f t

JavaMan

Have you made any more progress with jpct on Android? I'm thinking about the Android developer challenge II. I'd like to use jpct for my submission, thats if I decide to do it. Just wondering if you're still working on the port. ::)

Jman

EgonOlsen

No, i paused this port. It was just too slow to be of use. Maybe it will be better on actual hardware, but if the emulator reflects hardware performance, it's just not worth it ATM... :'(

JavaMan

Oh, ok. If it isn't fast enough then why build it?
Thanks for the quick reply.

Jman

cyberkilla

Quote from: EgonOlsen on May 25, 2008, 07:35:47 PM
No, i paused this port. It was just too slow to be of use. Maybe it will be better on actual hardware, but if the emulator reflects hardware performance, it's just not worth it ATM... :'(

I would have thought that it would be installed on phones with various types of hardware. Is this not the case?
http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG

EgonOlsen

I think so. But the question is, how good fpu and actual graphics hardware (if there is any and not just emulation) would perform. In its current state, it's much too slow when using the emulator.

raft

for the android emulator, i still believe hardware acceleration can be enabled by bridging it to opengl library of host os. but unfortunately i dont have the skills to set it up. i posted about this to android internals group but didnt helped much:

http://groups.google.com/group/android-internals/browse_thread/thread/5bf6dd5bf471a564/cb836be40d60ec14




EgonOlsen

Maybe, but floating point performance was rotten as well. It was impossible to get decent collision detection running in this emulator. The whole idea of recompiling Java-bytecode to another, proprietary VM's bytecode that runs with sub-par performance (but uses less resources) is questionable IMHO.

raft

well, maybe the emulator sucks on such stuff but the actual g-phone may perform much better. it least i hope so. do you remember the film quake 1 is ported to g-phone ? it was performing quite well. i'm not sure if quake 1 is using float operations but possibly it does. cant see a reason why native code performs good on float operations but vm does not. i will name the other way a bug of dalvik vm ;)

btw, i liked the api android provides. they nicely addressed the low memory requirements of such devices. i know a little about the api since we have developed an application for the contest. we wasnt even in the first %50 which i think is a shame of google but that's another story :o

zammbi

#10
I been looking a lot into android to see where its heading. I might program a few things for it latter when I have the time.
I see that theres also many people with your problem EgoOlsen, of the emulator being too slow. Some are testing parts of there 3d programs in Java. I hope you do finish this off, but seems you might need the hardware to do it. I see a number of people already asking for a high level 3d library, so a lot people would really like this.

I see there was some work done with JME: http://www.renanse.com/blog/2007/12/early-android-results.html but since he no longer works on JME, that might of stopped.

Already 3d games are starting to show: http://www.youtube.com/watch?v=tEWYHpQWU5I , http://www.omnigsoft.com/Android/ADC/readme.html

EgonOlsen

A small update: I gave that s**t another try (and from the wording, you can guess the outcome...) using the latest Android SDK version. They have removed the OpenGLContext without giving any hint of what to use instead. Great! Combine that with a virtually non-existent documention for most GL-related classes (and why on earth are they using a doc-format that you can't link into Eclipse while they provide an Eclipse-plugin for Android?) and you have lots of fun. Anyway, i managed to port my old port from 2007 to this new version somehow...and it doesn't even start. The emulator bombs out with some "libhgl.so not found" message when trying to create the EGLDisplay and all calls to GL fail afterwards. I've given up again and i'm waiting for the next release...maybe...

fireside

I looked around just for something to do.  I found this sample dated Sept 2008:
http://android-developers.blogspot.com/search/label/OpenGL%20ES

Don't know if it's obsolete already. 
click here->Fireside 7 Games<-

JavaMan

#13
Quote from: EgonOlsen on April 21, 2009, 11:39:58 PM
A small update: I gave that s**t another try (and from the wording, you can guess the outcome...) using the latest Android SDK version. They have removed the OpenGLContext without giving any hint of what to use instead. Great! Combine that with a virtually non-existent documention for most GL-related classes (and why on earth are they using a doc-format that you can't link into Eclipse while they provide an Eclipse-plugin for Android?) and you have lots of fun. Anyway, i managed to port my old port from 2007 to this new version somehow...and it doesn't even start. The emulator bombs out with some "libhgl.so not found" message when trying to create the EGLDisplay and all calls to GL fail afterwards. I've given up again and i'm waiting for the next release...maybe...

Sounds like that wonderfully hideous system called Android to me. Android was so stupidly complex when I checked it out, and the docs confusing.

EgonOlsen

Quote from: fireside on April 22, 2009, 02:01:13 AM
I looked around just for something to do.  I found this sample dated Sept 2008:
http://android-developers.blogspot.com/search/label/OpenGL%20ES

Don't know if it's obsolete already. 
That contains the same code that i've based my stuff on...it just doesn't work. Creating the GL display fails...here:


mEgl = (EGL10) EGLContext.getEGL();

/*
* Get to the default display.
*/
mEglDisplay = mEgl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY); // <- Fails while trying to load the native lib "libhgl.so"


No idea why...and i haven't found any solution but people having similar problems.