TYPO!
GCLIP not Graphical lips... 😧
DEF CULL(X#,Y#,Z#)'other 5 variables are global so no need to require them 'X#,Y#, AND Z# is the position of an object 'X,Y,Z are cam coords 'RX,RY are camera rotation(RZ is not important) RETURN ABS(DEG(ATAN(Z#-Z,Y#-Y)))-CX<45&&ABS(DEG(ATAN(Z#-Z,Y#-Y)))-CY<20&&SQR(POW(X#-X,2)+POW(Y#-Y,2)+POW(Z#-Z,2))<100 'check if it is visible on X axis, check if visible in Y axis, check if near enough ENDI have another Idea for culling, but I need to actually write it.
Further optimization
This will help out:GCLIP 1,0,0,400,240 'Don't draw off - screen SPCLIP 0,0,400,240