Page 1 of 1

[MAP DESIGN] Jumping a 2-tiles-sized window is difficult

Posted: Sun Mar 04, 2018 1:27 am
by Noble
Image

Apparently, you won't be able to jump a window of that size (I think it's 2 tiles) most of the times.
Sometimes you keep jumping and trying to jump through it and you simply don't pass.
Notice that I'm pressing right and it still doesn't work, and I kept only pressing the same keys, nothing different. if you're able to do this you should be able to do this all the times, I don't know why that happens.

Re: Jumping a 2-tiles-sized window

Posted: Sun Mar 04, 2018 2:26 am
by JakSparro98
By design, now the explanation...

Here the collision resolution is involved, every time you jump the collision system will "resolve" the player collision by push him enough to make him not to collide anymore.
Now, you're doing the same jump every time, but the position of the player's collision box changes a little bit every time too, but enough to even change the collision resolution result.

I want to make a little example, let's say we want to resolve a collision between two object by checking their collided pixels.
Image
Image
Here we have that the two object have collided 4 pixels vertically and 1 pixel horizzontally, it's more convenient for the collision system to push the player out by only 1 pixel horizzontally instead of 4 vertically.

I don't think the SFD engine uses pixel perfect collision checking but this example helps you understand that for the engine if I collide at 0.74267 in a direction and 0.74865 in another this will have a specific result even if you cannot notice the difference; can you imagine this applied even with linear velocity parameters in the collision resolution? And since SuperFighters Deluxe isn't deterministic, the same action (the same jump) would correspond to two slightly different results.
Off Topic
The window is about 21 pixels (2.5 tiles in height)

Re: Jumping a 2-tiles-sized window

Posted: Sun Mar 04, 2018 12:10 pm
by Gurt
By design. The underlaying box2D engine we use is not deterministic so one result may vary from another.

Elements in SFD isn't designed to work in every specific conceivable scenario that a map author can imagine.

Just because you can design something doesn't mean you should :). We try to keep our windows in our official maps at least 24 units high (or 6 4x4 glass-sheet tiles high) and stretch them down to the floor. This makes it easy to dive out from a window and easy to jump in.