Hopson97 / MineCraft-One-Week-Challenge

I challenged myself to see if I could create a voxel game (Minecraft-like) in just one week using C++ and OpenGL, and here is the result
https://www.youtube.com/watch?v=Xq3isov6mZ8
MIT License
2.65k stars 379 forks source link

Building problem #130

Open cheetosysst opened 5 years ago

cheetosysst commented 5 years ago

Try digging some block and look straight down.

Hold space and right button, it doesn't build a tower like we always do in Minecraft. It sometimes doesn't work, but when it does, it place block on top, side, but never under your feet.

When the block is placed down it pushes you away like teleporting

09jlardinois commented 5 years ago

I've never worked on this project, but my guess is that it's a collision issue where the character's jump height puts them at just slightly below the top face of the block below. And if the character is not 100% inside the topface and absolutely no other face, the collision resolver will probably fire them off in a combined vector of whichever two faces / aabb sides it's crossing. It's pretty much impossible for the player to only be crossing the top face in a game like this.

So I suggest, try altering the jump mechanic so the player jumps higher and "hangs" in the air a little bit. There are some good (very old) GDC talks on how to program unrealistic, but more game-friendly jumping mechanics like those in Mario.

DreamHollow commented 1 year ago

There's a problem with the way that blocks are placed in the game where there's some latency between picking up and putting a block down.

Sometimes this even results in the wrong block being placed down instead.

I've been a little busy but I have been looking into this problem, I'll let someone know if I figure it out.