Another thought.. you have the asteroid[i] array.. and then you do the if
(asterod.isAlive()) method. First.. eliminate the method call as you've been
told.

But for this particular example.. why are you keeping an array of objects
that may not be displayed? By this I mean.. if you have 30 asteroids, and
eventually 25 will be gone.. you're looping 30 times, 25 of which are checks
for objects no longer being drawn. How about some way to avoid checking for
those objects no longer needing to be drawn? The check alone will speed you
up just a tiny bit more... on a bigger game with more objects.. this could
add a slight improvement. Not sure it's going to help that much, but just a
thought I had when I was looking at the code.


On Mon, Jan 18, 2010 at 12:15 PM, skink <psk...@gmail.com> wrote:

>
>
> On Jan 18, 7:19 pm, Robert Green <rbgrn....@gmail.com> wrote:
> > The little stuff definitely adds up and helps but when talking about
> > such a small number of objects, I don't think it will double his FPS
> > to fix.
> >
>
>
> agreed. i haven't noticed that number of objects is that small...
>
> pskink
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to