Jump to content

  • Log In with Google      Sign In   
  • Create Account


2D Graphics on Android. Should I use OpenGL ES?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Abrahman McGuyenski   Members   -  Reputation: 116

Like
0Likes
Like

Posted 13 July 2013 - 12:41 PM

Hi everyone. I'm making an 2D game for android with some intensive 2D vector graphics. I know it is possible to draw stuff on a Canvas object, but I don't know if it's fast enough for making a game with high FPS.

My game will have a background layer (bitmap image) and some (not-so-simple) vector-based characters over it.

 

Should I use OpenGL ES?

Should I use a canvas and draw on it? If not, what could I use?

Is OpenGL worth it for 2D graphics?

Is OpenGL much faster than "drawing on canvas" in 2D?

 

Thank you.


Firemen get paid even if there's no fire, and that's a good thing -me


Sponsor:

#2 frob   Moderators   -  Reputation: 19598

Like
1Likes
Like

Posted 15 July 2013 - 02:21 PM

Depends on the usage, depends on the device.

 

New devices and new OS versions (Jelly Bean) support hardware acceleration on Canvas drawing. Older systems (60% of devices in the wild) a will keep everything on the main processor.

 

So for 60% of devices the images will be manipulated uncompressed, will not use video memory, and get no special treatment. Performance will be approximately linear based on the number of items drawn.  

 

If you have 50 or 100 blits to the Canvas, you should be able to reach a reasonable framerate even on old devices.  More blits = more memory requirements for each image you are drawing and more CPU time to do the work.

 

 

If that is sufficient for your game, then go for it.

 

Of course you can get much higher performance with OpenGL ES and take advantage of batch operations, compressed textures, asynchronous specialized hardware and memory, and all the other goodies it gives you. But if your game doesn't require it, there is no need to force you down that path.


Check out my personal indie blog at bryanwagstaff.com.

#3 PaulJabs   Members   -  Reputation: 130

Like
0Likes
Like

Posted 16 July 2013 - 01:24 PM

OpenGL is good. Iam currently studying android game development. I will encourage you to read the pdf.

"Beginning Android Game Development".

It has an opengl tutorial at chapter 7. Goodluck.



#4 Rottz   Members   -  Reputation: 443

Like
0Likes
Like

Posted 18 July 2013 - 11:21 PM

OpenGL is good. Iam currently studying android game development. I will encourage you to read the pdf.

"Beginning Android Game Development".

It has an opengl tutorial at chapter 7. Goodluck.

 

 

Why dont you guys use an engine built on top of OpenGL? For example: www.andengine.org

 

 

Best,

- Pedro / RoTTer



#5 Abrahman McGuyenski   Members   -  Reputation: 116

Like
0Likes
Like

Posted 19 July 2013 - 01:32 PM

Thank you guys for your advices.


Firemen get paid even if there's no fire, and that's a good thing -me





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS