Hi all, up to now I've been able to find a solution to most of my
problems in other peoples posts, but unfortunately on this occasion my
problem has dumbfounded me for too long.

I'm looking to create a 3D asteroids style game where everything moves
in the Z axis towards the players avatar, which can avoid them by
moving around its X and Y axis.

My issue is that there are potentially going to be around 10 - 15
debris on the screen at anyone time, and I had intended to create them
using a function that adds the asteroid child as a local variable,
allowing for a single function to spawn all of the debris using one
archetype debris. This means that each piece of debris will not have a
unique name. Couple that with the use of projectiles that are created
in a similar fashion, and I have hit a brick wall as to how to detect
collisions between the none unique objects and allow the projectiles
to destroy the debris.

I was thinking that I could create the debris in a local variable and
then add it to an array or possibly to one of 4 arrays depending on
what section of the screen it was spawning in, allowing for localised
collision detection, and do the same for the lasers. I've yet to see
if this would work though, and before starting it I wanted to ask the
experts whether or not they had any better ideas.

Thanks in advance

-Liam

Reply via email to