User Tag List

Results 1 to 3 of 3

Thread: How many steps does it take?

  1. #1
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How many steps does it take?

    Hi
    I Have a Ball Object wich is affected by Gravity ( and only Gravity ).
    What i want is to find an expression wich will tell me the number of steps it takes ( how many times Gravity_ has to be applied ) before the Ball reaches the bottom of the Screen ( Y = 480 ).

    ...
    FOR CONSTANT GRAVITY, THIS IS EASY
    'Distance from Bottom Of Screen'/ Gravity_ = Number of steps.

    EXAMPLE
    Ball Ypos = 473
    Gravity = 2

    7/ 2 = 3,5

    This example is not very complicated, and we can easily tell that this method is accurate and correct ( 473 + ( 2 * 3.5 ) = 480 ).

    ...
    FOR NON CONSTANT GRAVITY, NOT SO MUCH
    This is how Gravity works in my case ( im guessing its exponential? ):

    - Every Frame
    --> Add 1 to Gravity_
    --> Ball set Ypos to Ball Ypos + Gravity_

    How can i make an expression wich will let me know the number of steps it takes before the Ball reaches the bottom of the Screen ( Y = 480 ) in this case?

  2. #2
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Posts
    1,305
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    You're probably going to confuse a lot of people by using the wrong terms. When you say "gravity" you're actually talking about velocity. The "1" that you add to velocity each frame is acceleration due to gravity.

    If the ball has an initial velocity of zero:
    T = Ceil((Sqr((8*Y)+1)-1)/2)

    If the ball's initial velocity > 0, then you should have said that in the first place - and you're out of luck anyway :P

  3. #3
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you very much MuddyMole!
    The equation works with perfect decimal precision ( when removing Ceil ) when i put it intoo MMF2!

    However if i change the GravityForce ( the constant force that accelerates Yvelocity ) from 1 to any other number, the system breaks. I have tried inserting the Acceleration Force in different ways in the equation without luck.

    ...
    Im sorry for any confusion i may have caused, and if i could edit the post i would.
    Ill be sure not to repeat the misstake.

    ...
    Ive been askin a series of these Equation Prediction Questions ( here on the Forum ) as part questions to a main problem, in hope that i will be able to understan how it all fits together. I do learn bits and pieces here and there, but its generally giving me a hard time.
    I really hate to ask these kinds of questions, since i hate to depend on someone else and have others 'do my work for me'.
    I really wish i were able to set up and understand these equations by myself, but i dont even know where to beginn.

Similar Threads

  1. All Steps Required to Port an MMF2 Game to OUYA
    By redpandagames in forum Android Export Module Version 2.0
    Replies: 4
    Last Post: 28th September 2013, 05:58 PM
  2. First steps in Movement development
    By K1kk0z90 in forum Extension Development
    Replies: 8
    Last Post: 16th March 2012, 07:21 AM
  3. first steps
    By willow in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 25th October 2009, 01:38 PM
  4. First Steps - What am I doing wrong?
    By Faller in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 3rd June 2008, 02:43 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
  •