User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: Would like help with slopes in a platform engine

  1. #1
    No Products Registered

    Join Date
    Nov 2006
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Would like help with slopes in a platform engine

    Hello,

    I'm having some trouble using slopes in a platform engine I made that is based, in part, on DavidN's platform tutorial. I've made static engines for platform games before, but I've not yet been able to have the slopes work correctly.

    As you'll see in the file, not only do the slopes work improperly, but the coding I'm using to try to get the slopes to work messes up other stuff. Sometimes when you go off a ledge, you'll be seemingly stopped in your tracks and pulled downward, rather than simply continuing your motion and falling off the ledge normally.

    Please take a look at the file. I could really use some help. The basic engine itself seems to work okay, but incorporating slopes... hard.

    Oh, another thing! You'll need to download this ini file or simply make an ini called stats.ini and store it in the same directory as the mfa file, and put this in it...

    Code:
    [user]
    speed = 20
    acceleration = 72
    deceleration = 50
    rollanim = 13
    rolldecel = 90
    jumpheight = -20
    specialanim = 12
    specialvalue = 90
    ...in order for it to work as it's supposed to. Also, you can roll by pressing down while holding left or right, and glide by holding the jump button in the air.

    Thanks!

    Neonotso
    Attached files Attached files

  2. #2
    Clicker Fusion 2.5 Developer

    Join Date
    Jan 2007
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Would like help with slopes in a platform engine

    Good luck. I made a similar request, but found no assistance.

  3. #3
    No Products Registered

    Join Date
    Nov 2006
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Would like help with slopes in a platform engi

    Oh yeah, I saw that thread. I think the problem with these sort of requests is that people usually have to figure out how mostly all of the engine works in order to figure out how to improve it. Maybe there's some way I can simplify the file so that people can focus on fixing the slops...

  4. #4
    Forum Moderator Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    Sphax's Avatar
    Join Date
    Jun 2006
    Location
    Paris, France
    Posts
    4,454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Would like help with slopes in a platform engi

    I'll look at it when I'll have the time.

  5. #5
    No Products Registered

    Join Date
    Nov 2006
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Would like help with slopes in a platform engi

    Thanks, Sphax!

  6. #6
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Would like help with slopes in a platform engi

    I added slopes to a very similar platform engine a while ago - it was done by adding two detectors, one on each side of the collider, that stretched down to one pixel above the base of the collider.

    I then added events to check whether these colliders were not touching walls when the player was, and if so, raised the collider up by a pixel.

    Actually, going down ramps was the hardest part of the process - for that I had to add an extra fastloop to check whether the player was moving down a ramp, and to correct its position smoothly rather than letting it bounce down the way like you'd normally see.

    That's a very brief overview, but it may point you in the right direction.

  7. #7
    No Products Registered

    Join Date
    Nov 2006
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Would like help with slopes in a platform engi

    Okay, thanks! That may actually help.

  8. #8
    No Products Registered

    Join Date
    Jul 2006
    Location
    Portsmouth/Bristol, UK
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Would like help with slopes in a platform engine

    The way I overcame the problem of slopes was in the fastloop that moved the player horizontally, if the layer hit an obstacle, it would move them up a pixel, if they were still over an obstacle, move them down and back. for downslopes, if the floor detector lost contact with the floor moving horizontally, it (and the player) would be moved down a pixel, if they were still not touching the floor move them back up (as the gravity code would deal with vertical movements)

    I realise this is a mess to read, but the version i made is on a broken computer. But i may upload it when i've repaired it as i'm quite proud of it, both the player and all badguys are governed by the platform movement ^_^

    goodluck with that.

  9. #9
    No Products Registered

    Join Date
    Nov 2006
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Would like help with slopes in a platform engi

    That sounds like a pretty good method, Pixalatio. I might try that. Sounds easy to implement as well. Thanks!

    EDIT: The up slopes are working (for the most part)! Now, I've just got to get the down slopes working.

  10. #10
    No Products Registered

    Join Date
    Jul 2006
    Location
    Portsmouth/Bristol, UK
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Would like help with slopes in a platform engi

    Aye, I thought so when i came up with it.. Though actually getting it to work the first time was a bit of a brain bender.. but it wasn't too bad.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Problem with animation on slopes and HTML5 runtime, platform engine - Please help
    By faber in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 12th December 2013, 10:05 PM
  2. Slopes in Custom Platform Movement
    By xIronGolemx in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 15th July 2013, 05:03 PM
  3. Fastloop platform engine and slopes
    By ELCGames in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 16th December 2010, 03:06 AM
  4. Platform game Help: Jump through platform slopes
    By Atherton in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 10th December 2009, 04:15 AM
  5. Slopes in Custom Platform Movement
    By Bugsey in forum The Games Factory 2 - Technical Support
    Replies: 3
    Last Post: 16th January 2008, 08: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
  •