User Tag List

Results 1 to 5 of 5

Thread: Floating Ship Example using platform objects (PMO) with MMF2.

  1. #1
    Clicker Fusion 2.5
    darkmanx_429's Avatar
    Join Date
    Jun 2010
    Posts
    365
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Floating Ship Example using platform objects (PMO) with MMF2.



    Let me see if I can explain this. I am using this code for a ship swaying effect for a level I am working on.

    I am using PMO object. I am using active player sensors with obstacle overlap to compensate for character movement with platforms on my stages.

    The problem lies is that I want my platform obstacle objects to follow and sway with the movement of my ship.

    Here's a vid of it so you can see the movement in action:

    https://www.youtube.com/watch?v=Gn9Rx3AaKVo

    What do I have to do so that I can assign obstacle platforms to be stationary and just sway with the movement of the ship? Please be specific as possible so I can learn.

    Thank you much to everyone at the Clickteam forums that help me out and got me to be pretty sweet with MMF2!

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    UltimateWalrus's Avatar
    Join Date
    Jul 2006
    Posts
    824
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your game looks cool. Unfortunately you're going to have a hell of a time getting functional platforms to move with that ship, especially since it changes angle as well as position. Multimedia Fusion is capable of amazing things but unfortunately moving platforms has never been its strong suit. (after using MMF me and my brother used to joke "but that's impossible" every time we saw moving platforms in a game)

    This a bit advanced but I can try to point you in the right direction. For the swaying, you can just set the platform angle to the ship angle, but you're going to have to calculate the platform's position relative to the ship. Take its displacement vector relative to the ship's center, and rotate this by the ship's angle. Now add this to the ship's position.

    As far as the platform movement goes: if you want it to be "rock solid" and not kludgy you'll have to be careful. When the player lands on a swaying platform, I would switch to a completely different style of movement. While movement is normally in "world space" (relative to the frame), you want to move in "local space" (relative to the platform's or ship's orientation). You could try having a ShipX and ShipY value for the player which describes its place in ship-space. Change these instead of the player's normal X and Y when he is in ship-mode. Apply a similar calculation as before to get the player to move with the ship.

    Collision detection will still be tough; if you don't have walls it will be easier. Just turn off gravity when the player touches a platform, and move their X in ship-space. If they jump or go off either end of the platform (you should make sure to store where these are in ship-space at the start of the frame), immediately deactivate this mode and go back to moving in world space. Once you hit another platform (or ladder) you go back to moving in ship-space. Make sense?

  3. #3
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform 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)Universal Windows Platform Export Module (Steam)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,132
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    I've just quickly made an example of something you could do instead of what you're trying to achieve (which will be very difficult using the PMO)

    It doesn't give quite the same gameplay mechanic.. but it could be something to make the level unique and change up the gameplay a little.

    Ship.mfa

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS 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)Universal Windows Platform Export Module (Steam)

    Join Date
    Apr 2007
    Location
    Australia
    Posts
    1,152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'll admit that made me feel a bit sea sick! haha, good job

  5. #5
    Clicker Fusion 2.5
    darkmanx_429's Avatar
    Join Date
    Jun 2010
    Posts
    365
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DaveC View Post
    I've just quickly made an example of something you could do instead of what you're trying to achieve (which will be very difficult using the PMO)

    It doesn't give quite the same gameplay mechanic.. but it could be something to make the level unique and change up the gameplay a little.

    Ship.mfa
    That's not too bad an idea of an example of a movement I could do with the platforms. Thanks for everyone's help and comments!

Similar Threads

  1. real number math (Floating points) with MMF2.5
    By Chris_D in forum Fusion 2.5
    Replies: 3
    Last Post: 31st December 2013, 09:08 PM
  2. Box 2D 2.0 and Floating Objects?
    By darkmanx_429 in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 5th November 2013, 09:14 PM
  3. Ship Sway Effect MMF2?
    By darkmanx_429 in forum Multimedia Fusion 2 - Technical Support
    Replies: 19
    Last Post: 30th December 2011, 12:42 AM
  4. Static Platform Under Floating Point Movement?
    By N64Mario in forum Multimedia Fusion 2 - Technical Support
    Replies: 13
    Last Post: 14th July 2009, 09:26 PM
  5. ship
    By Nate in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 13th February 2008, 01:12 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
  •