Expand rooms to 2× viewport width and add enemy patrol movement#4
Merged
LloydNicholson merged 2 commits intoMar 21, 2026
Conversation
…ment Co-authored-by: LloydNicholson <34131158+LloydNicholson@users.noreply.github.com> Agent-Logs-Url: https://github.com/LloydNicholson/sluggers/sessions/956ff2ec-399d-4ee0-bf11-c2a3dc59b773
Copilot
AI
changed the title
[WIP] Fix scene size and enable enemy movement
Expand rooms to 2× viewport width and add enemy patrol movement
Mar 21, 2026
LloydNicholson
approved these changes
Mar 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The game rooms were exactly the size of the viewport (384×216), leaving no space for the camera to scroll and making the 64×64 player fill ~30% of screen height. Enemies had no movement logic.
Enemy patrol (
Enemy.gd)x_min,x_max,speedexports matching theMovingBlockpattern_physics_processshuttles the enemy between bounds; sprite flips on reversal@onready var _spritereplaces fragile$Spriteinline referencesRoom expansion (
Room0.tscn,Room1.tscn)limit_left=0,limit_right=768,limit_top=0,limit_bottom=216) set per room so the camera scrolls without showing outside boundsCamera clamping (
GameCamera.gd)Lerp target is clamped to the camera's limit bounds before applying, preventing rubber-banding near room edges:
Death area (
DeathArea.tscn)Collision shape widened 384 → 2000 px so a single instance covers any room size.
Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.