jPCT-AE - a 3d engine for Android > Support

blitting text and images

<< < (3/9) > >>

raft:
indeed it was sunday i suppose, does it make a difference ?
right, each character is single, transparent but unscaled blit. each balloon image are two (border and inside) transparent and scaled blits.

here is an apk: http://www.aptalkarga.com/tmp/A1.apk
center key adds a random bubble. they disappear after some seconds
you should probably need to remove old S1 or A1 before installing this.

thanks :)

EgonOlsen:
It starts with 8fps and slows down to almost 0 if i keep adding bubbles. Looks like as if you are not discarding the bubbles once they moved out of the screen. However, 8 fps isn't really fast either. I'll write myself a test case to see how much this can be improved...then again, i don't expect any miracles unless i'm doing something really stupid that i haven't noticed yet. But basically, blitting is like playing an animation, i.e. it's all about pumping new vertices to the GPU each frame. That part can be optimized a little bit by using indexed geometry (which might run 10-20% faster than now), but apart from that, i don't see much room for improvement. We'll see...

EgonOlsen:
You might want to try to order your blits by texture if possible. The less texture changes there are, the better. However, i don't think that this will help very much, but maybe it's worth a try anyway.

raft:
yes, out of screen condition is not checked. it wasnt necessary for desktop version. i can do it. in real life there aren't many bubbles on the fly at the same time, but it wont hurt but help for sure..

i've tried blitting all text at last. which is kind of sorting. did slightly help: ~5-10% increase

i definitely need a boost here. 10-20% even 30-40% range wont help much

* i can try to use android text utilities. i'm not sure this is possible over GL surface and even if possible i seriously doubt it will perform any better.
* instead of character blitting, i can render each bubble's text to a texture and blit it. this is what i do in desktop karga except it's java2d not blitting. this will dramatically reduce number of blits in cost of texture creation
* what else ?

EgonOlsen:
You might use a modified approach of your second bullet point, by filling some pre-generated textures with the bubble texts via an ITextureEffect. That will reduce at least some of the overhead of creating new textures.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version