Navigation

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

    How to make my map show

    Help
    help map
    4
    6
    602
    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.
    • Soggy Games
      Soggy Games last edited by

      I don't know if I'm stupid or my game is broken but when I try to show my map on screen with the loadmap() it doesn't work. I don't know what I need to do please help me

      Dave 1 Reply Last reply Reply Quote 2
      • waldron
        waldron F last edited by

        Not stupid, drawmap() in your main loop.
        Any further problems don't hesitate to ask for help!

        Dave 1 Reply Last reply Reply Quote 1
        • Dave
          Dave Fuze Team @Soggy Games last edited by Dave

          @soggy-games Hey there - don't worry, it sounds like you're just missing the drawMap() function. Nothing broken and you're certainly not stupid!

          loadMap() just loads a map into memory. You have to use drawMap() to make it appear. Your program might look something like this:

          loadMap("map_name")
          cam_pos = {0, 0, 1} // Camera is pointing directly at the centre of the map - (0, 0) with a zoom of 1
          
          loop
              clear()
              setSpriteCamera(cam_pos)
          
              // All game logic should go here
          
              // At the end of the loop, draw things
              drawMap() // Make sure to draw the map before you draw any sprites, or the sprites won't appear!
              drawSprites()
              update()
          repeat
          

          Best of luck. Let me know if you need help with anything else!

          EDIT: Added setSpriteCamera() to the program as @Kat raises a good point.

          Soggy Games 1 Reply Last reply Reply Quote 1
          • Dave
            Dave Fuze Team @waldron last edited by

            @waldron Haha, you beat me to it!

            1 Reply Last reply Reply Quote 1
            • Kat
              Kat Fuze Team last edited by

              You may also want to check the position of the sprite camera. By default the camera will be pointing at {0, 0} which is where the blue lines intersect in the map editor, so make sure your map is centred around that point or reposition your sprite camera in the program with setSpriteCamera(). If you haven't already, definitely check out the help page for the Sprite System in the Command Reference which will be really helpful when you're working with maps and sprites :)

              1 Reply Last reply Reply Quote 3
              • Soggy Games
                Soggy Games @Dave last edited by

                @dave thanks!

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