IcedDoggie / collisiondetectionkit

Automatically exported from code.google.com/p/collisiondetectionkit
0 stars 0 forks source link

the projects slowdown after 10-20 seconds #14

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
i used the code for the terrain collision.
i use one large object for as the terrain.

The game starts ok, but after few seconds begin to slow down dramatically.

i use the 1.5 version on windows xp

system is P4 at 2,8 ghz.

Could be something related to the creation of the objects?
Maybe something must be clear or erased in the render loop?
Don't know.

Please, continue with the development of your code: is really great!!!

Thank you very much.
Best regards
Davide

Original issue reported on code.google.com by AmiB...@gmail.com on 21 Dec 2009 at 11:28

GoogleCodeExporter commented 8 years ago
In the render loop i clear the graphics. Now is much more fast.

One question: it's possible to use the angle to detect the direction or part 
that
colleded? I.E: the object collided on his top or bottom. Think about a bouncing 
ball:
if i hitting the ground i can jump, otherwise i can't.
Could you put an example of this?

Thank you

Original comment by AmiB...@gmail.com on 24 Dec 2009 at 12:01

GoogleCodeExporter commented 8 years ago
i have the same problem. How exactly do you fix it? Pls help! 
 send me email at: milanbassa@hotmail.com

Original comment by milanba...@gmail.com on 30 Dec 2009 at 2:45

GoogleCodeExporter commented 8 years ago
Hi I am using this kit, & found it very useful, but i had found same problem 
that when multiple objects added & move out, the Movie-clip is get slow down,
Please Help, i think its due to creation of array in for loop to check 
collision, I don't know whether i am right, Please Help

Thanks in Advance

Original comment by nagpal.s...@gmail.com on 25 Oct 2010 at 7:11

GoogleCodeExporter commented 8 years ago
I'm a bit late to comment on this, but I was having a similar issue and figured 
out that you need to clear the collision array regularly to avoid framerate 
issues, this is all that I had to add to the end of the updateScene method:

    while(collisions.length > 0)
        {
    collisions.pop();
        }

"collisions" being the array where the collision lists get stored:
var collisions:Array = _collisionList.checkCollisions();

Original comment by vhuedes...@gmail.com on 9 Jul 2011 at 2:56