Thanks, two very useful posts. I've watched both videos, and I think they're essential viewing for any Android game developer.
One of the first things the book says in the chapter introducing OpenGL is that Canvas isn't fast enough for anything with much more to render than "Mr Nom". I should have realised that before I started coding :-/. I'm still not sure of the best way to do the rendering. The game I'm currently writing, "Bombz", has 20x15 cells rendered as 32x32 pixel tiles, but I want to reuse the engine for games with at least 32x32 cells and larger tiles, with 4-way scrolling. To support scrolling I think redrawing the whole screen on every frame is the best, if not the only, way. These games are a bit different from Replica Island because the gameplay can alter the type of tile in each cell in real time. For Bombz I still have two options: make a texture atlas of the whole level, and update tiles within the texture when necessary. But that's more difficult with separate rendering and game logic threads and I think the atlas would be far too big on the games with larger scrolling levels. So I think the best way is to have each loop of the rendering thread iterate through the visible cells and render each tile as a textured quad (I think that's right, I've barely scratched the surface of OpenGL yet). Agreed? On Mon, 30 Apr 2012 17:21:20 -0700 Miguel Morales <[email protected]> wrote: > I second the OpenGL route. It's pretty much the only thing that'll give > you the performance you want. You may also want to check: > http://www.youtube.com/watch?v=U4Bk5rmIpic > http://www.youtube.com/watch?v=7-62tRHLcHk > > On Mon, Apr 30, 2012 at 4:54 PM, Adam Ratana <[email protected]> wrote: > > > I think going with OpenGL is likely your best bet here. Further in the > > book he will have the OpenGL implementation of the same. There is also the > > excellent graphic library by the same, libgdx which you might also consider > > using. Another place to look is the replica island source - a fully > > implemented 2d game, and also look for the "sprite method test" which > > compares different methods of drawing sprites. > > > > You can indeed choose to only render parts of the screen that you consider > > dirty, which can also help with your performance, but likely you should be > > able to get the performance you want with just openGL, a texture atlas and > > drawing it all at once. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

