Navigation

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

    controlling sprites x and y

    Beginners
    2
    6
    234
    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.
    • waldron
      waldron F last edited by

      revamping blind fury new title screen no frogs,
      in blind fury i have a sprite that blinks and moves in front of the player, how can i get it to move then go up and down.
      so program it to move along a set pattern ?

      1 Reply Last reply Reply Quote 1
      • SwitchedOn
        SwitchedOn last edited by

        sounds like what I was looking into for my hex games shmup section (to move aliens) but I couldn't work it out.

        Anyways - I think if so, the answer is "Beziers" which plots points along a line. Check out @Jonboy side scrolling shmup demo program where he explains the concept in the comments.

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

          @SwitchedOn cheers i think its -= dir and += dir with x, y but i cant figure out the in between parts

          SwitchedOn 1 Reply Last reply Reply Quote 1
          • SwitchedOn
            SwitchedOn @waldron last edited by

            @waldron

            @SwitchedOn said in controlling sprites x and y:

            sounds like what I was looking into for my hex games shmup section (to move aliens) but I couldn't work it out.

            Anyways - I think if so, the answer is "Beziers" which plots points along a line. Check out @Jonboy side scrolling shmup demo program where he explains the concept in the comments.

            Yep, that's about where I abandoned it lol

            1 Reply Last reply Reply Quote 1
            • SwitchedOn
              SwitchedOn last edited by

              What I ended up doing - though didn't get it working 100% - is to give each of my aliens a 'starting' X & Y and obviously a current X & Y.

              If the alien moved a set distance from their starting X, then I'd flip the Y axis, so they moved down. Then from there, if they went a certain distance down in the Y from their starting Y, flipped the Y again so they went up.

              Carried on like this, made them rise and fall.

              But not sure if that's any good for applying to your problem @waldron

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

                @SwitchedOn yes thats what im after pretty much, its only to control one sprite

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