Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
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 7450 times)
0 Members and 1 Guest are viewing this topic.
Offline Bonbon-Chan

JGO Coder

Medals: 12

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


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 ?

Offline EgonOlsen
« Reply #1 - Posted 2011-03-28 07: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:

Offline Nate

« JGO Bitwise Duke »

Medals: 167
Projects: 4
Exp: 14 years

Esoteric Software

« Reply #2 - Posted 2011-03-28 08: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

« JGO Bitwise Duke »

Medals: 82
Projects: 2

« Reply #3 - Posted 2011-03-28 12: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.). - musings on Android and Java game development
Offline Bonbon-Chan

JGO Coder

Medals: 12

« Reply #4 - Posted 2011-04-05 08: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  

EgonOlsen (79 views)
2018-06-10 19:43:48

EgonOlsen (59 views)
2018-06-10 19:43:44

EgonOlsen (78 views)
2018-06-10 19:43:20

DesertCoockie (261 views)
2018-05-13 18:23:11

nelsongames (159 views)
2018-04-24 18:15:36

nelsongames (158 views)
2018-04-24 18:14:32

ivj94 (901 views)
2018-03-24 14:47:39

ivj94 (162 views)
2018-03-24 14:46:31

ivj94 (813 views)
2018-03-24 14:43:53

Solater (177 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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‑
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!