Thanks for all the responses to this
@ruccus - the world is one big object. The deal with a chuchu is it walks forward and if it hits something then it turns 90 degrees and continues working - the idea of the game is "a bit" like lemmings. But it meant only ONE intersection was ever nessiary, chuchu to the world. However, the game require hundreads of fuzzlers at once, thats when it gets heavy. Hiding unseen objects etc though is always good practice
-
I did suggest a grid collision to him but one of the main arguing points when i was telling him to go 3d (hes only done 2d uptill now and i thought it would do him some good to get his teeth stuck into some simple 3d) was saying he wouldnt have to bother with tile collision anymore XD
In the end he actually came up with a varient on my code that seems to be doing the job well, im quite proud of him!
Noting that a fuzzler (chuchu, mouse, whatever) walks in a streight line only and turns when it hits something he took my intersect code but made it cast a line the length of the level. Then he stores the distance returned into a var in his chuchu type which gives him a nice var saying how far until the next wall. he then decreases the dist var by the speed of the fuzzler every time it moves and when its < 0.0 he turns the fuzzler and then performs another intersect.
Wish I had thought of it, now only one collision check is made and only whenever the chuchu (sorry for calling them different things, HE calls them fuzzlers) turns around. On my pc running his little test program i have over 30fps with around 320 wandering around the screen so not too bad