User Tag List

Results 1 to 6 of 6

Thread: I'm stumped with a custom movement...

  1. #1
    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)

    I'm stumped with a custom movement...

    Hi Guys, I'm a bit stumped here. I've tried to duplicate the airplane movement in this game for another type game I'm trying to build for over a week now. I just can't seem to get it right! Would anyone have any idea how the movement of the plane is done? Am I thinking into this to much? Is it more simple as it seems? An example would be great.
    http://www.mochimedia.com/games/play/fly-on-flying
    Thank you,

    John

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    tompa's Avatar
    Join Date
    Nov 2011
    Location
    Uppsala, Sweden
    Posts
    358
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One solution is to start with a constant declining angle. Lets say every 100ms (I'd use the old timer delta but it's up to you). When the player hits a button the added angle should be more than the declining. That's at least a linear direction delta that might be enough for your purposes. I have an example but in this case that dynamic is a whole game so I cant share it. However I'd be willing to help out if you are or get stuck on something.

  3. #3
    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)
    Quote Originally Posted by tompa View Post
    One solution is to start with a constant declining angle. Lets say every 100ms (I'd use the old timer delta but it's up to you). When the player hits a button the added angle should be more than the declining. That's at least a linear direction delta that might be enough for your purposes. I have an example but in this case that dynamic is a whole game so I cant share it. However I'd be willing to help out if you are or get stuck on something.
    I'm really not getting what you're saying. Would it be to much trouble to make a simple example of this type movement? The angle of the plane is one issue and how is the speed set to increase and decrease as the mouse is pressed or released? It's a really nice custom movement going on in that game and very smooth. Any help would be appreciated!!

  4. #4
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    It's really very, very simple...

    + Repeat while mouse button is down
    -> Plane: Subtract ClimbRate from YVelocity

    + Always
    -> Plane: Add Gravity to YVelocity
    -> Plane: Add YVelocity to YPos
    -> Plane: Set Y position to YPos
    -> Plane: Set angle to ATan2(0-YVelocity( "Plane" ), XVelocity( "Plane" ))
    -> CoinsEtc: Set X position to X("CoinsEtc") - XVelocity("Plane")

    eg. http://sdrv.ms/11NCyVr

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    tompa's Avatar
    Join Date
    Nov 2011
    Location
    Uppsala, Sweden
    Posts
    358
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    pardon my mediocre explanation KLiK-iT. Plane angle would simply be added upon mouse click. If you'd like acceleration, deceleration and air resistance that's part of your custom movement. Sadly that does take some time to do right. In this case you might be better off doing a plausible plane movement first and then go on making more features later.

    I think muddys example is good. If you need a simple screen centered solution that is the way to go.

  6. #6
    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)
    Quote Originally Posted by MuddyMole View Post
    It's really very, very simple...

    + Repeat while mouse button is down
    -> Plane: Subtract ClimbRate from YVelocity

    + Always
    -> Plane: Add Gravity to YVelocity
    -> Plane: Add YVelocity to YPos
    -> Plane: Set Y position to YPos
    -> Plane: Set angle to ATan2(0-YVelocity( "Plane" ), XVelocity( "Plane" ))
    -> CoinsEtc: Set X position to X("CoinsEtc") - XVelocity("Plane")

    eg. http://sdrv.ms/11NCyVr
    Wow MuddyMole, Thank you very much for the example as this will work. I will study it and learn something from this. It's perfect! Learn something new every day. Thanks again to both of you!

Similar Threads

  1. Stumped...
    By Earl in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 18th July 2012, 06:08 AM
  2. Stumped with INI
    By camelman in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 8th September 2008, 09:27 PM
  3. Help! I'm stumped!
    By musteval in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 8th September 2008, 01:39 AM
  4. Custom Movement problem (Horizontal movement)
    By KiteRyagara in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 7th June 2008, 03:40 PM
  5. Custom Movement
    By Rabagast in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 5th February 2008, 12:45 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
  •