User Tag List

Results 1 to 8 of 8

Thread: Slope Detection?

  1. #1
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Nov 2007
    Posts
    456
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Slope Detection?

    So, I have a new fastloop platformer engine (I keep dropping the project and restarting, so I figured I'd start afresh rather than trying to figure out again what worked and what didn't), again based on the one in DavidN's tutorial. I'm trying to get it to support slopes, with mixed success.

    On the plus side, it will move up slopes with no problem, provided it's not too steep, which is what I wanted. But I can't work out how to get it to go down slopes properly. When the slope is too steep you just sorta bounce down it (the gravity isn't strong enough to push you down as far as you've moved horizontally, so you continually drop-and-land on the slope whilst you're moving). Short of making the gravity really powerful, which doesn't exactly seem ideal, I'm not sure how to go about this.

    Oh yeah, and when moving up slopes, the player seems to move a heck of a lot faster than when on solid ground, but I'm not sure if that's just an optical trick or not - he also seems to float slightly above it, but I paused when moving on a slope and found that to not actually be the case.

    File available here: http://www.mediafire.com/?jqjdnd2fygy
    It's not commented but everything is named pretty descriptively.

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Jaffob's Avatar
    Join Date
    May 2008
    Location
    USA
    Posts
    1,833
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Slope Detection?

    Quote Originally Posted by Raylax
    Oh yeah, and when moving up slopes, the player seems to move a heck of a lot faster than when on solid ground, but I'm not sure if that's just an optical trick or not
    Without even looking at the file, I'd say it probably is. If the player moves the same speed left/right but is also moving up, it will appear to move faster.

  3. #3
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Nov 2007
    Posts
    456
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Slope Detection?

    Yeah, that's true. I'll probably end up tweaking it so the player moves slower relative to the slope. But once I know the full slope system works :P

  4. #4
    No Products Registered

    Join Date
    Sep 2006
    Location
    Germany
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Slope Detection?

    Instead on going X+1 and Y+1 at the same time, why not go X+1 and then in the next loop you go Y+1. So it takes two loops to be at the same position while going diagonal in one loop. Does that make sense?

  5. #5
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Nov 2007
    Posts
    456
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Slope Detection?

    Quote Originally Posted by maVado
    Instead on going X+1 and Y+1 at the same time, why not go X+1 and then in the next loop you go Y+1. So it takes two loops to be at the same position while going diagonal in one loop. Does that make sense?
    Um... not really. Sorry ^^;

    But tbh that's probably because it's really late and my brain is too tired to think straight :sleep:

    Could you give an example of this?

  6. #6
    No Products Registered

    Join Date
    Sep 2006
    Location
    Germany
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Slope Detection?

    Ok give me a few minutes and I dig something up.

  7. #7
    No Products Registered

    Join Date
    Sep 2006
    Location
    Germany
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Slope Detection?

    http://www.mediafire.com/?ojnogwajyjy

    This might work, also work without loops. You just need to make sure that your slope movement for X and Y is half the X and Y value of your normal movement. e.g. normal movement will be 4 pixels to one side, slope movement should be 2x2y.

    What you could try is also to limit the time the loop is called:

    http://www.mediafire.com/?tmyyjmjdxly

    This will maybe give you an idea.

  8. #8
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Nov 2007
    Posts
    456
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Slope Detection?

    That's really not an ideal way to do it. I don't want to have to use an active for every different kind of slope, nor have to code the sloping height for each one individually. And uh, if you're just running a loop once there's no point that looping code being there at all. Thanks for trying though

Similar Threads

  1. PMO Jump through slope
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 13th May 2011, 09:52 PM
  2. Possible for Slope as a decimal?
    By Kid_Roleplay in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 28th December 2010, 02:30 AM
  3. Fast Loops and Slope Detection
    By Ausomeman in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 9th December 2010, 11:55 AM
  4. Simpliest way to do slope detection?
    By Jase in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 1st October 2010, 04:52 AM
  5. Slope Detective vol. 1
    By Mdsx in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 15th April 2010, 11: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
  •