Is there a camera for not just only sprites?
-
Hey folks!
There's a sprite camera system when you can draw all the sprites that you want and then change the coordinates in setspritecamera() once and all of the sprites move...
But is there a similar way to move everything on a screen all at once? I mean the things like text, something drawn with commands like line, circle, etc. Is there something like a global camera for everything? -
I do not think there is, but there are ways to achieve this effect anyway. I guess an easy way to do it would be to have a variable with a location offset that you change when you want to move the camera. Then for all the drawing commands, you add this offset to the coordinates.
-
Or, you could make a large sprite and set a corresponding sprite image. Then you draw all your graphic to that image instead of the framebuffer, and finally draw the sprite in the framebuffer. It should then adhere to the sprite camera commands.
I guess that could work. No guarantees, though. ;)
-
Sigh.. yes, I can make x and y variables but x and y for line, circle, etc. and x and y for printat() are different :(
Guess I'll try using drawtext() instead of printat(). -
drawtext() gives you many more controls and access to custom fonts anyway - I'm sure it will be the best call in the long run.