tarinai/README.md
2026-06-21 16:26:12 +09:00

2.3 KiB

Tarinai Colony Observation Game

Buildless single-page browser simulation. Open index.html; no package manager, transpiler, server API, or module loader is required. Runtime order is explicit <script defer> order generated from app_manifest.json.

Edit contract

  • Preserve Japanese in-game UI tone and strings.
  • Do not edit docs/prompt.txt; it is external user material.
  • Use app_manifest.json as the source of truth for CSS/JS load order and service-worker cache entries.
  • Run python3 scripts/generate_app_files.py after version or asset-list changes.
  • Run node --check js/*.js service-worker.js before zipping.
  • Verify ZIP integrity with zip -T.

Documentation map

  • docs/ARCHITECTURE.md: runtime architecture, file ownership, system boundaries.
  • docs/CONTENT_GUIDE.md: item visuals, UI/field visual parity, audio, bubble text inventory.
  • docs/MAINTENANCE.md: release process, validation, debugging, cache/version rules.
  • docs/prompt.txt: untouched user prompt/context archive.

Core systems

  • World: js/world.js plus js/world_*.js; time, weather, placement, effects, family records, spatial queries, ants, combat, logging.
  • Tarinai: js/tarinai.js plus js/tarinai_*.js; identity, personality, needs, items, disease, movement, social behavior, rendering.
  • Item: js/items.js; lifecycle, scaling, field rendering. Field rendering is the visual source of truth for tool icons.
  • EffectRegistry: js/effect_registry.js; item-effect names, exclusivity, display metadata, random-effect candidates.
  • Audio: js/audio.js + js/sound_pack.js; category toggles, synthetic fallbacks, sample paths, per-ID volume/cooldown.
  • Performance: js/performance_manager.js; FPS quality level, ant stride, effect budget, terrain redraw cadence.

Current high-risk areas

  • Item effects touch effect_registry, tarinai_item_effects, tarinai_needs_items, items, and selected-info UI.
  • Mobile input must remain hidden on desktop-class devices; use body class touch-mobile-ui only for compact no-hover coarse-pointer devices.
  • Weather rain overlay is diagonal line streaks. Fallen water items, zunda juice, and mercury share the same horizontal oval item-droplet silhouette; recolor only.
  • Tool UI icons must be generated previews of js/items.js drawing helpers, never separate designs.