From 87aa4594ffe395318364feae9fd157d52b60a082 Mon Sep 17 00:00:00 2001 From: "Somhairle H. Marisol" Date: Mon, 21 Sep 2026 15:06:03 +0800 Subject: feat(desktop): 512x384 程序生成地图与巡游取证模式 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ProceduralMap 纯函数生成器:splitmix64 随机游走河道(三条西→东,宽 3,穿核心禁入)、三倍频值噪声草地/泥炭变化、泊松式最小距离布点(800 次尝试),村核矩形(24..38 x 16..34)由生成器不变式保证可通行;VillageArt 于大世界模式下按 terrain code 逐格绘制(可视化范围裁剪,无每帧分配);Game 新增 LV_MAP_SCALE(默认 1,表示规模倍数)与 LV_MAP_TOUR 巡游采样(八个地标位置含角/中心/河带);快照回归断言:同 seed 逐字节一致、异 seed 必然差异、核心矩形无水面。 --- src/LivingVillage.Desktop/VillageArt.fs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/LivingVillage.Desktop/VillageArt.fs') 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 -- cgit v1.2.3