You are right. A loop of c_traces is actually quite slow. The only way to get a loop like this running at a good speed is by skipping over multiple pixels. But then it's not very accurate.

Well, apparently the engine knows what pixels are occupied by units, as it uses this information during the rendering phase to draw the units onscreen. Now if I were using my own engine, I would simply create an array of handles for every pixel onscreen during the rendering phase. Then all I would have to do is reference this array during my box loop to see what units occupy what pixels. No calculation required.

Obviously this isn't my engine though, so even if the engine keeps information like this I haven't a clue where or how this information is retained by the engine of if I can even access it.

Pointers, anyone?


Eats commas for breakfast.

Play Barony: Cursed Edition!