User Tag List

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

Thread: Platform Discussion Thread

  1. #1
    Clicker Fusion 2.5 Developer
    TheFieryPlumber's Avatar
    Join Date
    Oct 2012
    Location
    Delaware
    Posts
    85
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Post Platform Discussion Thread

    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!

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    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)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,109
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    why would'nt they just make a new thread...? that's what this sub-forum is for.

  3. #3
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    919
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    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

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,538
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    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.

  5. #5
    Clicker Fusion 2.5 Developer
    TheFieryPlumber's Avatar
    Join Date
    Oct 2012
    Location
    Delaware
    Posts
    85
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DaveC View Post
    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.

  6. #6
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    919
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by TheFieryPlumber View Post
    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!

  7. #7
    Clicker Fusion 2.5 Developer
    TheFieryPlumber's Avatar
    Join Date
    Oct 2012
    Location
    Delaware
    Posts
    85
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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?

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    S.East England
    Posts
    744
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by TheFieryPlumber View Post
    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.

  9. #9
    Clicker Fusion 2.5 Developer
    TheFieryPlumber's Avatar
    Join Date
    Oct 2012
    Location
    Delaware
    Posts
    85
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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?

  10. #10
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    919
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    ^^ 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

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Replies: 0
    Last Post: 29th April 2013, 08:25 PM

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
  •