-
Senior Member
1 vs 200 MC:
this one uses Array()
http://www.freewebz.com/savco/experiments/Masscoll.fla
http://www.freewebz.com/savco/experiments/Masscoll2.fla
plain hitTest()
http://www.freewebz.com/savco/experiments/Masscoll.swf
http://www.freewebz.com/savco/experiments/Masscoll2.swf
copy/paste
stats:
=======
800MHz, 128 Mb RAM:
1) collision with array()- 1 against 3000 :
- actuall frame rate 35-40 / movie set to 50 fps
2) collision with hitTest()- 1 against 1500
- actuall frame rate 2-3 / movie set to 50fps
400MHz, 32 Mb RAM
1) collision with array()- 1 against 1000 :
- actuall frame rate 35-40 / movie set to 50 fps
2) collision with hitTest()- 1 against 300
- actuall frame rate 2-3 / movie set to 50fps
the collision is not very tight some optimization needed.
How it works:
the scene is split in sqrs 50:50. 200MC are placed at random. _x and _y converted to sqr coordinates. 2D array wich holds sqr_number plus the names of the clips in that sqr. Collision is done only in one sqr at a time between 1-5 hitTest().
mad_sci
[Edited by Mad-Sci on 03-15-2002 at 12:39 AM]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|