yay
- JavaScript 91.2%
- CSS 6.3%
- HTML 1.5%
- Python 1%
| assets | ||
| css | ||
| docs | ||
| js | ||
| scripts | ||
| .htaccess | ||
| app_manifest.json | ||
| index.html | ||
| PATCH_NOTES.md | ||
| README.md | ||
| service-worker.js | ||
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. Current inspected version: 15.20.16.
Edit contract
- Preserve Japanese in-game UI tone and strings.
- Do not edit
docs/prompt.txt; it is external user material. - Use
app_manifest.jsonas the source of truth for CSS/JS load order and service-worker cache entries. - Run
python3 scripts/generate_app_files.pyafter version or asset-list changes. - Run
node --check js/*.js service-worker.jsbefore 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.
Player-facing surface
- Startup uses a loading overlay that eagerly preloads a small sprite set, initializes UI/world state, then defers remaining image work.
- Field choices are cage, garden, and park.
FIELD_TYPEScontrols world scale, starting population, initial grass count, and responsive field height. - The default field is garden. Reset opens the field dialog; cancel keeps the current field.
- Tools are grouped in collapsible categories: operation/observation, food/water/grass, medicine/effects, habitat/living things, hazards/obstacles.
- The top bar owns pause, speed, ecology, sound, credits, and reset controls. Event push toasts live inside the Event card, while sound category toggles live only in the sound menu.
- The colony panel charts population, mental state, environment, and object counts. The family tree is a separate main section with manual/auto refresh and reset controls.
- Mobile operation modes are available only on compact touch-first phone viewports: auto, camera, tool, family.
Core systems
World:js/world.jsplusjs/world_*.js; time, weather, placement, effects, family records, spatial queries, ants, combat, logging.Tarinai:js/tarinai.jsplusjs/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.ItemVisualRegistry:js/item_visual_registry.js; canonical item visuals used by field sprites and generated icon previews.EffectRegistry:js/effect_registry.js; item-effect names, modifiers, exclusivity, display metadata, random-effect candidates.DiseaseRegistry:js/disease_registry.js; disease flags, labels, display metadata, cure-rule notes, mystery-drug eligibility.FoodRegistry:js/food_registry.js; serving classes, labels, decay, hygiene penalty, special effect IDs.InputModeManager:js/input_mode_manager.js; mobile/touch classification, gesture capability policy, mode persistence.WeatherSystem:js/weather_system.js; weather state transitions and rain-spawned water items.Audio:js/sound_pack.jsowns sound metadata;js/audio.jsloads samples, applies settings, enforces cooldowns, and runs synthetic fallbacks.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;
TarinaiInputMode.snapshot().touchFirstcontrols body classtouch-mobile-ui. - 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.jsdrawing helpers, never separate designs.