amend todos

This commit is contained in:
catangent 2025-08-04 11:01:34 +01:00
parent 4d22b8783f
commit cbe80ca2df
3 changed files with 17 additions and 14 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Before After
Before After

View file

@ -32,7 +32,7 @@ pub fn moveCamera(camera: *raylib.Camera3D, vec: raylib.Vector3) void {
pub fn createDefaultChunk(a7r: Allocator) !chunks.Chunk {
var chunk = try chunks.Chunk.init(a7r);
// const height_generator = znoise.FnlGenerator{ .seed = 413445 };
const height_generator = znoise.FnlGenerator{ .seed = 413445 };
const tile_type_generator = znoise.FnlGenerator{ .seed = 4435, .frequency = 0.1 };
for (0..32) |raw_x| for (0..32) |raw_y| for (0..32) |raw_z| {
const x: u5 = @intCast(raw_x);
@ -42,9 +42,9 @@ pub fn createDefaultChunk(a7r: Allocator) !chunks.Chunk {
const yf: f32 = @floatFromInt(raw_y);
const zf: f32 = @floatFromInt(raw_z);
const tile_type: u32 = if (tile_type_generator.noise3(xf, yf, zf) > 0) 1 else 2;
// const height: f32 = (height_generator.noise2(xf, zf) + 1) * 16 + @as(f32, if(x > 24) 4.0 else 0.0) + @as(f32, if(z < 8) 4.0 else 0.0);
// if (height >= yf) chunk.setTile(x, y, z, tile_type);
if((xf-16)*(xf-16)+(yf-16)*(yf-16)+(zf-16)*(zf-16) < 16*16) chunk.setTile(x, y, z, tile_type);
const height: f32 = (height_generator.noise2(xf, zf) + 1) * 16;
if (height >= yf) chunk.setTile(x, y, z, tile_type);
// if((xf-16)*(xf-16)+(yf-16)*(yf-16)+(zf-16)*(zf-16) < 16*16) chunk.setTile(x, y, z, tile_type);
};
return chunk;
}

23
todo.md
View file

@ -1,11 +1,14 @@
# current tasks
yoink implementation of mesh into meshes.zig so i could modify it to add ambient occlusion vars
implement ambient occlusion either
- via passing extra info to shader (can use 132 bits to indicate what tiles around the quad are obsuring light. need to pass as an extra variable)
implement animations (smooth or minecraft like), random orientation/mirroring, metallicity (shine on edges)
implement second layer of textures on top of first one for more details
limit vertical camera rotations
# world generation
1. world state "object" which will keep track of chunks to generate, to remove, to keep, those that are currently being generated in a thread pool.
2. parallelised creeping chunk generation in a radius.
3. removing of chunks when they go outside the radius.
4. interlinked chunks; each chunk should have a ptr to the 26 neighbor chunks or null.
5. world state linking and unlinking chunks automatically.
6. ambient occlusion spanning between chunks.
7. chunk loading, unloading, saving/loading from files; world state keeping track of chunks loaded and unloaded as well
8. generation of (LOD) simplified chunk models
9. generation of simplified chunks
10. separate LOD radiuses for different LOD levels
11. partial chunk loading and unloading.
# future tasks
implement chunk meshing cache to reduce delay on block placement
investigate binary/SIMD meshing for performance
# directional light