toger5 / Godot-Voxel-Game-MineCraftClone

This is a Godot project where I try to get familiar with the Engine.
MIT License
72 stars 14 forks source link

Mouse controls are buggy #1

Open ogbaba opened 8 years ago

ogbaba commented 8 years ago

I don't know if it's specific to linux but mouse controls are really buggy, the mouse cursor is visible and moving the mouse faster isn't detected so the view is jerky :/

toger5 commented 8 years ago

This is caused by two reasons: once it is kind of an optical illusion that the movement is jerky when you don't hide the mouse courser Add this line of code into the ready function of the Player.gd script: Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN) Than everything will be smoother. The other reason is that there are still some frame-drops during the creation process when a new junk mesh is added. Depending on the power of the pc this also makes it a little bit jerky.

Tell me if that solved the problem or if you mean sth else. But ty for the hint that I need to include the "mouse-courser-hide"

ogbaba commented 8 years ago

Okay so I did that but there is still the issue of the view not being smooth :cry:

toger5 commented 8 years ago

can you tell how much fps the game is having on your machine. Maybe (if you have time) you can check if thats a problem of the character controller or the world generation script. As i said before this also could be caused by the calculations for the chunc generation, which aren't spread perfectly.

So: just set process and input_projess to false in the "geometry_for_wg.gd" script. (line: 38,39 if I didn't change that in my script compared to the version on git) add a big test cube, give it a cube collider. and put it underneath the Player Node controller. If it's smooth than, the problem is caused by calculation of the world mesh generating node. Than I may upload my current version to git (this may fix that). If not than this might be a problem with linux (I dont think so) or I just think it runs smooth on my pc but for you this is not smooth at all.. But we are having same results ;)

toger5 commented 8 years ago

Which branch are you using (master or newCollisionSystemAndBlockDestroying) because on the master brach i currently hace a verry old and poor verions which used a system the adds all the nodes needed for the pysic for one chunc in one frame. this caused lags. My current branch is newCollisionSystemAndBlockDestroying but this was very experimental at the beginning so id didn't want to push to master. I need to clean up this repository. bring everything up to date...

toger5 commented 8 years ago

okay just merged to the master so now you should be able to use the master branch. Now you should get the same results than I do (or at least almost similar results). Maybe this fixes the problem (when you used master until now than it should be a huge imprvement)

toger5 commented 8 years ago

I did some strange things with got and did not realize that the online repos isn't the same as the one on my pc. #3 See that issue there I explain it (a little) Now you should be fine with using the master branch ;)

ogbaba commented 8 years ago

Okay thanks :D I will try to check that :+1: