-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Light chart precalculation #490
Comments
|
I'm coming to the conclusion that the first thing that should be done here is to set up the compile-time chart creation. However, this is tricky to achieve:
After experimenting with option 1, I'm currently leaning towards option 2, because I had previously contemplated an “all-is-cubes-math” crate split. I didn't complete it at the time because I was hoping for compilation time improvements, but testing did not show clear benefit — but this is a better reason to have one: making core algorithms available as part of the compilation process of the central game-mechanics crate. The downside, of course, is that we have more crates to manage and more public-API-only boundaries. |
Crate split done in 52716b2. |
Commit fb61ca0 switches the light ray data from being Rust source code to being raw |
Commit 18caabe adds the full build-time precomputation, and also makes the representation smaller (primarily by using |
Commit f40f290 introduced the "
propagation_table
" for pre-computed light ray propagation data. This improved light update performance, but computing it is a significant cost when constructing a newSpace
.The obvious solution is to memoize the table, but I think we should go farther. Components of the solution:
ChunkChart
”).relative_ray_to_here
and synthesizing the debug visualization rays instead. (This will be more or less necessary for the tree-shapedness anyway.)The text was updated successfully, but these errors were encountered: