Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm new to developing Android games, but not new to developing mobile games (J2ME). I'm currently developing a board game, for a school project, with 2 things - a board and a spinning wheel (both are displayed at the same time). The user is able to zoom in/out and scroll around the board and spin the wheel. The wheel is also animated - resized during game. The board is build using tiles (2-4 different tiles on one image per board ) and the wheel is a image with numbers draw on it, using graphics.

My questions is what is the best practice to achive the best performance of the game (game has to run on every possible Android version)?

  • Should i use Android canvas or open GL?
  • Is there a mechanism for drawing tiles, animations or should i just implement it my self using drawImage()?
  • Should i separate the wheel and the board into two different threads? Should i separate the wheel and the board in to 2 activities or put it in 1 activity and draw each part separatly?
  • What would be the best way to resize the wheel during gameplay? Scale the wheel image (but the animation has to be smooth - opengl vs canvas)?
  • What would be the best way to make the board zoomable - should i scale every image on the board when the zoom is detected or does android have some better way to do this?
  • What would be the best way to make the board scrollable - should i implement a Camera that displays just a piece of the board or does android have some better way to do this?
share|improve this question
    
Not nessocerily answering your question but I think usualy doing everything using opengl is faster than doing it without it(dont know if this also applies to android). and I'm just working with [cocos2d-x](www.cocos2d-x.com), it's a 2d GameEngine for android/iphone and I think it'll help you alot if you start you project with this engine. –  Ali.S Jun 1 '11 at 22:32

1 Answer 1

up vote 1 down vote accepted
  • Should i use Android canvas or open GL?
    OpenGL is faster, it makes use of GPU.
  • Is there a mechanism for drawing tiles, animations or should i just implement it my self using drawImage()?
    Take a look to this tutorial And check Android APIDemos graphics section. Also check LunarLander example.
  • Should i separate the wheel and the board into two different threads?
    Its not necesary, you should try to separate rendering from game logic, but one thread per object is not necesary because they will render at the same time.
  • Should i separate the wheel and the board in to 2 activities or put it in 1 activity and draw each part separatly?
    One Activity
  • What would be the best way to resize the wheel during gameplay? Scale the wheel image (but the animation has to be smooth - opengl vs canvas)?
    OpenGL, apply a matrix scale transformation.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.