Author Topic: jPCT goes Android  (Read 61503 times)

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: jPCT goes Android
« Reply #75 on: February 28, 2010, 06:29:55 pm »
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 ?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: jPCT goes Android
« Reply #76 on: February 28, 2010, 08:09:18 pm »
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...

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: jPCT goes Android
« Reply #77 on: February 28, 2010, 08:48:02 pm »
i cant image a karga without animations :-\ does this thing support shaders so hardware skinning may be an option ?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: jPCT goes Android
« Reply #78 on: February 28, 2010, 09:03:50 pm »
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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: jPCT goes Android
« Reply #79 on: February 28, 2010, 09:14:29 pm »
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.

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: jPCT goes Android
« Reply #80 on: March 01, 2010, 12:56:06 am »
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

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: jPCT goes Android
« Reply #81 on: March 01, 2010, 04:26:31 am »
btw, how much does it take to load that quake level in your phone ?

Offline zammbi

  • float
  • ****
  • Posts: 361
    • View Profile
Re: jPCT goes Android
« Reply #82 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

Quote
I 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 :)
« Last Edit: March 01, 2010, 02:13:18 pm by zammbi »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: jPCT goes Android
« Reply #83 on: March 01, 2010, 08:38:22 pm »
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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: jPCT goes Android
« Reply #84 on: March 01, 2010, 08:39:46 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...

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: jPCT goes Android
« Reply #85 on: March 02, 2010, 10:03:37 am »
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... :'(

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: jPCT goes Android
« Reply #86 on: March 02, 2010, 09:02:51 pm »
that is good news :)

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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: jPCT goes Android
« Reply #87 on: March 02, 2010, 09:22:33 pm »
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.

Offline zammbi

  • float
  • ****
  • Posts: 361
    • View Profile
Re: jPCT goes Android
« Reply #88 on: March 02, 2010, 09:47:19 pm »
Well as I posted above 2.1 may come out for all phones if your lucky.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: jPCT goes Android
« Reply #89 on: March 02, 2010, 09:51:51 pm »
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...
« Last Edit: March 02, 2010, 09:55:12 pm by EgonOlsen »