a37eb14ba54ca6b051a7e31a9512f94fd4b167b2
- Introduced a JSON schema for game levels to validate level data structure. - Added comprehensive tests for tilemap functionalities including collision resolution, tile type retrieval, and level loading. - Enhanced the SyncSystem to manage remote state synchronization and interpolation for smoother gameplay. - Implemented an AudioSystem with tests to ensure audio loading and playback functionality. - Updated NetworkClient to support dynamic WebSocket URLs from environment variables. - Added integration tests for matchmaking and network communication between clients. - Improved RenderSystem to correctly render player nicknames above sprites. Co-authored-by: Copilot <copilot@github.com>
ZAMNY Client
Vite + TypeScript + Canvas 2D + ECS game client for Zombies Ate My Neighbors browser edition.
Quick Start
npm install
npm run dev # http://localhost:5173
npm test # vitest (ECS tests)
npm run build
Structure
src/
engine/
ecs.ts # World, Entity, Component, System base
ecs.test.ts # 6 unit tests (green)
systems/
InputSystem.ts # keyboard/touch stub
RenderSystem.ts # Canvas 2D stub
PhysicsSystem.ts # movement/collision stub
main.ts # 60 FPS game loop + system orchestration
Key Points
- ECS core:
createEntity,addComponent,query,destroyEntity - Systems extend
Systemand implementupdate(world, dt) - Target: 60 FPS, offline single-player works without server
- Nickname UI, NetworkClient, sprite rendering: TODO
Testing
- Vitest + jsdom
npm testrunsecs.test.ts- Coverage target: 70% (documented in ARCHITECTURE.md §10)
See root README.md and ARCHITECTURE.md for full design.
Description
Languages
TypeScript
90.9%
CSS
8.5%
HTML
0.6%