Doing a distance check on every object in the scene is going to kill your frame rate. If you split the scene into a grid then make an array that stores the grid section each object is located in...
remstart
=== Scene Grid ===
0,0 1,0 2,0 3,0
0,1 1,1 2,1 3,1
0,2 1,2 2,2 3,2
0,3 1,3 2,3 3,3
remend
dim objsect([number of objects])
Then you can check which section the object is in and if it's close enough to the camera, draw it. This eliminates the maths used in calculating distances, but there is a quicker way I can think of but wastes a bit of memory: If we make the array based on the sections instead of the objects we can simply check the sections closest to the camera for objects to draw, the memory wastage is because arrays are not dynamic in DB, so we'd have to make each section capable of storing all objects at once. If n is the number of objects and m is the number of sections we'd need n*m array entities, and out of that (n-1)*m would be unused!