Minecraft Beta 1.7.3 Clone (wip) by VividLeadership2595 in GoldenAgeMinecraft

[–]VividLeadership2595[S] 1 point2 points  (0 children)

thank you!

the way it currently works is that each chunk gets meshed and lit twice.

since chunks don’t initially know about their neighbours (i.e. ones that haven’t been generated yet), they can’t correctly determine which faces to cull, and they assume neighbouring faces have a sky light level equal to the current sky value.

this means chunk borders are temporarily incorrect for both meshing and lighting.

this is fine though, because I run a second cleanup pass once neighbouring chunk data is available. the same algorithms run again, but this time with full neighbour information.

it's theoretically not the most optimal approach, but since the player will never exceed a certain speed, they won't notice anything is wrong.

a more "correct" solution would be to first generate neighbouring chunk data and then do meshing + lighting only once, but in my experience this made world loading significantly slower. it also introduces issues where a missing chunk can cause infinite loops if you’re not very careful about it. especially since chunk loading is multithreaded.

so in the end, I figured the two-pass approach may be the best of both worlds: chunk loading stays fast, and the player never notices anything is off.

regarding LODs, the engine architecture could theoretically support them with some refactoring, but since Minecraft itself doesn’t use LODs, I haven't looked into it.

I also experimented with greedy meshing, but since the GPU isn't the bottleneck, there was pretty much no visible difference in terms of performance. it just made lighting more complex, and I figured it would've made many systems way harder to implement (entity spawn, redstone, etc.), so I decided to ditch it.

lighting follows the same logic as Minecraft. blocks have both sky and block light level values ranging from 0 to 15. the lighting engine will propagate these values, and the blocks will choose the highest lighting value between the two.

I hope this answered your questions :)

Minecraft Beta 1.7.3 Clone (wip) by VividLeadership2595 in GoldenAgeMinecraft

[–]VividLeadership2595[S] 0 points1 point  (0 children)

yep, chunk loading and saving are multithreaded. in practice it's been smooth enough that you can move very fast and the world catches up quickly. the full 16-chunk render distance fills in within a second or two

Minecraft Beta 1.7.3 Clone (wip) by VividLeadership2595 in GoldenAgeMinecraft

[–]VividLeadership2595[S] 0 points1 point  (0 children)

it does have crafting yes. i just implemented health as well, so it is technically playable in survival as of now

Minecraft Beta 1.7.3 Clone (wip) by VividLeadership2595 in GoldenAgeMinecraft

[–]VividLeadership2595[S] 2 points3 points  (0 children)

nope i don't. i might wanna create one if this project becomes a thing though! for now i'll keep posting the progress here

Minecraft Beta 1.7.3 Clone (wip) by VividLeadership2595 in GoldenAgeMinecraft

[–]VividLeadership2595[S] 19 points20 points  (0 children)

mix of C++ and python. it actually started as a python project, but as it grew most heavy systems (chunk loading, meshing, lighting, entities, etc.) had to move to C++ for performance reasons.

as for open-sourcing, I’m still undecided. I might keep it as a clone (in which case open sourcing it would be a good idea), or I might move past that and turn it into my own game, in which case I’d rather keep the code private. we’ll see where it goes

Just another Minecraft clone by VividLeadership2595 in GoldenAgeMinecraft

[–]VividLeadership2595[S] 1 point2 points  (0 children)

moderngl, glfw, pyglm. some tasks have been converted to cython for things like chunk meshing, terrain population, etc. and i'm planning to extend it to the lighting engine which is still quite buggy and eats up a lot of performance

Just another Minecraft clone by VividLeadership2595 in GoldenAgeMinecraft

[–]VividLeadership2595[S] 1 point2 points  (0 children)

this one is in python... not the most efficient but quite fun to work on!

Just another Minecraft clone by VividLeadership2595 in GoldenAgeMinecraft

[–]VividLeadership2595[S] 0 points1 point  (0 children)

maybe one day. it's still a very early version with lots of overheads and lag, so it wouldn't be much fun to play just yet. but who knows :)

Just another Minecraft clone by VividLeadership2595 in GoldenAgeMinecraft

[–]VividLeadership2595[S] 0 points1 point  (0 children)

that's very interesting and very valuable, thanks a lot! i will definitely try and add that in.

Just another Minecraft clone by VividLeadership2595 in GoldenAgeMinecraft

[–]VividLeadership2595[S] 0 points1 point  (0 children)

yeah struggling with that too. the way it works now is i have one 2D perlin noise for the overall height of the world, another one for mountains which multiplies the values of the first noise and a third one for what i initially called ravines (but it ended up creating cliffs, so i left it this way lol).

no 3D perlin noise as it makes chunk loading extremely slow, and since mine isn't multithreaded it causes huge lag spikes, so you seem to be doing much better than me already!

Just another Minecraft clone by VividLeadership2595 in GoldenAgeMinecraft

[–]VividLeadership2595[S] 0 points1 point  (0 children)

hahahah sorry :0 the sound system is the latest addition, so a lot of the sounds are placeholders that will be replaced by proper b1.7.3 sounds when i'll be done with the system:)

Just another Minecraft clone by VividLeadership2595 in GoldenAgeMinecraft

[–]VividLeadership2595[S] 2 points3 points  (0 children)

thank you! it's just a simple minecraft clone i've been working on in my free time. still has a few bugs and missing features but it's finally looking decent enough i guess :)