Skip to content

Refine/fix block jump physics#16946

Open
AbbyRead wants to merge 11 commits intoluanti-org:masterfrom
AbbyRead:block-jumping-fix
Open

Refine/fix block jump physics#16946
AbbyRead wants to merge 11 commits intoluanti-org:masterfrom
AbbyRead:block-jumping-fix

Conversation

@AbbyRead
Copy link

@AbbyRead AbbyRead commented Feb 14, 2026

Goal of the PR

  • Remove the gliding-up-hills effect caused by jumps being immediately allowed when near the top of a block, regardless of what's going on. It makes more sense to wait for the jump to be over before allowing another jump to happen.
  • Prevent the premature snap-up when jumping up and over a node. This appears to have been caused by logic that treated all 0.2 height discrepancies as close enough to act like stairs, but it feels really bad when you don't need that to happen.

How does the PR work?

  • The only changes needed are client-side player movement behavior, as this still seems to fit within the expected means of world traversal that the server would validate.

Does it resolve any reported issue?

Does this relate to a goal in the roadmap?

  • This to my mind fits Goal 2 from Celeron55's roadmap: "Overally fix non-blocking technical issues" (Things that don't prevent playing the game, but make it a lesser experience)

If not a bug fix, why is this PR needed? What usecases does it solve?

  • Some may disagree, but I do call this a bug fix. The existing physics of jumping over blocks seems soft, insubstantial, and glitchy. I can only speak for myself, but it doesn't feel intuitive, expected, or polished. And it takes me out of the game every time it happens, which is a lot of the time considering gameplay hinges on node traversal.

If you have used an LLM/AI to help with code or assets, you must disclose this.

  • I did use an LLM to help me make sense of the code and draft some minimal modifications. I tested it in Windows after compiling it with MSYS2 CLANG64. Hopefully that's not a problem, but if it is, I'm sure we can rearrange or rewrite things as needed. I'm just not all that familiar with the codebase or C++ programming, but I am in the process of learning it in earnest.

Pending Review

Features

  • Snap-up disabled when y movement is positive.
  • Jump disabled when y movement is already positive.
  • Stairs and slabs still work.
  • Auto-jump still works.
  • Walking over small gaps still works.

How to test

  1. Compile the game with these changes.
  2. Attempt to jump up one full block, and compare that to doing so without these changes.
  3. Attempt to walk over a one-block gap
  4. Use the backwards compatibility mod to change things back.

Checks

To avoid breaking any games or maps that rely on legacy physics:

  • Keep the ability to cross small gaps when walking or running.
  • Add backwards compatibility to revert the changes if needed.
  • Test new block jump physics in various games.
  • Make and test a mod that reverts the changes.
  • Sneak-glitch still works if enabled by a mod.

Things Considered When Making This PR

Luanti isn't Minecraft. It doesn't need to have a full set of identical features.

  • Some things it does better (besides being free and open source). Items go straight into the player's inventory by default, for instance, which is a lot less fuss and processing overhead. Picking up scattered items in your inventory by hold-clicking is very convenient. I could go on.
  • Luanti can have its own personality, but I don't think that personality should be of permanent jank that you just get used to. Luanti deserves better than that. Luanti has the potential to become much better than Minecraft.

This was making it feel like you could glide up hills given the right walk speed, which I think makes the game feel less solid overall.  This change makes it so the jump has to pretty much finish before allowing another jump.
Changes the stair-stepping to be prevented when the player has a positive Y speed.  The immediate snap was jarring and made the game feel less precise, less real.
I think that was actually one of the things Luanti has over Minecraft.  Being able to walk over these gaps if you're fast enough is kind of cool.  I just don't want the snap-up during jumps.
@nauta-turbidus
Copy link
Contributor

I'm pretty sure that behavior is intended. Most of us came to like it.

@AbbyRead
Copy link
Author

I'm pretty sure that behavior is intended. Most of us came to like it.

I'm not knocking it being a feature like with sneak-glitch, but it really threw me off as a newcomer. Kind of makes for a bad first impression, imo, but you learn to work with it.

@SmallJoker
Copy link
Member

SmallJoker commented Feb 15, 2026

