Comment

Comment by SquareWheel

I remember Notch talking about the lighting calculations being one of the hardest parts to program, so I can understand that being a challenge.

Mojang made large improvements to the lighting engine in 1.20, bringing it in line with the performance mods Phosphor[1] and Starlight[2]. Despite being deprecated now, they might still offer some useful insight into how to approach such a system in a performant way. You'll need to be mindful of the licenses, but it's likely easier than reverse-engineering Minecraft (even with mappings).

[1] https://github.com/CaffeineMC/phosphor-fabric

[2] https://github.com/PaperMC/Starlight

parent SquareWheel 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton