Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Is there a camera for not just only sprites?

    Beginners
    3
    5
    442
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • alexander.s
      alexander.s last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • vinicity
        vinicity F last edited by

        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.

        1 Reply Last reply Reply Quote 1
        • vinicity
          vinicity F last edited by vinicity

          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. ;)

          1 Reply Last reply Reply Quote 1
          • alexander.s
            alexander.s last edited by

            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().

            1 Reply Last reply Reply Quote 2
            • Dave
              Dave Fuze Team last edited by

              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.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post