Hey all. So, I've got a completely unruly routine gauging objects' placement. It has been the most maddening thing, and the wonkiness and complexity of it is still yielding edge cases I can't account for. So I'm trying to dramatically simplify so at the very least, anomalies will be easier to find.
Essentially, right now I have a 32 column area. I have a 16 bit camera position, which I can compare to an object's 16 bit position to know whether or not to give the object a draw status. This generally works, but I get the occasional edge case where the draw state flips on when the object should be firmly in the opposite nametable (one less in the high byte tan the camera position).
I also attempted to trying things with turning an object's position into a value out of 32, for a direct comparison with the camera's column. After a lot of edge case scenarios, this gave me similar unexpected false writes.
What methods do you guys use for things like this? How would you keep objects within a camera view? The 16bit idea above would be the most logical, wouldn't it?
Essentially, right now I have a 32 column area. I have a 16 bit camera position, which I can compare to an object's 16 bit position to know whether or not to give the object a draw status. This generally works, but I get the occasional edge case where the draw state flips on when the object should be firmly in the opposite nametable (one less in the high byte tan the camera position).
I also attempted to trying things with turning an object's position into a value out of 32, for a direct comparison with the camera's column. After a lot of edge case scenarios, this gave me similar unexpected false writes.
What methods do you guys use for things like this? How would you keep objects within a camera view? The 16bit idea above would be the most logical, wouldn't it?