Skip to content

Fix: Prevent player from walking off the map - #72

Open
rlc26 wants to merge 1 commit into
pythonarcade:mainfrom
rlc26:fix-boundary-walk
Open

rlc26 wants to merge 1 commit into
pythonarcade:mainfrom
rlc26:fix-boundary-walk

Conversation

@rlc26

@rlc26 rlc26 commented Nov 13, 2024

Copy link
Copy Markdown

This pull request adds boundary checks in game_view.py to prevent the player from moving beyond the map's edges. This change ensures the player remains within the defined map dimensions at all times.

  • Checks player_sprite position against map boundaries
  • Keeps the player within the visible map area

Tested with default map sizes to ensure compatibility.

@maximelefrancois86

Copy link
Copy Markdown

related to #29 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants