0 Favourites

Platform Behavior does need improvements.

  • I know there are obviously other things that you want to do first, Ash, and there is a lot on that to-do list, but I do feel the need to point this out.

    The platform behavior is neat, but the Classic behavior has some things that the C2 version doesn't:

    • Variable jumping height
    • Air speed options
    • Inverse control
    • Bunny hopping option
    • Being able to fall through platforms (would be nice to be able to do it with a custom key, too)

    But I also think that the behavior has some other limitations that could be addressed that limits what people can do with it. Namely, rotations. Some platformers (Sonic being one of the first examples) allow platforming characters to rotate on slopes, walk/run on walls, that sort of thing.

    I've tried to do such things with the custom movement, but I'm pretty sure it's extremely difficult to do, because methods from Classic don't work very well at all. Physics... Just as difficult, if not moreso. And the only other alternative is making your own movement through pure events, and that can get very complex indeed (especially if you're trying to create something momentum-based like Sonic).

    I think it might be beneficial to create an "Advanced Platform Behavior" that gives users much more flexibility and options on how they want to make a platform character to move. Do they want rotations on slopes, or not? How about being able to slide or roll down a slope to pick up speed? Stick to walls and ceilings, or fall off if there's not enough speed? That sort of thing.

    It would unshackle more than a few of the limitations of the behavior while also giving users the option to start off with the "basic" version, and moving on to the more advanced options if they want them. Slope rotations, believe it or not, would go along way to extending what a platform character can do.

    With that in mind, I imagine an "Advanced Platform Behavior" (or just an improved regular behavior) would have these features:

    • Slope Rotations
    • Slope acceleration/deceleration
    • Collisions based on objects/families as well as the Solid/Jump-Thru behaviors
    • Toggling collisions with particular 'solid' objects on a per-instance basis (rather than turning off the actual solid itself)
    • Some other stuff I can't be arsed to think of right now

    Long story short, if you can faithfully recreate Sonic platform physics using such a behavior, I would say that would be the point where you can say 'mission accomplished'. Can't be that hard, surely. :)

    I know there's a LOT on your plate, but I guess it really can't hurt to make suggestions.

  • Thanks for the ideas - the Platform behavior is definitely still missing some important things, and I guess this is a good reminder what's left to do.

    However I think a Sonic-like movement is quite a tall order... it would involve significant changes to how the Platform behavior works, and it's already an extremely complicated behavior (try figuring out the algorithms for jump-thrus at arbitrary gravity angles...) Still, I'll have a play at some point and see if I can figure out how a Sonic-type movement works, but it's a pretty clever movement type, I'm not sure I'll be able to figure it out!

  • Interesting though. I never thought about how complex Sonic's movement is... it actually might be. Hmm...

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Sounds like a good topic for a contest....

  • I agree!

  • I was just wondering how to make my bot graphics rotate to move on angles! Glad I saw this thread. Answered that question.

  • Classic didn't have variable jump height stuff out of the box, but the same methods used for it in Classic can be used in C2. Basically, on release of the jump button while jumping you can set VectorY to something like JumpStrength / 2 or -100 or whatever to kill the upward momentum. Works pretty swell.

  • Ashley

    There is a sonic fan site, that goes into detail about all its physics.

    Scroll down and you will see the sonic loop slope.

    info.sonicretro.org/SPG:Solid_Tiles

  • Believe it or not, Ashley, there's actually an entire guide on how Sonic physics works. The page linked in PixelPalette's post above is just one page in the whole thing!

    Sonic Physics Guide

    Plus,you can also check out the Classic version of the Sonic engine I'm trying to replicate in C2 (with some difficulty). The physics, to my knowledge, are quite accurate, so it's a good reference as well. Best to look at both, since the event-based engine works a bit differently when it comes to stuff such as rotations, due to the guide being based around methods used in the Genesis/Mega Drive Sonic games.

    Really, creating a more advanced Platform Behavior based around Sonic physics may seem hard, but Sonic fans have spent years figuring out how it works. Obsessive, but it does have benefits. :) Build a solid framework based around those physics, and then provide users with options to be as flexible as they want with it, and then you have a behaviour that will let you do more than what is there right now, I think.

    Speaking of which, Ash, did you get that PM I sent you about anglelerp() and RotateAngle()?

    Edit: Fixed the links. And just to note, even Mario could run on walls at times in Super Mario World. Food for thought.

  • I dunno about all that, but basic slopes, collisions, and moving platform interaction could be improved. You can tidy em up with events but you can only go so far.

    Yeah the C2 platform behavior doesn't have everything the CC one did but I'm kind of glad to be honest ^^; there were a lot of useless properties.

  • I posted about this a while back, with an invisible 'player' sprite and a pinned 'display' sprite, it's reasonably simple to replicate rotation based on platforms , though a native application of simple slope adjustment would be awesome.

    Crouching too! ;)

  • Tokinsom: Well, the platform behavior can move on slopes, but it can't automatically rotate on them, nor is it capable of properly traversing curves. But, yeah, general improvements are a good idea all round.

    @JohnnySix: To be fair, using two separate sprites is a well-known technique. And crouching is easy, make a separate animation for while the player holds down. :p

  • Candescence Indeed but the current slope detection is pretty wonky as it is. The player might "hop" down slopes and/or move at inconsistent speeds.

  • Pretty much! Proper slope detection is a must, methinks. Might as go all the way if you're aiming to do that, since there's an entire framework already there to base the behavior on. :p

  • You got me wrong, I wasn't trying to be a smartass - I meant using the existing pinning technique to apply rotation to the visible character - wasn't claiming to invent it.

    I was just trying to share something with people to use themselves.

    This was the example I was experimenting with here

    http://www.johnnysix.net/games/PlatformTest/

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)