Hi all!
So I have a 3D game I'm making, and I threw in a fairly standard occlusion system to hide any objects that weren't needing to be rendered, and it works pretty well I guess, but I thought I'd throw this out there to see if anyone had any ideas of how I can make it even better or more efficient?
function Occlusion()
for o = 1 to 20000
if (GetObjectExists(o) = 1)
if (GetObjectInScreen(o) = 1)
SetObjectVisible(o, 1)
else
SetObjectVisible(o, 0)
endif
endif
next
endfunction
So yeah. Pretty straightforward. Fairly sure it's not doing anything with objects behind other objects, however that doesn't REALLY matter as the game is fairly straightforward and doesn't get that advanced. I am, however, using my own 3D particle system which can bring the framerate down a little. I'm fairly sure though that the fps drop is due to me using too many different counted loops rather than condensing things down to make it simpler.
In either case I thought I'd throw this into the waters and see if any of you had any ideas on how to make it nicer or even more efficient! Thanks!