Platform Discussion Thread

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hello again!

    This thread is for developers who's either stuck on programming or knows a couple of programming tricks for game projects of the 2-D platform genre.

    The thread should support any custom platform movement or the PMO extension. *Try to hint on which you are discussing about*

    So if anyone has an problem or a solution they want to discuss, please post here!

  • Funnily enough, this is exactly why I came here to post today!

    Does anybody have any pointers on how to program a (relatively) simple custom-made platform movement? I was trying a lot on a new game last night but... eh, I dunno it just looked choppy and terrible. All I'd really need the guy to do is move left and right, jump, and be able to climb ladders. MMF2's platform default was very buggy. I've done a platformer in the past however trying to do another one without Phizzy's assistance has been hard to do right.

    Basically I want it to be smooth. If the guy doesn't move around smoothly and effortlessly I don't think it'll be fun no matter how many bells & whistles you toss upon it afterwards. The guy (hero) is sort of small at 16 x 16 and I have a right, left, and bottom detector for collisions with the backdrop.

    I know this is serious n00b territory but I consider myself an artist and musician first and programmer third :D

    Weebish Mines, my retro Metroidvania!
    Please login to see this link.

  • Smooth movement almost always means using fastloops, because you can get pixel perfect collision detection and movement with it.

    I wouldn't consider doing a platformer without using loops.

    The basics of it are simple... when the player presses left or right keys, MMF runs a fastloop x amount of times (x being the number of pixels you want the player to move per frame tick) Then inside the fastloop, you actually move the player 1 pixel per fastloop, and then you check for collisions. If there is an overlap, then it cancels out that 1 pixel move and stops the loop, otherwise the 1 pixel move is accepted and it moves on to the next iteration in the fastloop. It does this all in the span of 1 frame tick in your game, so you get pixel perfect movement/collision.

    So just for example, if you wanted to move the character at 10 pixels per frame tick, you would normally just do "player presses right arrow key, set player x position to x position + 10. But the problem is that it's literally teleporting the player 10 pixels forward, instead of moving them 1 pixel at a time, 10 times. That's what fastloops are for. The end result is the same, except much smoother and more accurate.

    edit: Also I have an example file in my signature for fastloop movement and collision detection. This example is set up for a top down RPG, however the same rules apply. It wouldn't take much to adapt my example into a platformer example. You would just remove the up/down movement and then have a fastloop that acts as gravity to constantly pull the player down until they overlap a solid obstacle.

    Please login to see this link.

    My examples:
    Please login to see this link.
    Please login to see this link.
    Please login to see this link.

  • why would'nt they just make a new thread...? that's what this sub-forum is for.

    I figured it's better to have a group of devs share problems and solutions related to a similar genre all in one thread than one dev posting a single problem then waiting for an answer.

    Sometimes a single problem thread posted will have no answer and it's eventually "layered under recent threads"-(can't find a word for that) or other times there will be a thread with a good question as well as a good answer, but it becomes harder to find for devs having a similar issue.

    With a General Thread, devs can post problems or find the problem already if it's common enough, or devs can give solutions to problems posted or solutions other devs haven't even thought of...

    I know there's a lot of faults to this; I just thought it was a good idea to make one.

  • I know there's a lot of faults to this; I just thought it was a good idea to make one.

    Don't beat yourself up too much, you can never have enough help here IMO.

    Konidias: Thank you! Using your RPG smooth move example I was actually able to do a ton of work on a game yesterday already. What I did was use the right & left movements and trim down the blue 'hero collision' detector to fit the hero's smaller size, then slap my existing bottom detector to it and add the gravity code I still had leftover from Phizzy.

    I'm also using your up and down events but only if the guy's overlapping any ladders. Animations are simple but they came out great- I have stopped, walking, falling, climbing ladders, and 2 melee attack animations (the guy has combos with regular attacks). The ONLY thing I haven't been able to get right so far- and trust me I tried adding this for 2+ hours last night at least- is the jumping. I'm using code similar to my jumping code in Hasslevania however it's not working and I'm not sure why not yet. It's one of those things where it LOOKS like it should work but it doesn't. You guys know how that is!

    So though it's early on in this project, the foundation is shaping up great and I have you to thank for it. The plan is to make a game that could best be described as a cross between an awesome old NES game called "Legacy of the Wizard" and Hempuli / Hempulix's "Excavatorrr". If I can pull it off it should be good, we'll see!

    Weebish Mines, my retro Metroidvania!
    Please login to see this link.

  • Here's a topic to think about-
    One of the more popular mechanics devs like to implement in Platform Games is Wall Jumps.

    A common mistake some devs make is giving the player object the opportunity to jump when collided to a wall.
    The flaw is, the player can make the player object infinitely jump just by pressing the jump button over and over again as long as the PO is touching a wall.

    There are many ways a Wall Jump can be implemented.

    My way is giving the player object side detectors, and whenever a side detector collides with a Group Object that acts like a wall backdrop, the player object freezes in place until either the player jumps away from the wall or a small amount of time is up, making the player drop down.
    I've done this, and it works great; I just have to stop the grav loop whenever the player object freezes place or else when the player object drops, it will plummet to the ground with uncontrollable speed.

    Does anyone have their own version of a wall jump they would like to share?

  • Here's a topic to think about-
    One of the more popular mechanics devs like to implement in Platform Games is Wall Jumps.

    A common mistake some devs make is giving the player object the opportunity to jump when collided to a wall.
    The flaw is, the player can make the player object infinitely jump just by pressing the jump button over and over again as long as the PO is touching a wall.

    There are many ways a Wall Jump can be implemented.

    My way is giving the player object side detectors, and whenever a side detector collides with a Group Object that acts like a wall backdrop, the player object freezes in place until either the player jumps away from the wall or a small amount of time is up, making the player drop down.
    I've done this, and it works great; I just have to stop the grav loop whenever the player object freezes place or else when the player object drops, it will plummet to the ground with uncontrollable speed and allow you to keep jumping.

    Does anyone have their own version of a wall jump they would like to share?

    I did use the advanced platform movement object and figured out a easy way of wall jumping.. don't have an example on me right at this minute though. I think i kinda modified a double jump feature where if you hit a wall then it would reset the double jump detection.

  • If that's your way of making a Wall Jump mechanic, how do you prevent the player from tapping jump button for infinite jumps when touching the wall.
    Do you force the player to bounce away from the wall when the wall jump is applied? If so, how exactly?

  • ^^ Maybe he used a flag for a condition? ^^

    Touch the wall + jump + flag 1 is off -> flag 1 on + the guy jumps, then turn the flag 1 off if he's not touching the wall anymore?

    --

    Any pointers on how to do smooth jumping? I have the falling part down with terminal velocity and all that so unless my guy's just not going to be able to jump I have to figure something out next :D

    Weebish Mines, my retro Metroidvania!
    Please login to see this link.

  • I have a platformer movement question as well :). I made my custom movement following Please login to see this link. and it's worked great so far. However, I have no idea how I would make the player fall faster than he jumps up. I would like him to jump up at 1 pixel per frame, then fall at 2 pixels per frame. I've been trying at it for a few hours now but I can't figure out how to do it (I am new to MMF2 :) ) Can anyone help me with this? I've attached the .mfa.

    Please login to see this attachment.

  • I have been messing around with some platform ideas and different ways of performing many of the typical (plus many extra) things you would find in a platform game for the last month or so and I have managed to put together some interesting ways of doing such things. It's based on the the principals shown in David's tutorial with my own twist on things.
    So now I will be starting from scratch to develop a new platform engine and I'm thinking that I will do a blog or something as I do it, would that be something people would be interested in?

    Please login to see this link.

  • Update on this: I was able to incorporate some of DavidN's jump / gravity code with some tweaking and existing stuff and it works great. Thanks again!

    This guy thanks you too:

    If you ever want your player object to have accelerated/decelerated horizontal movement combined with horizontal moving platforms, you must look at this thread!

    Please login to see this link.

    The original showed how to do both separately but not together, the attachment DavidN gave in the thread does!

    hope this will help...

  • If you ever want your player object to have accelerated/decelerated horizontal movement combined with horizontal moving platforms, you must look at this thread!

    Please login to see this link.

    The original showed how to do both separately but not together, the attachment DavidN gave in the thread does!

    hope this will help...

    The guy's movement is supposed to be pretty simple, the main thing was to have it act smoothly which now thankfully it does. The game's going to be more about item usage and resource strategy (to a point) so all he really needs to do is move left, right, jump, fall and climb up and down ladders.

    Weebish Mines, my retro Metroidvania!
    Please login to see this link.

  • I have been messing around with some platform ideas and different ways of performing many of the typical (plus many extra) things you would find in a platform game for the last month or so and I have managed to put together some interesting ways of doing such things. It's based on the the principals shown in David's tutorial with my own twist on things.
    So now I will be starting from scratch to develop a new platform engine and I'm thinking that I will do a blog or something as I do it, would that be something people would be interested in?

    Yeah man, I'd be interested in reading something like that go for it!

    Weebish Mines, my retro Metroidvania!
    Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!