User Tag List

Results 1 to 6 of 6

Thread: Walljump

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export Module

    Join Date
    Dec 2012
    Location
    Copenhagen, Denmark
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Walljump

    I'm curious to know about an efficient way to make a walljump. So far, when the player detectors (placed on the right and left side of the player) are in contact with a wall, and the floor detection is not in contact with anything (ie. the player is in the air), the player can press jump and it'll move him a couple of pixels away from the wall, and up depending on how long the player holds down the jump button.

    This works quite well, as the player can control the player direction mid-air, but this also made a couple of problems. The first problem, was that the player could continually press jump while holding the direction button in the same direction as the wall was, enabling him to just basically slide up the wall without having to "launch" himself away from the wall. The ideal movement I'm looking for is one resembling "Super Meat Boy", where you will be forcibly launched away from the wall, but to a lesser extent if you hold the directional button down towards the wall you sat on.

    Some extra information: I use a custom made platforming engine, using gravity, horizontal movement modifiers and jumpcounts, so built-in platformer object tips wouldn't really work for me - I'm also not really a fan of the path-movement object, as I've had some dodgy experiences with it.

    I was considering disabling some keys for a small time-frame when the player performed a wall-jump, but I'm sure that is not a great solution to the problem.

    That's basically my first question, I'll get to my second problem once I solve this.

    Thank you in advance, I know this community is very helpful and I believe this is quite solvable, but after many hours I've just come to a halt. Let me know if you need to see code.

  2. #2
    Clicker Fusion 2.5Android Export ModuleSWF Export Module
    EE's Avatar
    Join Date
    Sep 2009
    Posts
    194
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Yeah that's a tricky beach to do elegantly. In my engine I add a push to the acceleration(which rapidly diminishes) away from the wall stronger than the player's own max.acc. This makes it so that if not holding any direction when jumping off the player will launch away from the wall in a somewhat 'natural' way. If you instead hold either toward or away from the wall you get a wall 'bounce effect' or a long jump respectively. Though everything depends on how your engine's momentum handling is set up.

  3. #3
    Clickteam Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleInstall Creator Pro
    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)
    BartekB's Avatar
    Join Date
    Aug 2013
    Posts
    622
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    In my game, I created a wall jump. I simply did:
    Coliding Backdrop(left) AND ButtonPressed("Space") >THEN> add (Xvelocity(player)*-1.3) to Xvelocity
    When in contact of the wall (right) AND Pressed Space >THEN> add (Xvelocity(player)*-1.3) to Xvelocity //This makes the player speed up the other direction when bounced off the wall
    But to make a good wall jump you have to get enough speed, and after the wall jump you have to press the different direction arrow too.
    - BartekB, a.k.a Uppernate
    Join the Click Converse Discord! - https://discord.gg/7RNXFrC
    Dungeon Raiders! - Link soon™

  4. #4
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,716
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)

    Wall Jump by SEELE

    Here you go:

    Marv
    Attached files Attached files
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export Module

    Join Date
    Dec 2012
    Location
    Copenhagen, Denmark
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for your fast replies.

    As mentioned I don't use the platformer movement object as I'd feel too 'locked' on what I would be able to do, it's a nice example though. If I was using the platformer object I'd definitely use some of that, so thanks!

    While I've not completed fixed it, now the player does jump away from the wall in a nice-looking fashion. I decided to do a fastloop using a horizontal movement variable (which I use for basic movement as well)
    X( "Player" )-(Horiz( "Player" )/Abs(Horiz( "Player" )))

    The player can still hold down the direction towards the wall and jump, and quickly rise to the top, but it doesn't look as ridiculous as it did before.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export Module

    Join Date
    Dec 2012
    Location
    Copenhagen, Denmark
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I actually just fixed it. It seems the "double jump" feature was colliding with my walljump code. I made sure the player wasn't colliding with a wall when doublejumping to prevent that. I'm very happy with my platforming engine now.

    Again, thank you for your posts.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •