Skip to content

feat(camera): implement 2x zoom out#8

Open
Copilot wants to merge 6 commits intomainfrom
copilot/double-playable-area
Open

feat(camera): implement 2x zoom out#8
Copilot wants to merge 6 commits intomainfrom
copilot/double-playable-area

Conversation

Copy link
Contributor

Copilot AI commented Feb 10, 2026

Adds 2x zoom out (0.5 scale factor) to increase visible game area from 1280×720 to 2560×1440 effective pixels.

Implementation

  • Added zoomLevel property to RenderSystem (default: 0.5)
  • Camera now calculates visible bounds as canvas.dimensions / zoomLevel
  • Applied ctx.scale() transformation before camera translation (order matters for correct offset calculation)
  • UI elements (HUD, stats, health bar) rendered outside scaled context
// Camera calculates larger visible area
const visibleWidth = this.canvas.width / this.zoomLevel;   // 2560px
const visibleHeight = this.canvas.height / this.zoomLevel; // 1440px

// Transformations applied in sequence
ctx.scale(this.zoomLevel, this.zoomLevel);  // Zoom first
ctx.translate(-this.cameraX, -this.cameraY); // Then translate

Result

Players see 4x more surface area (2× width, 2× height) while UI remains unscaled.

2x Zoom Out View


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@Linkatplug Linkatplug marked this pull request as ready for review February 10, 2026 04:40
Copilot AI and others added 3 commits February 10, 2026 04:42
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
Copilot AI changed the title [WIP] Update game to double playable area and add destructible asteroids feat(world): double playable area + destructible asteroids Feb 10, 2026
Copilot AI requested a review from Linkatplug February 10, 2026 04:50
Copilot AI and others added 2 commits February 10, 2026 04:54
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
Copilot AI changed the title feat(world): double playable area + destructible asteroids feat(camera): implement 2x zoom out Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants