User Tag List

Results 1 to 5 of 5

Thread: Platformer help

  1. #1
    No Products Registered

    Join Date
    Oct 2007
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Platformer help

    I am making a platformer and i would like it if when the person is on a hill or other slanted object he rotates to fit the slope of the hill. I have been trying withiut success for some time. Can anyone help me?

  2. #2
    Clicker Fusion 2.5
    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)
    JimJam's Avatar
    Join Date
    Jun 2006
    Location
    USA
    Posts
    349
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Platformer help

    Here you go. This is an example of Sprite rotation on the terrain. It uses the built in Platform Movement to do all of the moving. Both the Checker and the Collsion box have the same movement type and speed. Then it uses the ATan2 formula to find the angle between the two objects.

    This is just an example. There is a much better way to do this by using a Static Movement engine. But hey, I'm gonna do the whole engine for you! But here is how you could do it yourself:

    Set the Slope checkers position in front of the Collision Box, then if its overlapping the Back drop, use a fastloop to push the object out. Then use the Atan2 formula to check its angle.

    This requires some knowledge of how fastloops work, and also how MMF2 handles background overlaps and collisions, and can be tricky to get right on the first try. But you should have the idea of it all in just a week or so of tinkering.

    The key is understanding the fundamentals.
    A good resource on platforming movements and basics can be found here:

    http://www.sonicfangameshq.com/index.html

    Even if you aren't a Sonic Fan, the tutorials section is packed with years full of knowledge and evolution in the MMF and TGF products.
    Attached files Attached files

  3. #3
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Stephen's Avatar
    Join Date
    Aug 2008
    Location
    Montana
    Posts
    4,515
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Platformer help

    Quote Originally Posted by JimJam
    But hey, I'm gonna do the whole engine for you!
    I'll take one.

    stephen1980
    _____________________________________________
    Nivram's Examples -Need extensions? Send me a PM.-


  4. #4
    No Products Registered

    Join Date
    Oct 2007
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Platformer help

    thx that is really helpfull I have been trying for so lon to figure it out and now it seems so obvious

  5. #5
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Aug 2006
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Platformer help

    Thanks for the example and link JimJam. I found in your example though that when you jump a lot and go back and forward a lot it will flip the rotation of the player the wrong way.

Similar Threads

  1. Old Platformer Graphics?
    By XStar in forum Paid Design & Development Requests
    Replies: 23
    Last Post: 7th December 2012, 12:21 PM
  2. platformer
    By SamG in forum File Archive
    Replies: 4
    Last Post: 18th August 2008, 12:57 AM
  3. My first platformer
    By Z_Blade in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 29th June 2008, 11:18 AM
  4. help with platformer
    By bunnyonion in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 23rd June 2008, 10:50 PM
  5. 3D Platformer help
    By Karasu in forum The Games Factory 2 - Technical Support
    Replies: 1
    Last Post: 25th July 2007, 02:13 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
  •