Comments (8)
Just stumbled over this project, looks awesome! I thought i'd try to play around with this a bit to learn about spec.
What about a System
which goes through all BlockUpdateEvent
s and recalculates lighting in every chunk which has been updated?
from feather.
Just stumbled over this project, looks awesome! I thought i'd try to play around with this a bit to learn about spec.
What about a
System
which goes through allBlockUpdateEvent
s and recalculates lighting in every chunk which has been updated?
Lighting would be stored in the Chunk
, as it is in vanilla, in two compact arrays. See https://wiki.vg/index.php?title=Chunk_Format&diff=14678&oldid=14646#Chunk_Section_structure.
As a starting point, going through BlockUpdateEvent
s and recalculating the entire chunk would be fine. We would want to optimize the algorithm so that only blocks affected by light updates are recalculated, and not the entire chunk.
from feather.
that sounds reasonable.
I think a good approach would be to store all light sources in each chunk. When a light source is placed/destroyed, we just increase/decrease the light-level of surrounding blocks. When a normal block is placed/broken though, we'll have to go through all light sources (which are close) and recalculate their light. What do you think?
For this it'd be nice to create a struct similar to ChunkMap
which just stores the light sources, soemthing like HashMap<ChunkPosition, Vec<(BlockPosition, LightLevel)>>
.
from feather.
@NyxCode Yes, that will work. To start, we should probably resolve #103 so that existing lighting data is loaded. This will also involve adding the light storage in Chunk
.
Glad to see some interest in this project!
from feather.
yeah, i'll look at that first! I don't have a lot of time, but this project looks great!
Is there a place for discussions/questions except github issues? maybe a discord server?
from feather.
Is there a place for discussions/questions except github issues? maybe a discord server?
Well, the project didn't have any publicity until it ballooned yesterday, so we don't really have a community or discussion place. I could make a Discord server, but given the early state of the project, I'm not sure if there's a need yet.
from feather.
:D the post on the rust subreddit, huh?
I mean, it's your call, but I could imagine that a place for discussion on the development would be usefull.
from feather.
I mean, it's your call, but I could imagine that a place for discussion on the development would be usefull.
I guess I agree; here's the Discord server. https://discord.gg/4eYmK69
from feather.
Related Issues (20)
- Change the representation of BlockPosition. HOT 4
- # Basic permission level HOT 1
- Improve github workflow HOT 2
- Make it easy to test plugins, and Implement test suite for them. HOT 1
- Modify block placement code in chunk.rs to update heightmaps.
- Permissions Registry & Support for Vanilla's OP System HOT 1
- Durability data missing, results in function that always returns None.
- Send entity equipment packet
- Server with IPv6 address on Linux HOT 2
- Roadmap HOT 1
- Make SessionServer an environment property.
- Request for changing the goals - to motivate contributors - to make the project thrive HOT 12
- Rewrite it in C HOT 4
- Reducing Compile Time HOT 8
- How to get to know the feather? HOT 5
- Question about code redundancy
- QUIC plugin system HOT 1
- Adding "Support" button for organization or author & contributors HOT 2
- issues using `cargo vendor` HOT 1
- error while compiling
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from feather.