implement infinite worlds with threaded chunk generation

This commit is contained in:
Alex Zenla
2024-09-03 09:18:35 -04:00
parent 6f985ce1c9
commit 5e40e12c8b
7 changed files with 133 additions and 18 deletions

View File

@ -1,4 +1,9 @@
struct WorldGenerator {
protocol WorldGenerator {
mutating func reset(seed: UInt64)
func makeChunk(id: SIMD3<Int>) -> Chunk
}
struct StandardWorldGenerator: WorldGenerator {
var noise: ImprovedPerlin<Float>!, noise2: SimplexNoise<Float>!
public mutating func reset(seed: UInt64) {