User Tag List

Results 1 to 10 of 10

Thread: gravity movement question

  1. #1
    No Products Registered

    Join Date
    Jun 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    gravity movement question

    I am working on a game that requires landing a shuttle on a landing pad, but am having a bit of difficulty with the movement type I should use. What I am trying to achieve is:

    shuttle is falling towards the ground in direction 28 accelerating at +1 per second, when the player presses and holds the left key the shuttle decelerates at a rate of -1 in direction 15 till it gets to 0 speed then accelerates at +1 in direction 15 and when the player presses and holds the right key the shuttle deccelerates at a rate of -1 in direction 1 till it gets to 0 speed then accelerates at +1 in direction 1. and if no key is pressed the the shuttle accelerates at +1 in direction 28

    hope this makes sense, and any help would be greatly appreciated

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    KLiK-iT's Avatar
    Join Date
    Sep 2011
    Location
    New Jersey
    Posts
    2,852
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Best thing to do would be to post the mfa so we can look at it. There is an example of this on Marv's site, I think.

  3. #3
    No Products Registered

    Join Date
    May 2012
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    KLiK-iT is right, post your .mfa here so we can look at it...

    (I'm good at gravity-games )

  4. #4
    No Products Registered

    Join Date
    Jun 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    shuttle.zip this is the mfa, as you can see it sort or works, but the speed stops at 0 when thrusting backwards and 1 when thrusting forwards

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    KLiK-iT's Avatar
    Join Date
    Sep 2011
    Location
    New Jersey
    Posts
    2,852
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    What are trying to accomplish with this? What is the issue?

  6. #6
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Do you mean +1 pixels, +1 speed or +1 acceleration? Regardless, the best movement type is none of them. Create your own movement.

    How you ask? One step at a time. First, you need to make your ship move in direction 28 (aka 45 degrees South East). This is easy, at 1 pixel to the X and Y co-ordinates. This gets a little more difficult when you want your object to move in directions other than 0, 4, 8, 12, 16, 20, 24 or 28, for instance, direction 15. Or do you mean direction 16?, in which case you just subtract 1 from the X co-ordinate.

    I recommend you research 360 degree movement, where moving your object goes something like this:

    ALWAYS:
    Set X to: X( "Object" )+(Cos(Angle( "Object" ))*CurrentSpeed( "Object ))
    Set Y to: Y( "Object" )+(Cos(Angle( "Object" ))*CurrentSpeed( "Object ))

    For more accurate results, don't use the actual X and Y position of your object. Instead, use Alterable Values to store the X and Y position, because Alterable Values can store floating point values and the actual X and Y position can only ever be an integer. It is late and I am having difficulties articulating elementary concepts. I'll make an example...
    Attached files Attached files

  7. #7
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    BTW, I know you are not making a racing game. The example simply demonstrates how manipulate an object in 360 degrees.

  8. #8
    No Products Registered

    Join Date
    Jun 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by KLiK-iT View Post
    What are trying to accomplish with this? What is the issue?
    I dont want the shuttle to stop when it gets to speed 0 but to star accelerating backwards

    *chrisburrows, thanks for giving me the idea of creating my own movments, I will have to give that a go, see if I can figure it out

  9. #9
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    I presume you're using the built-in vector movement?
    I've never really played around with that myself, but if you want to code your own "Lander" type movement it's super easy: http://skydrive.live.com/redir?resid...094271BBDA!531

  10. #10
    No Products Registered

    Join Date
    Jun 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by MuddyMole View Post
    I presume you're using the built-in vector movement?
    No it was the space ship movement that I tryed to use

Similar Threads

  1. Fusion 2.5 Object Gravity Question
    By scottige in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 12th December 2013, 07:16 PM
  2. Custom Movement Gravity Help
    By Sp33d in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 9th July 2013, 12:57 AM
  3. Platform Movement Object, reverse gravity/jumping?
    By ratty in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 30th October 2012, 06:08 PM
  4. Pinball movement reverse gravity
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 2nd May 2011, 04:57 PM
  5. Bouncing Ball movement with simple Gravity
    By Sarah in forum File Archive
    Replies: 3
    Last Post: 16th July 2007, 01:00 PM

Posting Permissions

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