Collisions and types

Blitz3D Forums/Blitz3D Programming/Collisions and types

slenkar(Posted 2003) [#1]
When I do my collision detection I have to do a nested FOR loop which means it is a loop of 10,000 comparisons when I only have 200 entities on the screen at a time.

If I put each characteristic of each entity into seperate arrays I can directly access them without the need for nested loops.

I am about to start rewriting the whole program.

Has anyone else experienced this?


Beaker(Posted 2003) [#2]
You might find this useful:
http://www.blitzbasic.com/codearcs/codearcs.php?code=216

You can then instantly get the Type object from the collided Entity.


slenkar(Posted 2003) [#3]
ah yeh thanks for the tip


TartanTangerine (was Indiepath)(Posted 2003) [#4]
Yeah great bit of code that.