Repository navigation
π AstroParty Update: Map Editor, Dynamic Maps & Network Optimization
This release introduces a comprehensive Map Editor, dynamic map sizing support, major networking optimizations, and significant quality-of-life improvements.
β¨ New Features
πΊοΈ Dynamic Map System
Dynamic Map Support: The game now supports maps of varying sizes (from 10x10 to 100x60).
Auto-Scaling: Client renderer automatically adjusts block size to fit any map within the 1920x1080 viewport.
Physics Adaptation: Server-side physics engine now respects dynamic map boundaries for wrapping, collisions, and spawning.
Metadata Display: Map name and author are now displayed on the game background.
π¨ Map Editor
New Tool: Web-based Map Editor running on port 3002.
Features:
Visual grid editing (Wall brush, Eraser).
Quick actions (Clear, Fill, Border).
Resizable grid support.
Metadata editing (Name, Author).
Live ASCII preview.
Import/Export functionality.
Dockerized: Fully integrated into docker-compose.yml
β‘ Power-Ups (Stabilization)
Fix: Resolved issues with power-up expiry notifications not sending correctly.
Fix: Fixed memory leaks in setTimeout timers for power-up respawns.
Optimization: Improved state synchronization for active power-ups.
π οΈ Technical Improvements
π‘ Networking & Performance
Compression: Enabled Socket.IO compression for reduced bandwidth usage.
Optimized Map Sync: Implemented mapSync event to send static map data separate from the high-frequency game loop.
Payload Optimization: Reduced gameState packet size by removing redundant static data.
Memory Safety: Cleared potential memory leaks in physics engine timers on player disconnect.
π Architecture & Docker
Standardized Map Format: New .map.txt format with metadata header: - Name | Author | WxH.
Single Source of Truth: Consolidated all maps to ./maps directory at project root.
Hot-Reload Maps: Configured Docker volume mounting (./maps:/app/packages/server/maps) to allow adding maps without rebuilding containers.
Robust Loading: Server now gracefully handles missing directories and validates map paths.
π Bug Fixes
Fixed ENOENT crash when loading maps in Docker environment.
Fixed mobile controller safe area padding.
Fixed BLOCK_SIZE hardcoding in client renderer.
Fixed "spawning inside walls" issue on custom maps.
Resolved TypeScript errors across server, client-display, and shared packages.
π¦ Migration Guide
For existing maps:
Add the new header line to your .txt files: - Map Name | Author Name | 32x18
Rename files to .map.txt extension.
For deployment:
Rebuild containers to apply changes: docker compose up --build -d
Access Map Editor at http://localhost:3002.
Full Changelog: v0.0.1...v1.0.0