issue with linked list
Posted: Mon Jun 13, 2005 1:20 pm
So I've created 5000 or so 16x16 objects on the screen and now want to see if a simple collision detection can be performed without impairing performance too much.
The piece of code below doesn't work for more or less obvious reasons. How can a collision detection be performed against members of the same linked list?
ResetList(Bacter())
While NextElement(Bacter())
ResetList(Bacter())
While NextElement(Bacter())
If SpriteCollision(Bacter()\Image, Bacter()\x, Bacter()\y, Bacter()\Image, Bacter()\x, Bacter()\y)
routines go here
EndIf
Wend
Wend
The piece of code below doesn't work for more or less obvious reasons. How can a collision detection be performed against members of the same linked list?
ResetList(Bacter())
While NextElement(Bacter())
ResetList(Bacter())
While NextElement(Bacter())
If SpriteCollision(Bacter()\Image, Bacter()\x, Bacter()\y, Bacter()\Image, Bacter()\x, Bacter()\y)
routines go here
EndIf
Wend
Wend