Hi, Im making a tile based game. In my game I hava a camera class which encapsulates a Rectangle2D that represents where the screen is in world co-ordinates. I am confused about how to use a Graphics2D’s clipping mechanisms.
should I:
a) set the Graphics2D to clip the camera then draw the scene using world space co-ordinates
or
b) set the Graphics2D to clip the screen and translate the sprites and tiles to screen space using the camera information
also
a) by setting the clip can I draw everything in the scene because it automaticly dosn’t try to render offscreen data
or
b) do I find sprites and tiles that that are contained or that intersect the camera.
thank you for your help