Giter VIP home page Giter VIP logo

starlight's Introduction

Starlight (Fabric)

Fabric mod for completely rewriting the vanilla light engine.

Future updates past 1.20

Please see: https://gist.github.com/Spottedleaf/6cc1acdd03a9b7ac34699bf5e8f1b85c This project will not receive further updates for the foreseeable future.

Download

CurseForge (Fabric) Modrinth (Fabric)

Contact

Discord

Results

The graph below shows how much time the light engine was active while generating 10404 chunks: See "Notice about invalid gen test results" in TECHNICAL_DETAILS.md for why there is no 1.20 data for this test.

Below is a graph detailing how long light updates took for breaking/placing a block on a large platform at y = 254 down to a large platform at y = 0: Block update at height graph

  • Tested via LightBench on 1.20-rc1
  • World is just a flat world with bedrock at y = 0 and grass at y = 254
  • CPU: Ryzen 9 7950X

Below is a graph detailing light update times for a simple glowstone place/break: Simple glowstone block update

  • Tested via LightBench on 1.20-rc1
  • World is just a flat world with bedrock at y = 0 and grass at y = 254
  • CPU: Ryzen 9 7950X
  • Tested breaking and placing the glowstone on the bedrock platform, where skylight could not interfere with the test.

The results indicate that Starlight is faster for light propagation, but the absolute times indicate that it is unlikely to affect FPS in any situation on the client.

Purpose

Currently, Starlight's light section management is depended on for both Paper's rewrite of the chunk system (people in the modding space call this "TACS") and Folia's additional changes to that system. In Starlight, light sections are tied directly to ChunkAccess objects.

The light section management prevents most bugs (including performance ones) involving missing/absent light sections, as Starlight assumes that no updates are possible unless the chunk exists. This is why there are basically zero performance or bug related issues with the light section management in Starlight.

This difference in light section management allows Paper's rewrite of the chunk system (which is designed as a solid base for Folia to build on, which adds regionized multithreading to the dedicated server) to greatly simplify and optimize its chunk unload/load logic as it no longer needs to consider any light engine state as there is no light engine state.

The "stateless" property of Starlight allows the chunk system to run light updates / generation in parallel provided the scheduling is done right, see patch "Increase parallelism for neighbour writing chunk statuses" in 1.19 Folia. This is critical to allowing the chunk system to scale beyond 10 worker threads, which is important for dedicated servers with more players to stress chunk generation.

starlight's People

Contributors

spottedleaf avatar kennytv avatar jpenilla avatar aeiouenigma avatar ims212 avatar bluelhf avatar noahvdaa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.