How dead4w/kriegsspiel_frontend works
Kriegspiel Frontend is a Vue tactical-wargame client. Its main workflow is navigating to or creating a room, joining a match, issuing orders and viewing the evolving battlefield; the client also provides account, chat, administration, and resource-pack editing features. The map engine supports 2D and 3D rendering, input, and game-state logic. The tree and excerpts establish the major subsystems, but most component-to-engine wiring was not sampled, so uncertain links are omitted.
Main entry points: gameUI.vue Game UI · world.ts World State · index.ts Router and Auth · renderOrchestrator.ts Render Orchestrator
Components 23
Application
- Vue App
src/App.vue - Router and Auth
src/router/index.ts - Home and Room Views
src/views - Account and Profile
src/views/ProfileView.vue
Rooms and Match
- HTTP API Client
src/api/client.ts - Realtime Socket
src/api/socket.ts - Room Experience
src/components/room/Game.vue - Game UI
src/components/gameUI.vue - Chat and Battle Log
src/components/KringChat.vue - Room Administration
src/components/tools/AdminTool.vue
Game Simulation
- Order Planning
src/game/commands - Unit Commands
src/engine/units/commands/index.ts - Units and Triggers
src/engine/units - World State
src/engine/world/world.ts
Battlefield Engine
- Map Input
src/engine/2d/input/index.ts - Render Orchestrator
src/engine/orchestrators/renderOrchestrator.ts - 2D Renderer
src/engine/2d/render/index.ts - 3D Renderer
src/engine/3d/render/index.ts
Settings and Packs
- Resource Pack Editor
src/views/ResourcePackCreatorView.vue - Resource Pack Rules
src/engine/resourcePack - Client Settings
src/enums/clientSettingsKeys.ts
Other components
- Player
- Game Backend
Connections 22
- Player → Vue App: opens
- Vue App → Router and Auth: displays routes
- Router and Auth → Home and Room Views: selects view
- Router and Auth → HTTP API Client: checks auth
- HTTP API Client → Game Backend: HTTP requests
- Realtime Socket → Game Backend: realtime messages
- Player → Room Experience: joins match
- Room Experience → Game UI: presents match
- Player → Game UI: uses controls
- Game UI → Chat and Battle Log: shows chat
- Game UI → Room Administration: offers admin tools
- Player → Order Planning: plans orders
- Order Planning → Unit Commands: applies orders
- Unit Commands → Units and Triggers: updates units
- Units and Triggers → World State: updates state
- Map Input → World State: changes world
- Render Orchestrator → 2D Renderer: creates 2D renderer
- Render Orchestrator → 3D Renderer: creates 3D renderer
- World State → Render Orchestrator: supplies scene state
- Player → Resource Pack Editor: edits pack
- Resource Pack Editor → Resource Pack Rules: configures rules
- Client Settings → World State: emits setting changes