Rather than having people guess at why that might be slow (I can see a
handful of possibilities right away), may I suggest you profile it and find
out for sure:
http://android-developers.blogspot.com/2010/10/traceview-war-story.html
String
--
You received this message because you are
Thank you both for your suggestions, they are really helpful. I was
able to optimise my code quite a bit.
My collision detection is pretty primitive, so I'll definitely try to
improve that.
public boolean detectCollision(Point target, int dist)
{
return (Math.abs(this.x -
Also do you mean that they should be split into separate threads or
just separate methods?
On May 24, 11:25 am, neuromit stuart.lay...@gmail.com wrote:
Thank you both for your suggestions, they are really helpful. I was
able to optimise my code quite a bit.
My collision detection is pretty
Yeah, drawing sprites on a canvas in general is slow. Not to mention with
the added collision detection.
I would try doing a game-loop for for the animation/calculation and have a
single loop for drawing.
This makes sure you draw as fast as possible and your calculations run at a
steady rate.
They should be in separate threads.
On Tue, May 24, 2011 at 8:42 AM, neuromit stuart.lay...@gmail.com wrote:
Also do you mean that they should be split into separate threads or
just separate methods?
On May 24, 11:25 am, neuromit stuart.lay...@gmail.com wrote:
Thank you both for your
On Tue, May 24, 2011 at 4:25 PM, neuromit stuart.lay...@gmail.com wrote:
Thank you both for your suggestions, they are really helpful. I was
able to optimise my code quite a bit.
My collision detection is pretty primitive, so I'll definitely try to
improve that.
public boolean
Daniel,
thanks for the link, it is VERY informative. Ok I'll separate the code
into two loops.
Until I get that finished are there problems with detecting how long
the drawing/moving takes and then scaling the timeout appropriately?
This won't prevent the frame rate from dropping below
7 matches
Mail list logo