How mentolka1207/my-web-rts works
Tabhold is a browser-based 3D RTS: the player configures and commands an army, manages resources and abilities, and fights AI-driven waves toward victory. The main loop coordinates gameplay and rendering; supporting branches cover procedural maps, tactical movement, presentation, persistence, audio, and the optional worker-based stress test. The README documents several capabilities whose internal call sites were not sampled, so those subsystems are included without speculative links. Evidence is limited to the README and shown source excerpts.
Main entry points: main.js Game Loop · ui.js HUD & Menus · sw.js PWA Cache · input.js Game Input
Components 24
Player & Interface
- Game Input
js/input.js - HUD & Menus
js/ui.js - Translations
js/i18n.js
Combat Simulation
- Game Loop
main.js - Unit Simulation
js/simulation.js - Unit State Logic
js/fsm.js - Wave AI
js/ai.js - Economy
js/economy.js - Resource Nodes
js/resources.js - Units & Abilities
js/units.js - Formations
js/formations.js - Flow Fields
js/flowfield.js - Spatial Hash
js/spatialhash.js - Stress Workers
js/sim_worker.js
World & Rendering
- Procedural Maps
js/maps.js - Terrain
js/terrain.js - 3D Scene
js/scene.js - Procedural Models
js/models.js - GPU Instancing
js/instancing.js - Minimap
js/minimap.js
Game Services
- Procedural Audio
js/audio.js - Local Persistence
js/storage.js - PWA Cache
sw.js
Other components
- Player
Connections 8
- Player → Game Input: issues commands
README.md - Game Loop → Stress Workers: dispatches stress test
main.js - Game Loop → Wave AI: updates enemy AI
main.js - Game Loop → Units & Abilities: updates abilities
main.js - Game Loop → 3D Scene: renders frame
main.js - HUD & Menus → Procedural Audio: starts ambient
js/ui.js - HUD & Menus → Local Persistence: loads profile
js/ui.js - PWA Cache → Player: serves cached app
sw.js