I've made a lot of progress on a game, thanks to the help of many people in this forum. Many of the mechanics are in place, but I'm now grappling with world coordinates, screen coordinates and object coordinates.
I've read a few threads on this, and I know the theory to employ, but I'm stumped on something.
If an object's world coordinates are outside of the screen coordinates, then it shouldn't be drawn. However, moving objects still need to have their coordinates updated, and this is done in the SpriteAnimator, by modifying the DestRect for each object, and it seems that all objects are always drawn, even if they are off the screen.
How does one go about updating the positions and velocities, without wasting time to draw the object's sprite?
-Sterling
I've read a few threads on this, and I know the theory to employ, but I'm stumped on something.
If an object's world coordinates are outside of the screen coordinates, then it shouldn't be drawn. However, moving objects still need to have their coordinates updated, and this is done in the SpriteAnimator, by modifying the DestRect for each object, and it seems that all objects are always drawn, even if they are off the screen.
How does one go about updating the positions and velocities, without wasting time to draw the object's sprite?
-Sterling