Skip to content
This repository has been archived by the owner on Nov 19, 2018. It is now read-only.

Jumping feels very different to Minecraft #243

Open
Calinou opened this issue Apr 12, 2016 · 8 comments
Open

Jumping feels very different to Minecraft #243

Calinou opened this issue Apr 12, 2016 · 8 comments

Comments

@Calinou
Copy link

Calinou commented Apr 12, 2016

In TrueCraft, jumping is enough to step over blocks, but the total air time is very low compared to Minecraft. This is probably due to the gravity being too high. It feels like you're bumping, more than jumping.

@ghost
Copy link

ghost commented Aug 11, 2016

Working on it it might take awhile ;)

@MggMuggins
Copy link

The problem seems to be that the player just accelerates to terminal velocity way too fast. That's probably an AccelerationDueToGravity issue, but I can't find the relative variable that would have any effect on it.

@ddevault
Copy link
Owner

The physics engine is buggy as fuck. It's difficult to build a clean-room physics engine that behaves exactly like Minecraft - reverse engineering friends have mentioned that Minecraft's own physics engine is really poorly implemented and difficult to precisely describe.

Currently the best attempts are on the wiki:

I encourage anyone to take a whack at improving it. There are also less cosemetic (and possibly easier to solve) issues to tackle, like figuring out why non-player entities (sand, mobs, items) have a tendency to fall through the ground. Take a look at the unit tests if you want to look into these issues, they're a good tool for creating reproducable scenarios to test with.

@MggMuggins
Copy link

I messed around a little with the value in TrueCraft.Client/MultiPlayerClient.cs a bit. Changing the Gravity acceleration and drag made things a lot more like vanilla MC. However, doing that means the player can jump 2 blocks high instead of one. Trying to figure out why that is. Is there a maxJumpHeight somewhere, or something that would help determine what is going on there?

@ddevault
Copy link
Owner

Those values are straight from Minecraft, changing them wouldn't fix the real bug. The bugs are in the physics simulation, not the constant.

@RepComm
Copy link

RepComm commented Jul 9, 2017

Temporary fix?: Setup an spigot server and use a plugin to record the height value of your player, and make a curve graph based on the data. You could add velocity based on the curve (interpolate)

@wischi-chr
Copy link

Should be possible even without a plugin.

  1. Open debug screen (F3)
  2. Start screen capture
  3. Jump.
  4. Transcribe framenumber (calculate time) and height
  5. Draw graph and compare to truecraft

@ddevault
Copy link
Owner

ddevault commented Sep 1, 2017

Simulating some other motion curve isn't going to cut it. It's not designed that way. We give the player positive vertical velocity and let the physics engine do the rest.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants