itsapi / pycraft

A Minecraft-inspired game for the terminal
GNU General Public License v2.0
198 stars 21 forks source link

Organise Lighting Rendering #130

Closed olls closed 7 years ago

olls commented 7 years ago

Related to #109.

Idea for simplifying the rendering of lights:

olls commented 7 years ago

Definition of light Z value:

olls commented 7 years ago

https://github.com/itsapi/pycraft/tree/lighting-framebuffer

olls commented 7 years ago

Woo! Speed increase is 5x with around 10 torches on the screen (Very rough: https://docs.google.com/spreadsheets/d/1k7WmXYKTU5azjU4hnFJVy2Sc1SgqH14uuJU_IvflRaU/edit?usp=sharing). Speed difference should go up with no. torches.

Time complexity is roughly something like: (I think...)