804aec6a11
M2.4: combat loop e2e + unit data fields
...
- Unit.js: add health/armor to entity data
- CombatSystem.js: integration hooks for M2 combat loop
- EntityStateMachine.js: orchestrator.registerEntity refactor
- playwright.config.js: M2 e2e config
- tests/e2e/combat-loop.{spec,e2e}.js: M2 combat loop verification
- tests/e2e/milestone-2-combat-loop.spec.js: M2 acceptance test
- .gitignore: exclude debug scripts + screenshots from commits
2026-06-27 16:44:41 +00:00
dc7f6e72ad
M2.3: Fix ProjectileSprite test mock — add setVelocity to body, align assertions with implementation (4/4 tests pass)
2026-06-01 05:24:30 +00:00
8fc45968b5
M2.3 + M2.4 + TeamManager integration: projectile sprites, death handling, build menu, production panel, building placer
...
- ProjectileSprite.js: physics arcade sprite, faction tint, off-screen culling
- CombatSystem: refactored enemy selection to use TeamManager instead of legacy containers
- Death handling: DYING alpha tween (500ms), smoke puff (300ms), unit:killed event, cleanup
- TeamManager: centralized team registry replacing goodGuys/badGuys containers
- HealthBarSystem, ResourceBar, CaptureProgressUI, BuildMenu, BuildingPlacer, BuildingRenderer, ProductionPanel
- Map_Player: wired new subsystems, removed legacy container creation
- Tests: ProjectileSprite (4), DeathHandling (13), CombatSystem updated
47 tests passed at dev time (M2.3), 158/158 at dev time (M2.4)
2026-06-01 05:18:33 +00:00
91d1ca3459
M2.1: Wire CombatSystem auto-engage — getEnemyContainer, range config, update loop, state machine tick, Infantry/Tank delegation, 53 tests pass
2026-05-30 06:30:34 +00:00
d2e3c8e385
M1.3: UnitFactory + deferred spawning — RED→GREEN (4 tests)
...
- Added src/systems/UnitFactory.js with spawnInfantry() and spawnTank()
- Wires into Map_Player.create() with goodGuys/badGuys containers
- Auto-spawn conditional: skip createInfantry() when connected to Colyseus
- Spawns 2 test infantry on game start for immediate testing
- createInfantry() made defensive — won't recreate containers if they already exist
- 4 new tests: team assignment (player/enemy), container routing, multiple spawns
- 10 JS suites pass (170 tests), zero regressions against pre-existing baseline
2026-05-30 05:41:57 +00:00
9436d4eab3
M1.1: Fix PathfindingSystem tile size — 64→32 via config injection
...
PathfindingSystem constructor now accepts optional {tileWidth, tileHeight}
config param with 64px defaults for backward compat.
SystemOrchestrator.initPathfinding() reads tilemap.tileWidth/tileHeight
and passes them through. Verification console.log added to initGrid().
6 new tests:
- Constructor accepts config / defaults to 64 / empty config → 64
- worldToTileCoords: 32px tiles → (1,1), 64px tiles → (2,1), default
All 32 PathfindingSystem tests pass, zero regressions (167 total).
2026-05-30 05:34:52 +00:00
3fc29f728e
feat: Colyseus authoritative server + invite-code lobby
...
- Replace socket.io relay with Colyseus 0.15 authoritative server
- GameRoom with GameState schema (players, units, resources)
- Pure TS services: CombatResolver, EconomyService, PathfindingService, UnitManager
- POST /api/create-room → 4-char invite code
- React/MUI LobbyScreen: Create (shows code + START GAME) / Join by code
- ColyseusClient: joinOrCreate/join by room type = invite code
- Nginx: static assets direct, all else proxied to Colyseus (WS upgrade)
- Content-hashed JS bundles for Cloudflare cache-busting
- 1-player lobbies: START GAME button bypasses 2-player wait
2026-05-30 02:49:20 +00:00
root
2e07519648
Refactor: Component-based architecture + 10 sub-systems
...
- Implemented 10 sub-systems (Economy, Pathfinding, Combat, Selection, Network, Map, Entity/Building/ControlPoint state machines, Orchestrator)
- Refactored Custom_Entity.js → Unit.js with 5 components (health, owner, inventory, movement, combat)
- Added Jest test suite with 100+ tests (EconomySystem 100%, EntityStateMachine 100%, PathfindingSystem 99%, Unit.js 72%)
- All webpack builds pass (0 errors)
- BMAD-auto team-respawn flow: 10 parallel sub-agents implemented systems
Architecture: Phaser 3 + XState + socket.io + EasyStar
Mode: team-respawn
Model: custom/ollama-cloud-pro
2026-05-29 22:13:44 +00:00