N3RDIUM / PyCraft

A Minecraft clone written in python and glfw/OpenGL.
MIT License
17 stars 2 forks source link

Suggestion on how to fix the game lagging while displaying chunks #28

Closed dolphin007x closed 2 years ago

dolphin007x commented 2 years ago

Hi, I saw on the README that you pointed out the game freezes while loading chunks.

What I think you should do is add a render distance feature. If you've played Minecraft, you would know that there is a value called render_distance that basically detect the player's position in the world, and then renders a certain number of chunks so that the game does not lag. Else, if the world is infinitely generated, and the render distance is set to infinite (as it is now), it could cause the game to freeze like anything or even crash the game. Please implement this feature so that the game runs as expected.

Thanks, @Adatta1276

N3RDIUM commented 2 years ago

This is fixed, I was trying just that. I've implemented Minecraft-like chunk rendering long before, but it had a lot of bugs. I just fixed it today.

N3RDIUM commented 2 years ago

Look at the readme!

dolphin007x commented 2 years ago

Also, did you try implementing the feature so that the inside faces and sides/edges of the cube are not rendered? I guess you've already done this since this is a feature of Minecraft, but can you confirm?

N3RDIUM commented 2 years ago

Yes I did!

N3RDIUM commented 2 years ago

That feature was added very recently, like yesterday!

dolphin007x commented 2 years ago

Ok, thanks for letting me know

On Wed 17 Nov, 2021, 21:15 somePythonProgrammer, @.***> wrote:

That feature was added very recently, like yesterday!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/1upCommunity/PyCraft/issues/28#issuecomment-971706004, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARSU3E73VHHMDTPTKZHQDALUMPEYVANCNFSM5GZOM5YQ .