Navigation

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

    Background layers

    Coding
    2
    14
    899
    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.
    • Dave
      Dave Fuze Team last edited by Dave

      I think I'll have to take a look at the code to help properly. Are you using a collide function like the one in the Kenney example? You could perhaps modify it to ignore specific tiles. If you want a layered effect where a series of tiles are drawn over the player, you could create a duplicate level array. This one wouldn't be checked against in the collision function and if you used a separate drawSheet() for loop to draw the tiles from the duplicate array, after the drawSheet() for the player, you'll get the layered effect.

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

        Duplicate level array sounds spot on, could I just copy the existing one in the same fashion

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

          Yep! Exactly :) Just make sure to use the updated name in the second for loop for drawing it!

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

            @Dave alt text

            Just uploaded this as a sample on the switch got my enemy's and items could to with making my character and enemy's larger tho

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

              @waldron said in Background layers:

              @Dave alt text

              Just uploaded this as a sample on the switch got my enemy's and items could to with making my character and enemy's larger tho

              Excuse my sons narration lol thinks he's a you tuber

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

                @waldron wish I could upvote that more than once. Boom! There it is. Legend! Really original creation you've got there, the animations are great, thanks for sharing!

                Can't believe how good this is!

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

                  @Dave so iv copied the array

                  level = [
                  [ 0, 0, 0, 0, 0, 0, 0 ]
                  ]
                  like so what, where would i update it lol
                  also thanks so much for helping

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

                    Make sure to name it something different, like level_foreground or something. Then, add to it any tiles you want to draw over the player, the same way you've added tiles to the original to create the platforms etc. in the positions you want.

                    Select and copy the for loop which draws the original level, then paste it after you draw the player. Update all the references to the original name with the duplicate name and Bob should, in fact, be your uncle.

                    waldron 3 Replies Last reply Reply Quote 1
                    • waldron
                      waldron F @Dave last edited by

                      @Dave il give it a blast .... just copying my code 10 times before messing haha

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

                        @Dave still not happening, i get what you mean but not working

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

                          I'm sure we'll get it working. Will take a look at the code tomorrow!

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

                            @Dave got it working;) but got game slow down but its working

                            waldron 1 Reply Last reply Reply Quote 0
                            • waldron
                              waldron F @waldron last edited by

                              @waldron said in Background layers:

                              @Dave got it working;) but got game slow down but its working

                              Nevermind increased my frame rate

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