summaryrefslogtreecommitdiff
path: root/src/LivingVillage.Desktop/Game.fs
diff options
context:
space:
mode:
authorSomhairle H. Marisol <[email protected]>2026-09-21 13:18:35 +0800
committerSomhairle H. Marisol <[email protected]>2026-09-21 13:18:35 +0800
commit3849252be9ee5a6b9ad6b31b0fe1a19767621baa (patch)
tree2a865e28cafa03e0b8f229baa88f5117f31db75c /src/LivingVillage.Desktop/Game.fs
parentbe8c9eacb884faf22299edb24955e1084be2747f (diff)
downloadliving-village-3849252be9ee5a6b9ad6b31b0fe1a19767621baa.tar.gz
feat(desktop): 标题画面两秒确定性入场动画
entranceProgress 纯函数按帧计数(固定 60Hz 步长,禁实时时钟):黛瓦天际线自上 36px 落定、标题自下 24px 升起、水面带 2s 淡入、灯笼/面板同步;快照回归断言进度锚点(0/60/120/超时)与确定性;LV_AUTOPLAY_FLOW 标题停留 60 帧可直接采样入场过程。
Diffstat (limited to 'src/LivingVillage.Desktop/Game.fs')
-rw-r--r--src/LivingVillage.Desktop/Game.fs18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/LivingVillage.Desktop/Game.fs b/src/LivingVillage.Desktop/Game.fs
index 9464c8b..51fa74d 100644
--- a/src/LivingVillage.Desktop/Game.fs
+++ b/src/LivingVillage.Desktop/Game.fs
@@ -595,19 +595,22 @@ type LivingVillageGame() as this =
let y1 = if index = bandCount - 1 then height else y0 + bandHeight
spriteBatch.Draw(pixel, Rectangle(0, y0, width, y1 - y0), Color(band.R, band.G, band.B))) layout.SkyBands
- // Jiangnan skyline: eave tiles continuously, ridge tiles rising above them.
+ // Deterministic 2s entrance: skyline settles from above as the progress unwinds.
+ let entrance = TitleScreen.entranceProgress hudClock
+ let skylineDrop = int (36.0f * entrance)
List.iteri (fun column slot ->
let x = column * Sim.tilePixels
let source = VillageArt.atlasTileRectangle slot
if slot = fst TitleScreen.roofSlots then
- spriteBatch.Draw(artTextures.TileAtlas, Rectangle(x, layout.RidgeY, Sim.tilePixels, Sim.tilePixels), source, Color.White)
- spriteBatch.Draw(artTextures.TileAtlas, Rectangle(x, layout.EaveY, Sim.tilePixels, Sim.tilePixels), VillageArt.atlasTileRectangle (snd TitleScreen.roofSlots), Color.White))
+ spriteBatch.Draw(artTextures.TileAtlas, Rectangle(x, layout.RidgeY + skylineDrop, Sim.tilePixels, Sim.tilePixels), source, Color.White)
+ spriteBatch.Draw(artTextures.TileAtlas, Rectangle(x, layout.EaveY + skylineDrop, Sim.tilePixels, Sim.tilePixels), VillageArt.atlasTileRectangle (snd TitleScreen.roofSlots), Color.White))
layout.RoofTileSlots
// Water band drawn from the atlas water tile, reflecting the skyline above.
+ let waterColor = Color(150, 170, 178, int (255.0f * (1.0f - entrance)))
for row in layout.WaterRows do
for x in 0 .. Sim.tilePixels .. width - 1 do
- spriteBatch.Draw(artTextures.TileAtlas, Rectangle(x, row, Sim.tilePixels, Sim.tilePixels), VillageArt.atlasTileRectangle TitleScreen.waterSlot, Color(150, 170, 178))
+ spriteBatch.Draw(artTextures.TileAtlas, Rectangle(x, row, Sim.tilePixels, Sim.tilePixels), VillageArt.atlasTileRectangle TitleScreen.waterSlot, waterColor)
// Lantern glows along the water bank.
let lanternColor, lanternHalo = TitleScreen.lanternColors
@@ -617,9 +620,10 @@ type LivingVillageGame() as this =
spriteBatch.Draw(pixel, Rectangle(lx - 1, ly - 7, 4, 2), Color(90, 60, 40))
spriteBatch.Draw(pixel, Rectangle(lx - 2, ly + 5, 6, 2), Color(90, 60, 40))
- // Title: large CJK atlas glyphs with a soft shadow for readability.
- PixelText.draw spriteBatch pixel cjkAtlas (layout.TitleX + 4) (layout.TitleY + 4) layout.TitleScale (Color(12, 20, 28)) layout.TitleText
- PixelText.draw spriteBatch pixel cjkAtlas layout.TitleX layout.TitleY layout.TitleScale (Color(235, 246, 232)) layout.TitleText
+ // Title rises into place as the entrance progress unwinds.
+ let titleLift = int (24.0f * entrance)
+ PixelText.draw spriteBatch pixel cjkAtlas (layout.TitleX + 4) (layout.TitleY + titleLift + 4) layout.TitleScale (Color(12, 20, 28)) layout.TitleText
+ PixelText.draw spriteBatch pixel cjkAtlas layout.TitleX (layout.TitleY + titleLift) layout.TitleScale (Color(235, 246, 232)) layout.TitleText
// Menu panel floats over the lower half; translucent so the scene layers stay visible.
spriteBatch.Draw(pixel, Rectangle(panelX, panelY, panelWidth, panelHeight), Color(11, 19, 27, 200))