Navigation

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

    Another new wip Ninja Run

    Work In Progress
    9
    25
    1471
    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 @waldron last edited by

      @waldron Well you certainly do capture some of that magic here without a doubt.

      In terms of the old button states - is there anything I can help with? Any particular troubles?

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

        @Dave i think my main issue was getting the dagger throw numbers working iv ended up doing (daggernum -= 0.3) instead of (daggernum -=1) because when you press the button to trigger it the number shoots down. hence my dodgy workaround.

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

          @waldron I think this will help. I use this in every single one of my programs, whether or not I even plan to use it right away, because it always ends up being useful.

          I see examples of people using their own structures to store the old button states - this is unnecessary, you simply need to store the whole controls struct.

          Start with these two as global variables:

          c = controls(0)
          oldc = c
          

          Then in your main loop:

          loop
              clear()
              c = controls(0) // read the new state of the controls and store it into the c variable before you do any control checking
          
              // game stuff    
          
              oldc = c   // right before you end your loop, store the state of the controls for that frame into the oldc variable
              update()
          repeat
          

          With this set up, you can just do this:

          if c.a and !oldc.a then
              // throw dagger
              daggernum -= 1
          endif
          

          The if statement reads: If the A button is pressed, AND it was NOT being pressed on the previous frame, then...

          This means your daggernum variable will only ever decrease by 1 per A button press.

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

            @Dave iv tried that i may have some code in the wrong place or something upsetting it maybe or possibly dodgy controller il retest later and see what happens i even tried a false true switch so could be a dodgy button fortunately i do have some new ones ordered

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

              @waldron The important part is to make sure that you abide by that structure:

              loop
                   c = controls(0)
                   
                   // any and all controller checking MUST be between these two lines.
              
                   oldc = c
              repeat
              

              Feel free to share the program with me privately if you have trouble figuring out the problem.

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

                @Dave yeah i think i haven't put the code in the correct place after rereading through the message :) i should be able to solve it, iv been using a different method for my last couple of projects which has probably tripped me up thanks man

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

                  @waldron No worries dude. Always here for help if you need!

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


                    A few more bits added plus a health bar which iv set up with a hitcount variable so i can have better control of health damage amounts and speed. e.g. Giant boulder = instant 1 life, big knock back effect. Spikes = slow drain of life, minor knock back effects.

                    1 Reply Last reply Reply Quote 5
                    • Jonboy
                      Jonboy Fuze Team last edited by

                      This is looking (ha, and sounding!) really good.

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

                        @Jonboy ha yeah if link can get away with it rolling across hyrule field why not :)

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

                          Been a while since i'v updated on the forum for this game
                          Started adding enemies only adding one type as i'm wanting to flesh out the levels with traps and obstacles.
                          so far the enemy only has an idle state and can be killed with sword or dagger but will be adding to it with invisible boxes one to detect the player which will trigger an attack counter and another to detect its map surroundings hopefully ;) one thing i'v learnt during my coding journey ... your constantly learning

                          1 Reply Last reply Reply Quote 9
                          • Jonboy
                            Jonboy Fuze Team last edited by

                            Your skillz know no bounds!

                            1 Reply Last reply Reply Quote 2
                            • R
                              romain337 last edited by pianofire

                              Hello,
                              This look good :)

                              I wanted to share this bit of code with one of my game but I have no time to do it and need to work more on it before release.
                              It's a function to print bitmap font. You may already have one that do it but if it can save some times or give some ideas to you or other people it will be worth it:
                              I will modify it in my code so it will use sprites and drawSprite instead but this one may work for you as it

                              // Load BM font texture
                              var BM_FONT_IMG = loadImage("The Oliver Twins/DizzyFont6")
                              
                              // print definition
                              function printText(fontHandle, x, y, text)
                                var xOffset = 0
                                for i = 0 to len(text) loop
                                  var chrValue = chrVal(text[i]) - 32
                                  drawSheet(fontHandle, chrValue, xOffset, y, 1.0)
                                  xOffset += tileSize(fontHandle, chrValue).x
                                repeat
                              return void
                              
                              // usage
                              loop
                                clear()
                                printText(BM_FONT_IMG, 32, 32, "Hello World!")
                                update()
                              repeat
                              

                              If it help at least 1 user I will be super happy.

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

                                @romain337 thanks, i was using a similar function for custom font but since swapped it for another due to random string errors.
                                i'l try this out thankyou :) i would suggest putting this function into a program and share it as it would help many users!

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

                                  @romain337 Well prepare to smile because this helped me with a future project. Thanks for sharing!

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

                                    Just shared Ninja and the 4 stones.
                                    Code YNK73MND5U
                                    playable level 1 and level 1 boss
                                    loads into level 2 for now.
                                    This is a rewrite.

                                    1 Reply Last reply Reply Quote 5
                                    • Skullo
                                      Skullo last edited by Skullo

                                      The game is awesome and I encourage everyone to play it!

                                      Below is my first experience:

                                      • I get stucked in level 1 boss (maybe I need some more practice).
                                      • I found the wall jump system a bit tricky.
                                      • Sometimes after falling, the ninja revives in the same place falling again and therefore losing all my hearths.
                                      • I love the enemy animations!!
                                      waldron 1 Reply Last reply Reply Quote 2
                                      • waldron
                                        waldron F @Skullo last edited by

                                        @skullo thanks for playing,
                                        I made a respawn point which triggers when the player jumps so if you fall down your respawn at that point. I could assign respawn points for each pit ??
                                        The wall jumps only work from left right jumps vise versa.
                                        The boss is hard ☺️ it's speed ramps up when it's life is below 6, keep moving use daggers and sword hits and try to learn the pattern also magic wind makes you immune to damage.
                                        Started work on the second level and boss more to come :).

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

                                          Only other way I could deal with pit respawns is have a temporary block beneath the player I may test it.

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

                                            Awesome game. So many great little touches! Love the intro too!

                                            I agree that the wall jump doesn’t feel quite “right”. Luckily you can use the wind magic to scale stuff instead!

                                            I also had the issues with the respawn points, and I often instinctively shot a grapple hook as I was tumbling down into the abyss which caused some additional glitches.

                                            A personal preference would be if there was an option to rebind the joy con keys? I’m not used to having the jump button as it is here…

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