So currentlyCurrently, I have this in each object's renderer's update method:
float a = transform.position.x * Main.scale; float b = transform.position.y * Main.scale; float c = Camera.main.transform.position.x * Main.scale; float d = Camera.main.transform.position.y * Main.scale; onscreen = a + width - c > 0 && a - c < GameView.width && b + height - d > 0 && b - d < GameView.height; transform.position is a 2D vector containing the game engine's definition of where the object is - this. This is then multiplied by Main.scale to translate that coordinate into actual screen space Similarly.
Similarly, Camera.main.transform.position is the in-engine representation of where the main camera is, and this is also multiplied by MainMain.scale.scale
The problem is, as my game is tile-based, thousands of these updates get called every frame, just to determine whether or not each object should be drawn - how. How can I improvedo this more efficiently, please?