User Tag List

Results 1 to 2 of 2

Thread: some help on circular player movement

  1. #1
    mrmonkey
    Guest

    some help on circular player movement

    H All,

    I have a problem. I have a planet which is completely circular and I have a player who has to be able to run around this planet. When they jump they are to be pulled down to the surface of the planet. so essentially its a platform game but running around completely circular planets.

    any idea of how i would do this within mmf as going in and coding up the trig for it seems like a nightmare of epic proportions.

    thanks greatly for any help.

    just to recap.


    player moves around the planet's circumference using the left/right arrows
    pressing jump sends the player along the normalised (?) angle to the planet's surface
    upon reaching the maximum jump hight the player drops back towards the planet surface.

  2. #2
    No Products Registered

    Join Date
    May 2010
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: some help on circular player movement

    You could do something like this:
    Always
    -set X position to X("planet")+(Cos(rotationValue("player")))*distanc eValue("player")
    -set Y position to Y("planet")+(Sin(rotationValue("player")))*distanc eValue("player")

    where rotationValue can be edited to make yor player move, use an alterable value or a counter, and distanceValue is the number of pixels away from the center of the planet.

    when player holds right
    -add one to rotationValue
    when player holds left
    -sub one from rotationValue

    For moving:
    rotationValue<0
    -set rotationValue to 360
    rotationValue>360
    -set rotationValue to 0

    I´m no good at custom platform movements but a basic idea for jumping(should work with pretty much any custom jump, a more dynamic one would be much better..):

    start of frame (or whatever)
    -set surfaceValue to a number(equal of pixels from center of planet to surface)
    distanceValue < surfaceValue
    -set distanceValue to value of surfaceValue
    -set flag1 off

    player press jump and flag1 is off
    -set flag1 on
    -set jumpValue to 100 (or someThing)

    jumpValue > 0 and flag1 is on
    -sub 1 from jumpValue
    -add 1 to distanceValue

    jumpValue = 0 and flag1 is on
    -sub 1 from distanceValue

Similar Threads

  1. player move in a circular motion? Like Gyruss
    By Benster in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 22nd January 2015, 09:22 PM
  2. help circular movement
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 1st June 2011, 10:46 PM
  3. Circular movement
    By pikzilla in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 24th May 2009, 08:09 PM
  4. Movement Problems (Circular Movement and Crashing)
    By Maverick in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 16th October 2006, 09:24 PM
  5. Circular Movement with Platform Movement Extension
    By MechatheSlag in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 8th October 2006, 10:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •