mirror of
https://github.com/PlayableIntelligence/game-creator.git
synced 2026-09-19 07:34:10 +08:00
3142f9ddcd
Migrate all rendering from fixed 800x600 to dynamic DPR-aware canvas sizing with PX scaling factor. The game now renders at native device resolution on retina displays without CSS upscaling blur. Changes: - Constants.js: full rewrite with DPR detection, canvas sizing, PX scale factor; all spatial values (sizes, speeds, ranges, radii) multiplied by PX; time/logic values unchanged - GameConfig.js: add Scale.FIT, CENTER_BOTH, zoom 1/DPR, roundPixels, antialias, preserveDrawingBuffer - index.html: responsive viewport, full-screen container - main.js: add render_game_to_text() and advanceTime() test hooks - Scenes: SAFE_ZONE-aware UI positioning, proportional font sizing via UI ratios, PX-scaled layout in GameOverScene/UIScene/GameScene - Entities: PX-aware pixel art sprite scale for Player, Enemy, XpGem - Systems: PX-scaled particle sizes, spawn margins, weapon visuals, projectile knockback, garlic radius growth Co-Authored-By: Claude <noreply@anthropic.com>