Hi,

1. Get rid of all get/set methods.
2. Eliminate some of the System.currentTimeMillis (two consecutive
calls leads to the same number)
3. Save a reference to the current object inside the array instead of
accessing an array lots of times (e.g.: asteroids[i])
4. Most important: don't call canvas.rotate(angle, x, y) ! Cache all
possible rotations into bitmaps and draw them on screen.

A good Java game always make sure that the garbage collector is NEVER
called during the game: allocate all objects before and then display
them during the game.

In the TotalCross game api, there's a class that draws a score without
allocating memory. See:
http://www.totalcross.com/doc/totalcross/game/package-summary.html
(TextRenderer)

regards

    guich
-- 
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

Reply via email to