lexyeevee

troublesome fox girl

hello i like to make video games and stuff and also have a good time on the computer. look @ my pinned for some of the video games and things. sometimes i am horny on @squishfox



so i've had exactly 1 (one) person comment that fox flux feels "kind of floaty", which surprised me, as the person who has played the most of it in the whole world

and it reminded me of how i've seen several devs mention in recent months that they make gravity weaker when jumping and/or stronger when falling

and i always scoff in my head like, well, obviously that's nonsense. gravity makes parabolas. everyone loves parabolas. physics feel floaty in everyone's first platformer because gravity is usually preset to earth gravity, which is way too low, and newer devs don't think to ferret out the menu that lets them increase it.

well, i was half right. at most.

i consulted the canonical disassembly of Super Mario Bros and gleaned the following facts that are hopefully true:

  1. normal gravity is $0.28 (that is, 0x28/256 pixels per frame², or 0.15625)

  2. there are three tiers of jump, depending on your current movement speed. actually there are five, but tiers 0/1 and tiers 3/4 are identical

  3. each tier sets three (actually four but the fourth is only used when swimming) values: your y-velocity, your jump gravity, and your fall gravity, as follows:

    • 0 ≤ vx < 16 — initial jump speed -4, jump gravity $0.20, fall gravity $0.70
    • 16 ≤ vx < 25 — initial jump speed -4, jump gravity $0.1e, fall gravity $0.60
    • 25 ≤ vx < ∞ — initial jump speed -5, jump gravity $0.28, fall gravity $0.90

    you use your jump gravity while you're "still jumping", which (i think) means as long as you are moving upwards and still holding the A button. as soon as either of those is not true, you switch to fall gravity, which you may notice is 3~4× stronger than normal gravity

  4. terminal velocity is 4 (actually it's something weird like, if you surpass $4.80 then you get capped to 4), and you hit it real fast at those falling speeds

so the short version is that the first half of your jump is a parabola, but your descent is basically linear because you fall so dang fast that you hit terminal velocity after about a quarter of a second. i would insert a graph here but putting an image midway through a copost is tedious enough that i don't want to.

that's kind of weird. i'm not sure how much of this is conscious Miyamoto Magic™, and how much of it is maneuvering around the practical irritations of having your fractional bits in a separate byte and writing the whole fucking game in 8-bit assembly.

it's plausible that the intention here was to get variable jump height — after all, cranking up gravity will make your jump stop ascending real quick — and that the light-speed descent was a side effect that no one thought about. but who knows for sure?

i'm not planning on changing anything; i like how lexy's jump feels right now, and i think it's reasonable to have a little more descent time to plan your landing, especially in a slower-paced game. (there are lexy variants that fall at a different speed, as well.) parabolas are good and you will take my parabola and you will like it.

but now i'm wondering just how many games have a jump/fall imbalance like this.

other fascinating SMB1 tidbits:

  1. water physics are exactly the same, except you can jump in midair, your jump is wimpier, and normal gravity is $0.18 rather than $0.28.

  2. as far as i can tell, when you land, your gravity is reset to normal, but your y velocity is not. you simply don't fall when you're already standing on something. so if you land from a high jump and then walk off a ledge, you will instantly start falling at terminal velocity.

  3. NTSC (Japan and US) is 30fps, but PAL (Europe) is 25fps. so they changed all the magic physics numbers in the PAL release to keep the overall timing roughly the same. but as a result, you can jump about 3 pixels higher in the european release. not enough to make it up another block, but enough to give you a bit more wiggle room when making a max-height 5-block jump.


You must log in to comment.

in reply to @lexyeevee's post:

My favourite platformer jump was always the Cave Story one, but bugger if I could put the right words to why beyond "it feels right, I end up where I think I will". It's definitely "floaty", but..!

These SMB1 tidbits are really something. What a strange situation, with those regional differences...

I think my favourite NES regional difference due to framerate is NES Tetris.

Competitive NES Tetris is enough of a thing that you'll be able to look the specifics up, but the PAL and NTSC versions, due to the framerate differences, have an almost completely different level falling speed table, and for some reason different DAS in a way that goes way beyond fixing for the different drop speeds (Also they reach the highest drop speed at different points, meaning you're playing at a line every frame way earlier in PAL than you are in NTSC, but that's 5/6 of the speed of a line every frame on NTSC. Which meant it took a lot longer for anyone to get a maxout on PAL Tetris.)

Of course, now that people are able to actually play on the NTSC killscreen thanks to rolling...

Reminded of how my own jumping (in the pico8 and Love2D attempts I did once) was described as "floaty" by someone too, and it also had consistent gravity power over everything. And I never really minded this perhaps because a) I like Kirby, is Kirby more floaty than Mario? Maybe? and b) well the protagonist was a pooltoy, so

I think it felt a bit floaty at first for me, but eventually I got used to it and now it doesn't feel floaty. I think it was mostly that you don't control your movement as directly in air and have inertia, so I had trouble landing on platforms, and the jump did feel a bit slow so I often overshot when trying to land, but that's just a matter of getting used to it, and the original SMB also had lots of inertia and was difficult to get adjusted to.

Worth noting that "floaty" is pretty arbitrary... like I think it means "slow jump", as in low gravity and low initial velocity, but what "low" means there is also arbitrary. One thing I think goes into it is how easy to control it is, and the main thing I think increasing gravity for the fall did was give more control to the player over where they wanted to land, because they could quickly fall where they wanted as soon as they were over it (and you get the time to plan where you're landing during the ascent, which was longer), while having constant gravity you don't get that aspect of having an input that drops you at the spot directly, so it feels a bit less controllable, and you have to wait longer to fall in the spot where you want, whereas with increasing gravity on fall you get there quicker.

As a side note, I remember that Sean Barret commented during a video that thinking about the "gravity changes during the jump" thing made more sense if you saw it as just adding another force during part of the jump with gravity always being constant, which I think is a more flexible way to think about it (maybe you can also add a downward force during the descent to help the landing immediacy, or change the size of the force gradually), as well as being easier to justify in the fiction since it's just like having a jetpack, and you can invent any number of things that add forces, whereas changing gravity is more heavy handed.

oh, interesting — i'd only thought about fall speed as giving you more time to plan, not about less time making it easier to commit. i suppose in fox flux you end up having to plan the whole arc, not just let go when you're in the right spot

fwiw i did just try increasing gravity overall by a small amount, and i didn't like how it felt at all — i felt a lot heavier, and that also made the game itself feel "heavier" and less leisurely

so i'm definitely sticking with what i have (though i do wish i had a better sense of how it compares than just vibes), but i do want to limit precision jumps in general anyway, and now i'm thinking about maybe there's a form with a fast-drop ability as a nod to this?