space shooter collision detection

BlitzMax Forums/BlitzMax Beginners Area/space shooter collision detection

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

wait just wondering matty why wouldn't this be O(n^2) (i dont have the code on front of me but...)

for each bullet in the bullet tlist
for each enemy in the enemy tlist
check if the bullet and enemy are within a certain distance of each other
if so, remove both
next
next