From 7f147a1293df66d00cc24353cff9a58ed72416cc Mon Sep 17 00:00:00 2001 From: szdytom Date: Sun, 3 Aug 2025 01:03:22 +0800 Subject: [PATCH] chore: update formatting penalties in .clang-format and clean up .gitignore; remove outdated testing and validation sections from developer guide Signed-off-by: szdytom --- .clang-format | 4 ++-- .gitignore | 1 + tilemap/docs/dev.md | 41 ----------------------------------------- 3 files changed, 3 insertions(+), 43 deletions(-) diff --git a/.clang-format b/.clang-format index f2d1033..e8f6fe1 100644 --- a/.clang-format +++ b/.clang-format @@ -92,7 +92,7 @@ MacroBlockBegin: '' MacroBlockEnd: '' MaxEmptyLinesToKeep: 1 NamespaceIndentation: None -PenaltyBreakAssignment: 2 +PenaltyBreakAssignment: 500 PenaltyBreakBeforeFirstCallParameter: 1 PenaltyBreakComment: 300 PenaltyBreakFirstLessLess: 120 @@ -101,7 +101,7 @@ PenaltyBreakString: 1000 PenaltyBreakTemplateDeclaration: 10 PenaltyExcessCharacter: 1000000 PenaltyReturnTypeOnItsOwnLine: 200 -PenaltyIndentedWhitespace: 0 +PenaltyIndentedWhitespace: 1 PointerAlignment: Right PPIndentWidth: -1 ReferenceAlignment: Pointer diff --git a/.gitignore b/.gitignore index 0a2e5c2..41e967f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.cache/ .vscode/ build/ *.out diff --git a/tilemap/docs/dev.md b/tilemap/docs/dev.md index f08ce2f..43534c4 100644 --- a/tilemap/docs/dev.md +++ b/tilemap/docs/dev.md @@ -166,44 +166,3 @@ void TerrainGenerator::my_custom_pass(TileMap &tilemap) { } } ``` - -## Testing and Validation - -### Determinism Testing - -Verify same seed produces identical output across runs: -```cpp -auto seed = Seed::from_string("test"); -TileMap map1(4), map2(4); -map_generate(map1, {seed}); -map_generate(map2, {seed}); -// Verify map1 == map2 -``` - -### Distribution Analysis - -Check terrain type distributions match biome properties: -- Count tile types per biome -- Verify ratios within acceptable tolerance -- Test with multiple seeds for statistical significance - -### Visual Validation - -Export maps to image formats for visual inspection: -- Check for realistic terrain patterns -- Verify biome transitions look natural -- Ensure no artifacts from generation passes - -## Future Extensions - -### Potential Improvements - -- **Surface Feature Generation**: Trees, structures, resources -- **Elevation System**: Height maps for 3D terrain -- **River Generation**: Connected water systems -- **Chunk Streaming**: Dynamic loading for large worlds -- **Multithreading**: Parallel chunk generation - -### API Stability - -Core interfaces (TileMap, Chunk, Tile) are stable. Generation system is designed for extensibility without breaking existing code.