Line-Guided Platform Physics at miniscule velocities

General discussion about Super Mario Bros. X.

Moderator: Userbase Moderators

SilverDeoxys563
Guest

Line-Guided Platform Physics at miniscule velocities

Postby SilverDeoxys563 » Mon Mar 30, 2015 8:40 am

Alright, class! Today we're going to look at a very special background object in SMBX.

ImageImage

Yep, that's right! I don't know what you call it, but to me, it's always been a line platform reverser. That's what I'll refer to it as throughout this entire post.

Now then, the line platform reverser is a special BGO. If ANY of it (32x32 hitbox and all) is touched by a line-guided platform's middle (even the slightest 1x1 pixel on its edges) it will instantly change direction. The thing is, half of the "square" angles we've all been dreaming of for years don't actually work because there's been an unstated rule all this time.

Code: Select all

When a platform touches a new line while it's >>airborne<<, it's either going to go up or to the right. This only applies to extremely small velocities.
So, here's an example:

Image

In this instance, ignore the line reverser BGO.

Let's say that from the top horizontal line, our platform is approaching and it's moving left. What will it do without the blue thingy? It's going to fall off the line going left, and then it will try to attach itself to the vertical line. However, since it's going to move upwards when it touches a new line, it goes up and "bounces" into the air. It then detects the horizontal line once more, and because it will always move right when it detects a new horizontal line, it goes right.

Keep in mind this all happens in under a millisecond.

Basically, in the end, when it tries to go down the vertical line, it can't, and it instead goes back from where it came.

However, using the platform reverser BGOs, we can change that!

I don't actually know the science behind its hitboxes yet, but you have to give the platform at least a few 1x1 pixels' room to "breathe." In this case, when it tries to "bounce" back up off of the vertical line, it's going to detect the line reverser BGO and hit it. Because they always reverse movement now matter how large or small a drop or fall is, it's going to move BACK DOWN and go the way I wanted it to go! Yay!
So, you see, square platform corners ARE possible in SMBX! You just have to, uh, use a little bit of magic by disabling auto-align, and then make the BGOs invisible to look better. I hope to see some great levels featuring these kinds of lines in the future!

Squishy Rex
Tellah
Tellah
Posts: 1986
Joined: Sat Dec 21, 2013 4:30 am
Pronouns: he/him
Contact:

Re: Line-Guided Platform Physics at miniscule velocities

Postby Squishy Rex » Mon Mar 30, 2015 9:30 am

I intend on trying this as soon as I can. It's about time we got a bit more freedom with these things. Also, would this mean that this would be possible if say the platform hits the stopper and then goes up the wire if placed correctly? Just going out on a limb here. I have no idea how long it took you to figure all of this out and make sure it works, but I can definitely say this will be pretty useful.


Return to “General”

Who is online

Users browsing this forum: No registered users and 3 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari