Go Back   CodingForums.com > :: Client side development > Flash & ActionScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-16-2008, 06:05 AM   PM User | #1
thesmart1
Regular Coder

 
thesmart1's Avatar
 
Join Date: Dec 2005
Posts: 369
Thanks: 7
Thanked 3 Times in 3 Posts
thesmart1 is an unknown quantity at this point
Best Method of Mass Collision Checking

I'm making a platform game with multiple levels, each in its own frame. I'm adding several objects, like a solid ground, moving blocks, solid walls, and blocks that the character falls through. The objects in each levels will be different, and there will be too many objects to perform hitTests on each instance. I was also considering looping through an array that would contain instance names of all objects in a level, but that would probably lag too much (and it would be a lot of work).

So what would be a simple, fast method to check collisions with a large amount of objects?

EDIT: I've tried placing multiple objects with the same instance name and hitTesting the instance name and a moving movie clip, but it only works on the first named instance. I could put all the objects of a level in a single movie clip and do hitTests with a shapeFlag on that. Would that be the best method, or is there a better way to do this?

Last edited by thesmart1; 03-17-2008 at 04:28 AM..
thesmart1 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:20 PM.


Advertisement
Log in to turn off these ads.