Navigation

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

    Specific sprite movement

    Beginners
    8
    27
    1328
    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.
    • vinicity
      vinicity F @LinkCraft last edited by vinicity

      @LinkCraft said in Specific sprite movement:

      Lol I’ll probably have to to something else thanks for the help though

      Could you friend share your code? It’s easier to spot the problem then...

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

        This post is deleted!
        LinkCraft 1 Reply Last reply Reply Quote 1
        • LinkCraft
          LinkCraft F @DomDom last edited by

          I made some changes to make it easer to understand but this is what I’m at so far

          It sucks to get stuck in making a game from so early on lol

          Planespeed = 10
          Pr=0
          Planeimg = loadimage(“plane”)
          
          Plane=createsprite()
          Setspriteimage(plane,planeimg)
          Setspritelocation(plane,gwidth()/2,gheight()/2)
          Setspritesvale(plane,{2,2})
          
          Loop
          Clear(skyblue)
          C=controls(0)
          
          If (atan2(c.lx,c.ly)) < pr then
          Pr-=5
          Endif
          
          If (atan2(c.lx,c.ly)) > pr then
          Pr+=5
          Endif
          
          Setspriterotation(plane,Pr)
          
          Drawsprites()
          
          Update()
          Repeat
          
          1 Reply Last reply Reply Quote 1
          • LinkCraft
            LinkCraft F last edited by

            I’m trying to make a game like Man vs. Missiles if that helps.

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

              https://www.helixsoft.nl/articles/circle/sincos.htm

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

                You’ll probably want a ’desiredAngle’, ’currentAngle’, and ’turnspeed’ variables for your plane. It shouldn’t be too crazy hard to get it turning the right way. I bet there’s a smart-ass one-line trick that programmers know, but don’t worry if you figure out a dumb long clumsy way - as long as it works :)

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

                  I don’t care if it’s 100 lines I just want it to work Lol. I’ll check that link out later today Almost all websites are blocked on my phone (thankfully not fuze arena) and my dad uses the computer for work all day so I just have to wait until he’s done. :)

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

                    This post is deleted!
                    vinicity 1 Reply Last reply Reply Quote 3
                    • LinkCraft
                      LinkCraft F last edited by LinkCraft

                      @DomDom
                      Is that working?

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

                        This post is deleted!
                        1 Reply Last reply Reply Quote 2
                        • LinkCraft
                          LinkCraft F last edited by

                          Ok perfect all give it a go thanks so much

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

                            @DomDom Could you please just explain the code a little bit, and especially the use of the dot product?

                            I know it’s something I was taught in school, but it’s all a bit hazy...

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

                              This post is deleted!
                              1 Reply Last reply Reply Quote 2
                              • vinicity
                                vinicity F last edited by

                                Thanks a lot! I have been wrestling with vectors these last few nights, and the dot product seems to actually be able to solve a few a my problems.

                                Great explanation!

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

                                  Starting to have a game come along!!! Thanks for the help :)

                                  image.jpg

                                  1 Reply Last reply Reply Quote 6
                                  • DomDom
                                    DomDom F last edited by

                                    This post is deleted!
                                    1 Reply Last reply Reply Quote 1
                                    • pianofire
                                      pianofire Fuze Team last edited by

                                      That has a very "Time Pilot" feel

                                      Jongjungbu 1 Reply Last reply Reply Quote 1
                                      • Jongjungbu
                                        Jongjungbu F @pianofire last edited by

                                        @pianofire That game hurts my hand. My high score is 137k. :P

                                        pianofire 1 Reply Last reply Reply Quote 1
                                        • pianofire
                                          pianofire Fuze Team @Jongjungbu last edited by

                                          @Jongjungbu Yeah me too. I can't remember my Hi-score but I was pretty good at it

                                          Jongjungbu 1 Reply Last reply Reply Quote 1
                                          • Jongjungbu
                                            Jongjungbu F @pianofire last edited by

                                            @pianofire I normally wouldn't remember any score. But recently I played it on an arcade cabinet one of my bros built, and I had the "local" high score for a 2 days. Haha.

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