The camera problem has been bugging me, so I’m going to attack it. I figure that the engine should collect the buckets that the camera can see, render those to the texture, and skip checking the camera bounds/refreshing the bucket list (lol) if the camera hasn’t moved. This could lead to an interesting implementation where there are multiple windows rendering multiple parts of the world (security cameras?). Something to think about, at least.
Setting this part of the program up will help develop some things: adding and removing buckets and their contents from the render pool; making the render pool a dynamic array instead of a horrific linked list (allowing subtraction); checking for camera motion; checking for updates to the buckets themselves. By the looks of it, I’ll have to add the ‘hot’ attribute to buckets to know whether I’ll need to update the render pool to reflect the buckets’ contents. The entities within will be referred to by their pointers, so the values could change without hurting anything; when entities shift between buckets, though, the bucket entries would need to be updated. How would we get around the issue of updating the render pool for all buckets when one bucket changes? Hmm. Something to think about.