-
-
Notifications
You must be signed in to change notification settings - Fork 139
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
"populate noise" step of chunk generation #319
Conversation
The chunk noise generation and population each take like 0.5 seconds, so 1 second per chunk. I'll now start a deep dive into finding optimizations |
Chunk gen times are now ~0.1sec which i think is good enough for now |
This is a very large PR. I'm just curious, what was the methodology of this implementation? |
What do you mean by methodology? |
But basically I would look at the source code, write an equivalent in rust, and then write a bunch of unit tests for correctness. It was not fun lol |
5286d88
to
96b79a2
Compare
If this PR is merged as-is, the default world generation would become that of the populate noise |
Final bench is ~80msec per chunk on my machine. Can likely be improved but I think its good enough for now |
@@ -0,0 +1,158 @@ | |||
package com.example.mixin; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What the hell is this class and why is this in pumpkin-world ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its code to generate the no_bench_no_blend_0_0.chunk file, a fabric mod
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why you don't put it into the extractor/ ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't think about that, I'll do that
~60msec/chunk on my machine with the unsafe code |
Report BUG |
I don't think this is necessarily relevant to this PR, as this PR does not change any spawning code. It might illustrate an upstream bug though |
Isolated the issue to 68949ec likely line 539. I'll make a fix and add a test later today. |
currently benching at ~55msec/chunk now, I think thats adequate for this PR |
extractor/src/main/kotlin/de/snowii/extractor/extractors/Tests.kt
Outdated
Show resolved
Hide resolved
19337ba
to
2a11487
Compare
@Snowiiii should be good to go now I think |
Runs great on my computer, very impressive. But why does it have more loc than Minecraft itself? |
Loc? |
lines of code |
How are the asset files generated? Are they from minecraft? Is it possible to generate them at compile time? each of them are 3MB and that could be a problem to the git repo if they change often (like version updates). |
They're generated from Java, not really able to generate them thru rust... maybe I could write a script to generate and run the tests? But then they couldn't be run with the PR tests. |
Mostly looks good to me. Only few NIT's but i can improve the code later, i would like to have this merged. |
This PR implements (most of) the "populate noise" stage of chunk generation
The blender (for smoothing (i think)) and the beardifier (for leaving space for world structures) are not implemented in this PR
This PR changes the default world gen to this noise generation
Checklist
cargo fmt
cargo clippy