Hey Guys. I found a while ago a thread where someone gave the formula for looping through a 3D Array with a single fastloop. Kinda like the loopindex("loop") mod array width for X and loopindex("loop") / array width for Y with 2D arrays, but with a Z dimension as well. The good old recursive fastloops is just too slow for my levels.
I can't for the life of me remember where it was though. Anyone know the formula and would care to share?
Cheers!
There are 10 types of people in the world: Those who understand binary and those who don't.
I wouldn't count on it giving a huge boost in performance, but it's worth a try - I mostly just prefer this method because the code ends up much cleaner and simpler than if you use nested loops.
Thanks Sketchy! Won't it be a bit faster than nested fastloops because MMF will only trigger one (albeit larger) fastloop, rather than 3 separate ones.
There are 10 types of people in the world: Those who understand binary and those who don't.