Main Menu

jPCT goes Android

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

Previous topic - Next topic

raft

Quote from: EgonOlsen
However, that may not be that much of an issue for mobile apps, because the controls have to be simplified anyway to be usuable, so that a much simpler collision detection might work well enough.
i agree.

i was hoping two render 2-3 of ~2000 polygon avatars with a very simple background but seems as it wont be possible. maybe rendering avatars perform better since there is much less polygon ordering or similar things ?

EgonOlsen

Avatars may work better (unless animated... ;) ), because they cause less overdraw, i.e. they consume less fillrate. Apart from that, it all comes down to sending batches of geometry data through the pipeline. There is no processing on the polygon level like in the software renderer hence not less sorting of something.
I guess we'll have to wait and see....i hope to release an alpha of the port in a week or so. The Javadocs won't reflect the fact that this thing runs on android now, but i'll correct that later.

Too bad that the technical specifications of the mobile GPUs are pretty much unknown in detail. My educated guess of the vertex performance of the chip in my phone is 200,000 vertices/second at max. The Quake3 demo maxes out at 82500, most likely due to state changes and fill rate limitations. Take your three avatars with 6000 polygons and you might get a frame rate around 10-13 fps, which sounds ok to me for a phone app. However, that doesn't include animations, which will hurt...

raft

i cant image a karga without animations :-\ does this thing support shaders so hardware skinning may be an option ?

EgonOlsen

Shaders? No way...it doesn't even support mip mapping... ;D

I'm not saying that animations aren't possible, but maybe you have to limit the number of interpolated frames to get things fast enough. The first Quake used keyframes, but no interpolation between them. Looks sucky nowadays, but was ok back then.

EgonOlsen

I did some fill rate tests...around 10 megapixel/second seems the maximum that it possible for not much more than a simple plane. That's roughly 1/5th of the power of a Voodoo 1 but it should be sufficient to create something on the Pentium MMX software renderer level, which shouldn't look too shabby on the small display.

raft

that doesnt sound that bad. lets wait and see as you said ;)

as android is java 5 based there is no need to support older java versions. that may allow some optimizations like holding vertex data in nio buffers and taking them from IVertexControllers as nio buffers. anyway nevermind, just thinking aloud, i'm sure you already consider every optimization possibility ;D

raft

btw, how much does it take to load that quake level in your phone ?

zammbi

#82
I wonder if android 2.1 will help: http://pocketnow.com/rumor/google-hopes-to-reduce-fragmentation-android-21-for-all

QuoteI guess we'll have to wait and see....i hope to release an alpha of the port in a week or so.
Glad you haven't given up :)

EgonOlsen

Quote from: raft on March 01, 2010, 04:26:31 AM
btw, how much does it take to load that quake level in your phone ?
When loading an optimized format, serialized with the "desktop" version of jPCT, it's ready after 40 seconds.

EgonOlsen

Quote from: zammbi on March 01, 2010, 01:57:19 PM
I wonder if android 2.1 will help: http://pocketnow.com/rumor/google-hopes-to-reduce-fragmentation-android-21-for-all

As long the hardware doesn't change, this can't do any good on the GPU level. They may have improved Dalvik's performance, but i somehow doubt it...

EgonOlsen

Obviously, they are working on a JIT: http://groups.google.com/group/0xlab-devel/browse_thread/thread/1edef26f4e5b7427?pli=1

However, it won't be available on "old" phones like mine... :'(

raft

that is good news :)

why wont it be available for old phones ? isn't installing a newer version of android an option ?

EgonOlsen

Maybe, but i don't want to trash the phone, so i'm limited to the official updates (which have been risky enough in the past...). Currently, i'm running 1.5...there is an update to 1.6, which i'll make one day but i don't think that anything higher will be officially released any more for this phone.
Anyway, IF a JIT makes it into the Dalvik VM, i'm willing to get myself a phone that can use it anyway.

zammbi

Well as I posted above 2.1 may come out for all phones if your lucky.

EgonOlsen

#89
Yes, but i doubt it. Which motivation should a company like Samsung have to update an older phone which actually works fine with the OS it has when newer ones are already available? Let alone that for example the G1 doesn't have enough memory to upgrade to 1.5 or 1.6 IIRC. How can it upgrade to 2.1 then? Anyway, we'll see and hope for the best... ;D

Edit: And even then...2.1 doesn't have that JIT enabled, so unless you start hacking your phone, you'll be out of luck...