summaryrefslogtreecommitdiff
path: root/src/LivingVillage.Desktop/VillageArt.fs
diff options
context:
space:
mode:
authorSomhairle H. Marisol <[email protected]>2026-09-21 15:06:03 +0800
committerSomhairle H. Marisol <[email protected]>2026-09-21 15:06:03 +0800
commit87aa4594ffe395318364feae9fd157d52b60a082 (patch)
tree099b328b7996a98cd5e26631508bedb5a0d15ed3 /src/LivingVillage.Desktop/VillageArt.fs
parentab19df0ebad8da972cd30f89f7cfd8ef38b8c0ae (diff)
downloadliving-village-87aa4594ffe395318364feae9fd157d52b60a082.tar.gz
feat(desktop): 512x384 程序生成地图与巡游取证模式
ProceduralMap 纯函数生成器:splitmix64 随机游走河道(三条西→东,宽 3,穿核心禁入)、三倍频值噪声草地/泥炭变化、泊松式最小距离布点(800 次尝试),村核矩形(24..38 x 16..34)由生成器不变式保证可通行;VillageArt 于大世界模式下按 terrain code 逐格绘制(可视化范围裁剪,无每帧分配);Game 新增 LV_MAP_SCALE(默认 1,表示规模倍数)与 LV_MAP_TOUR 巡游采样(八个地标位置含角/中心/河带);快照回归断言:同 seed 逐字节一致、异 seed 必然差异、核心矩形无水面。
Diffstat (limited to 'src/LivingVillage.Desktop/VillageArt.fs')
-rw-r--r--src/LivingVillage.Desktop/VillageArt.fs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/LivingVillage.Desktop/VillageArt.fs b/src/LivingVillage.Desktop/VillageArt.fs
index efed4ee..f72c0f3 100644
--- a/src/LivingVillage.Desktop/VillageArt.fs
+++ b/src/LivingVillage.Desktop/VillageArt.fs
@@ -448,7 +448,25 @@ module VillageArt =
drawWorldTile spriteBatch textures camera viewportWidth viewportHeight position sprite tint
let rippleFrame = waterFrameTick tick
+ // Procedural terrain for the 512x384 large world: water/pebble/peat codes map
+ // onto the jiangnan atlas sprites with deterministic ripple continuity.
+ let drawTerrainTile (position: TilePosition) (code: int) =
+ match code with
+ | 1 -> draw position (if rippleFrame = 0 then WaterSprite else WaterSpriteB)
+ | 2 -> draw position StonePathSprite
+ | 3 -> draw position StonePathSprite
+ | _ -> draw position GrassSprite
+
let drawBaseTile (position: TilePosition) =
+ match ProceduralMap.terrainOption, ProceduralMap.bigWorldActive with
+ | (Some terrain, true) ->
+ let tx, ty = position.X, position.Y
+ let code = terrain.Tiles.[ty * ProceduralMap.width + tx]
+ drawTerrainTile position code
+ | _ ->
+ match textures.Cc0TileAtlas with
+ | Some cc0 -> drawCc0Tile spriteBatch cc0 tint (cc0GroundRect position) (position.X * Sim.tilePixels - int camera.X) (position.Y * Sim.tilePixels - int camera.Y)
+ | None -> draw position GrassSprite
match textures.Cc0TileAtlas with
| Some cc0 -> drawCc0Tile spriteBatch cc0 tint (cc0GroundRect position) (position.X * Sim.tilePixels - int camera.X) (position.Y * Sim.tilePixels - int camera.Y)
| None -> draw position GrassSprite