This closely resembles #13975, which was eventually rejected because to some people it may occur like a regression because climbing stairs (of 1 * BS high nodes) would take slightly longer or parkour challenges would become more complicated.

@AbbyRead
Copy link
Author

AbbyRead commented Feb 15, 2026

This closely resembles #13975, which was eventually rejected because to some people it may occur like a regression because climbing stairs (of 1 * BS high nodes) would take slightly longer or parkour challenges would become more complicated.

Last comment was: "If people want it I could revive this and add backwards compat"

I'm interested in making that happen. If we could make legacy behavior possible via settings, that could be the best of both worlds. I'm gonna look into how to do that, but if anyone else knows how that's cool too.

@AbbyRead
Copy link
Author

AbbyRead commented Feb 15, 2026

Okay, I've changed this PR to be a work in progress since backward compatibility is desired.

EDIT: I'm also going to tweak the step-up in jump number a bit. After doing more playtesting, absolute 0 step-up feels a bit too stiff if I'm being honest. Might also be worth interpolating if the step-up still feels jarring.

@SmallJoker SmallJoker marked this pull request as draft February 15, 2026 19:18
It requires use of a mod like [sneak_glitch](https://github.com/SmallJoker/sneak_glitch), which I've done and tested with it successfully on my end: https://github.com/AbbyRead/luanti_legacy_block_jump_physics
I'm basing that mod off the sneak_glitch repo's implementation though, and the command line tells me some stuff is deprecated.  Guidance is welcome.
@AbbyRead
Copy link
Author

I fussed around with the particulars to give the lip a very slight step-up during positive Y movement because I felt in playtesting that passing over lips was a bit stiff with 0 step height.

I looked through the files to see what was done for sneak_glitch, and followed it up with additions for this PR's changes to be revertable. I initially thought there was a setting in the menu to toggle it back to the legacy settings, but it seems it was just made possible via mods. And maybe that's good if things are changing about the menus still.

So I copied SmallJoker's approach and made a mod that brazenly plagiarizes it: legacy_block_jump_physics. I tested both the code updates and the backwards compatibility mod in-game while playing Voxelibre, and it all seems to work well for me so far.

Let me know if you have any suggestions or if we need to include anything else. I still don't know a lot about how the game works, and I'm still getting used to C++ coming from C. So, some of the stuff I did might be a naïve or outdated approach.

@AbbyRead AbbyRead marked this pull request as ready for review February 16, 2026 03:26
@AbbyRead
Copy link
Author

Still playtesting the new block jump mechanics, and certain games definitely will need to use or include the legacy physics mod. Glitch, for instance (amazing game, btw!) needs it in order to boost across gaps in the 16 gem gated area. I'm looking into why that is, but using the mod does at least fix the issue.

@AbbyRead
Copy link
Author

Okay, I rewrote the code for the snap-up to be more readable and actually what I had originally intended. Glitch (the game) now works just fine on that level, with or without the compatibility mod (Woohoo! 🥳). All the checks are in the process of going through, but I think this PR is a lot more solid now compared to how it started. Let me know if you guys need anything else pending review.

@IonicCheese
Copy link

I'd prefer to keep the feature this PR is trying to patch out. It felt like i was constantly hitting my head trying to go up hills and made jumping up hills slower and less fun.
Before this PR, things like gliding up stairs with something like sprint feels quite nice and fun.
But after it felt a lot less fun and sort of choppy/slow.

I can see a world where you would want this, It would be better as a physics override option that is disabled by default.

@4Arcturus
Copy link

@IonicCheese I think this PR is a very good idea; while my view on the current jumping behavior is that it is unintended (and thus a bug), this change is good because it gives more control to modders, regardless of anyone's opinion on the current behavior.

Additionally, based on several videos I've watched, like OP said, sprinting up cliffs caused some confusion for new players.

doc/lua_api.md Outdated
of the old sneak side-effects: sneak ladders and 2 node sneak jump
(default: `false`)
* `upward_rejump`: legacy ability to jump again while contacting a jumpable surface mid-jump
(default: `false`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

based on the code, isn't the default true (which it should be for backwards compatibility)? same for loose_lips

i'd also just remove the word "legacy" here. it suggests some sort of deprecation which is not the case.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure author intends deprecation, that's why I (and others) dislike this PR so much.

In other words, before we ask ourselves whether or not we could, we should ask ourselves whether or not we should. Because this PR looks like cargoculting MC physics to me.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, there are two ways this PR can go:

  1. add a new option. not terribly much friction. games that want very MC-like physics (@ryvnf would you like this?) can have it. other games stay as they are. nothing breaks.
  2. try to force everyone into the new option by default. users will notice (and might avoid upgrading to not suffer annoyance in PvP), modders will notice (and be forced to update their mods), maybe some parkours and such will suffer if not break. i doubt that there is a compelling argument that this disruption must be and that MC's arbitrary decisions for "less floaty" movement physics are the way they "must" be.

so simply put, i agree with you that (2) is not really an option.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@appgurueu regarding Mineclonia we have gotten one bug report about being able to jump over fences. There could be another one but that is what I could find. My impression is that people do not mind it that much. They mostly think it is weird and some find it convenient. Currently we have a policy of not trying to replicate MC physics because that is not feasible to do consistently.

One of our collaborators also created the mcl_localplayer clientmod which replicates MC physics among other things (requires special engine support). It feels like the long term solution for player physics is to make it customizable like that using SSCSM.

I am personally indifferent to this PR. I would mostly like a future SSCSM API were we could incorporate logic like the player physics from mcl_localplayer into the base game.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Thank you for your feedback. I will look at that clientmod.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not want this to feel like Minecraft. I just want jumping over ledges to feel intentional and not like there's some glitch that rapidly snaps you to the top. I like the physics for the most part, which is why I left the step-up when going down or sideways completely intact. Being able to cross over gaps is awesome.

I would very much like for this to be the default. I know changes get on people's nerves and I have no sway in this community though. My making this PR without asking if "most people" like it was rude on my part, and I deserve the flack I'm getting for that. But I think "most people" at best is the people that stick around after experiencing the jump jank.

Luanti has a lot to offer with regards to the tons of creative content and games that I very much enjoy. That's what makes it worth sticking around. And I am trying my best to make sure these games aren't unplayable and actually feel better. But if I'm just digging myself a grave over it, I'd rather just leave it up to a vote or something. To me, this is sneak glitch territory: not intended, not good, but some people like it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd also like people to try the physics before making assumptions. I know that's a lot, but I've been accused in bad faith of cargo culting for Minecraft, which makes me think people aren't reading or trying it out in-game. I've been playing on parkour maps where the physics very much DO make a difference (like Glitch), and the changes don't break anything so far. I think the fear of disruption and pushback is getting in the way of making any progress.

Copy link
Author

@AbbyRead AbbyRead Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@appgurueu regarding Mineclonia we have gotten one bug report about being able to jump over fences.

I just want to be clear, with or without this modification, fences remain jumpable. I don't want Luanti to be Minecraft. I just want it to not feel broken, unpolished, and unloved. Minecraft went down a road of useless additions, piling on bloat and breaking pretty much every mod with every new version.

I'm trying to say that I'm with you guys on not wanting to upset the community and break games. At the same time though, many games on ContentDB start out broken and remain unfinished. If this is only ever going to be an optional improvement, most creators won't even be aware it's an available improvement.

src/player.h Outdated

bool sneak = true;
bool sneak_glitch = false;
bool upward_rejump = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be true too?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thoughts on upward rejump is that you end up accidentally jumping again just by trying to hold jump the first time. Seems like a bug to me.

doc/lua_api.md Outdated
(default: `false`)
* `upward_rejump`: legacy ability to jump again while contacting a jumpable surface mid-jump
(default: `false`)
* `loose_lips`: legacy step-up while jumping into the corner of a node (default: `false`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think loose_lips is very unclear. I would prefer calling it ledge_stepup or ledge_step_up if this PR is to be merged.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't figure out a good name, but thanks for that. That's much better.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'm gonna go with upward_step since that's the only thing changing about it.

@AbbyRead
Copy link
Author

I'd prefer to keep the feature this PR is trying to patch out. It felt like i was constantly hitting my head trying to go up hills and made jumping up hills slower and less fun. Before this PR, things like gliding up stairs with something like sprint feels quite nice and fun. But after it felt a lot less fun and sort of choppy/slow.

I can see a world where you would want this, It would be better as a physics override option that is disabled by default.

Thank you for at least giving it a try. I'm not sure what you mean by hitting your head going up hills. Do you mean just clipping the edge at your midsection?

Either way, your genuine feedback is appreciated. 👍

@The4codeblocks
Copy link

wouldn't it be better if the configs were numbers instead of booleans?

@AbbyRead
Copy link
Author

wouldn't it be better if the configs were numbers instead of booleans?

Yeah, possibly. What did you have in mind?

@The4codeblocks
Copy link

wouldn't it be better if the configs were numbers instead of booleans?

Yeah, possibly. What did you have in mind?

something like modifying the airborne step height like normal step height, as a number
and jump buffer as a number, for possible stilt effects with higher numbers

@AbbyRead
Copy link
Author

wouldn't it be better if the configs were numbers instead of booleans?

Yeah, possibly. What did you have in mind?

something like modifying the airborne step height like normal step height, as a number

and jump buffer as a number, for possible stilt effects with higher numbers

Okay, I'll look into it. Airborne step height I don't want to couple though if I can help it because being airborne and falling lets you cross gaps. My aim has been to not break anything. But if it's just better to open these up to modders, that sounds cool to me.

I still want to impose a better default if we can though. If people notice a difference they'll at least know there's a difference and look for an option to revert it if they don't like it. 🤙🏻

@ReignOfRaining
Copy link

I would like to add that I talk about this all the time in my YouTube videos. I love that you can glide up the side of hills and that makes it very different to Minecraft. This isn't just a feature I love, its a selling point for why I love Luanti and the games that are made inside of it. I understand you want to try different things out, but I want you to consider my position on it and the other people who are not involved in the code but actively support this project in their own way~ <3

@appgurueu
Copy link
Contributor

appgurueu commented Feb 25, 2026

I am currently reviewing #16971, which has a similar goal and will make this mod-configurable, preserving the current behavior by default.

Changing the default will then be a trivial change that can (and should) be made (and discussed) in a separate issue / PR. In case there turns out to be a large majority in favor of changing the default, I'm open to that. Judging by the discussions and reactions (thanks to everyone for their input!) I've seen so far, a change of default seems likely to be too controversial I'm afraid.

@Wbjitscool
Copy link

Wbjitscool commented Feb 26, 2026

I have tested this and it seems to not effect the floatiness of the jump for both Mineclonia and Voxelibre tho it seems less janky then the current branch

@Wbjitscool
Copy link

tho I wouldn't mind having the backwards compatibility in it to have it the best of both worlds

@AbbyRead
Copy link
Author

AbbyRead commented Feb 26, 2026

tho I wouldn't mind having the backwards compatibility in it to have it the best of both worlds

Well, given what appgurueu said and the deserved backlash from my calling a beloved feature jank, I'm just gonna do like people want and make the default be existing node jump logic and hope that it later either gets adopted or defaulted to the engine at a later point in time.

If the other PR gets through and this becomes irrelevant and gets closed, that's fine. Like you implied, this one doesn't change the physics, so if jordan's is doing something different it might be worth offering a simpler approach. I'll defer to other people's opinion on closing or considering this PR.

Sorry for all the bad vibes I generated with this pull request. I need to be less feisty and rude. Part of it is just my own insecurities, trying to feign confidence, but it just comes off as me being a jerk. And I really don't want to be a jerk in this community that has so many creative, kind, capable people in it. Everyone's got opinions, and mine are just my truth, not the only truth. I believe in Luanti and the people behind it, including its fans. It's a great product and ecosystem already; and I look forward to the content and improvements people bring to it. ✌🏻

Since new_move doesn't affect it, I didn't want to imply it does by having it in the same block.  And I don't know that it would be clear to have booleans in with numerical values.  If anyone has a better idea of formatting and placement, lmk.
@Wbjitscool
Copy link

I wonder if there's a way to improve the player movements when pressing the keys while moving I noticed some jankiness in that too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.