# what kind of technique is used in android game rendering like Pou

Hi I want to create a game which is graphicaly similar like Pou, I just do not know how is is rendered, if it is using opengl or just bitmaps at canvas? I want nothing serious, so i think opengl is to heavy tool for that. Just some animal, with moving eye and mounth... http://developer.android.com/training/building-graphics.html -- is where i am looking for the answer.

thanks

• What have you tried? What they used is not a question for this site, because it just results in speculation. What you should use is not a question for this site because it just results in opinions. So we need to know more about the actual problem you've encountered, why does opengl not work? What problems were you having with it?
– House
Jul 26 '13 at 13:43

For drawing body of main character, this application use Canvas and 2D drawing primitives like curves, lines, circles :

1. The main body is drawn using a cubic bezier curve. This one is "deformed" real-time to give illusion it's "alive". Same goes for mouth.

2. Eyes are draw using circles.

The game doesn't use any custom format to store 2D primitives, all these drawings calls are hard-coded in different methods. Depending which outfit player has selected, the game choose the corresponding method. Methods use several inputs (elapsed time, tilt device orientation, touch gestures, character status, etc...) and simple math (eg : easing functions, ...) to do animations and rendering.

This is for drawing the main "deformable" part (body, eyes, mouth, ...).

For all the other items that requires more complex shapes (like hats, ears, glasses, eyebrows, suit, moustache, ...), the game simply use bitmaps :

They are draw on the top of main character. They are not "deformable" like the rest but are scaled, rotated and translated to always follow main character body.

Most other parts of the application (eg : icons) also use bitmaps.

source : I made an analysis on the inner workings of the game using an android emulator.

• Nice answer. Well done. Jul 26 '13 at 22:09
• actually this is the only one :) with this and a little work you should be able to create a Pou clone without too much trouble... Jul 27 '13 at 19:40
• @tigrou Is it possible to do same without drawing in code. ( for eyes for example): Is it possible to use 20 frame for "blink" animation and use it instead of drawing eyes and code the deform of each frame. Is there anything bad with this method ? Apr 4 '14 at 11:49
• @EmAdpres : by frames, do you mean encoding the animations in sprites ? If so, yes it could be a possible solution. The major downside is that animations will be hardcoded and thus there will be less flexibility. If we take the blinky eyes example, you will only be able to rotate, scale, or translate them if they are sprites. Rendering them using primitives would allow much more things, for eg moving individual parts regarding user input, like en.wikipedia.org/wiki/Xeyes program. Apr 4 '14 at 15:26
• @tigrou Thank you sir. You're right. yes, I meant frame-by-frame sprite. then flexibility will be less, but I guess hard-coding all those shapes should be Time-consuming work (any eternal source for doing it? for example Pou's mouth get many shapes). but again for eyes example, we possibly can separate Eyelid from pupil for rotating pupil alone. and (for double-check) you agree that using animation may be a alternative practical-solution ? Apr 4 '14 at 16:41