Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (576)
games submitted by our members
Games in WIP (497)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Android & GLES2.0  (Read 5151 times)
0 Members and 1 Guest are viewing this topic.
Offline Bonbon-Chan

JGO Coder


Medals: 12



« Posted 2011-03-28 09:13:05 »

Hi,

I got a Android Tablet (Archos 10.1) so I started to develop on it  Wink.
My aim is to do a first 2D game with OpenGL ES 2.0. My first tries work but it is my first with GLES2 and I have performance problem  so :

- what texture internal format should I use (GL_RGBA, ...) ? Will it impact performance ?
- any tips to speed up things ?
- what design are you using to deal with logic and rendering ? (you put the logic in a indepandent thread. you put it in the onDrawFrame()...)
- what is your target FPS ? (60 fps is just a dream  Undecided)
- (not OpenGL) how can I suspend sleeping mod ?
- what do you use to take screenshot/movie on the Android device ?

Thanks
Offline EgonOlsen
« Reply #1 - Posted 2011-03-28 09:50:15 »

- any tips to speed up things ?
During the development of jPCT-AE, i came up with some hints to increase performance on the Dalvik-VM. Most of these things will clutter your code, so apply them only if they do any good in a particular situation: http://www.jpct.net/wiki/index.php/Performance_tips_for_Android

Offline Nate

JGO Kernel


Medals: 128
Projects: 3
Exp: 14 years


Esoteric Software


« Reply #2 - Posted 2011-03-28 10:29:00 »

Check out libgdx. It handles the tedious stuff like game loop and texture loading but doesn't get in your way to just do OpenGL, both ES 1.0/1.1 and 2.0. Plus you can develop your Android app on the desktop for a ~10x productivity boost. At the very least, you can see how we do it (Apache license).

60fps is completely doable for many games on newer devices. Some devices, like the Droid, are fillrate limited and you'll get ~45fps just by filling the screen once.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline badlogicgames
« Reply #3 - Posted 2011-03-28 14:34:32 »

Blending and alpha testing is pretty much a no go, use it only when needed, messes with the tile engines of the mobile GPUs. FBOs incure an additional cost it seems due to the shitty compositing the Android window manager does at runtime, post processing effects will be hard to do with high performance. Know your texture filters, use mipmapping whenever possible (and the cheapest mipmapping filter if possible). Know your precision modifiers in the fragment shader, see the PowerVR SDK tools which can tell you how well your shaders will perform (counts cycles etc.).

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

JGO Coder


Medals: 12



« Reply #4 - Posted 2011-04-05 10:18:54 »

Ok. I have plaied a few with my code and I get some improvement. I still not use libgdx (If I'm correcte the main reason to use it is that they have made their own GLES binding whish is better).

I have find out how to take screenshot (ddmm tool in the SDK) and it seem that movie can't be done directly from the device.

What do you think about fixed-point format for vertices/texture coordinates ? If i'm not wrong, it doesn't impact data flow between CPU to GPU since they are both 4 bytes. Or is there a lost of speed in conversion somewhere ?
The main speed up with fixed-point is on CPU side ?
The fixed-point format is 16b/16b, right ?

Since it is a 2D game, I think that precision is far enough with fixed-point.
Pages: [1]
  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.

xsi3rr4x (15 views)
2014-04-15 18:08:23

BurntPizza (13 views)
2014-04-15 03:46:01

UprightPath (27 views)
2014-04-14 17:39:50

UprightPath (12 views)
2014-04-14 17:35:47

Porlus (29 views)
2014-04-14 15:48:38

tom_mai78101 (51 views)
2014-04-10 04:04:31

BurntPizza (110 views)
2014-04-08 23:06:04

tom_mai78101 (211 views)
2014-04-05 13:34:39

trollwarrior1 (179 views)
2014-04-04 12:06:45

CJLetsGame (185 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
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!