-
Notifications
You must be signed in to change notification settings - Fork 108
A small, simple jungle-themed jump and duck side-scroller #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Copilot <[email protected]>
Co-authored-by: atarukun <[email protected]>
Replace magic number with GRASS_PATTERN_WIDTH constant
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new jungle-themed endless runner game where players jump over and duck under obstacles to achieve a high score.
Key Changes:
- Implements a side-scrolling obstacle avoidance game with jumping and ducking mechanics
- Adds sprite assets (player, log, creature, branch) and an app icon
- Includes collision detection with forgiving hitboxes and dynamic difficulty through randomized obstacle spawning
Reviewed Changes
Copilot reviewed 1 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| badge/apps/jungle/init.py | Core game logic including player movement, obstacle spawning, collision detection, and rendering |
| badge/apps/jungle/sprites/player.png | Player character sprite (16x16) |
| badge/apps/jungle/sprites/log.png | Ground obstacle sprite - log |
| badge/apps/jungle/sprites/creature.png | Ground obstacle sprite - creature |
| badge/apps/jungle/sprites/branch.png | Air obstacle sprite - branch |
| badge/apps/jungle/icon.png | Application icon for the jungle game |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Obstacle types: (image, type, ground_height) | ||
| # type: "ground" (jump over) or "air" (duck under) | ||
| # ground_height: for ground obstacles, this should equal sprite height so bottom rests at GROUND_Y | ||
| # (calculation: y_pos = GROUND_Y - ground_height, so bottom = y_pos + height = GROUND_Y) |
Copilot
AI
Oct 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The calculation comment is incorrect. The formula shows y_pos + height = GROUND_Y, but this would only be true if ground_height equals the sprite's height. The actual relationship is y_pos = GROUND_Y - ground_height, so bottom = GROUND_Y - ground_height + sprite_height. The comment should clarify that ground_height must equal sprite height for this to work correctly.
| # (calculation: y_pos = GROUND_Y - ground_height, so bottom = y_pos + height = GROUND_Y) | |
| # (calculation: y_pos = GROUND_Y - ground_height; bottom = y_pos + sprite_height. This places the bottom at GROUND_Y only if ground_height == sprite_height.) |
| # Standing player: player_y = 74 (sprite top), collision box top = 74 + COLLISION_Y_MARGIN = 76, | ||
| # collision box height = 12, so collision box bottom = 88 (HITS branch at 82) | ||
| # Ducking player: player_y = 74 (sprite top), collision box top = 74 + DUCKING_Y_OFFSET = 84, | ||
| # collision box height = 4, so collision box bottom = 88 (CLEARS branch at 82) |
Copilot
AI
Oct 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ducking collision logic comment contains an error. It states the collision box bottom is 88 for ducking, but with top at 84 and height of 4, the bottom would be at 88. However, a collision box bottom at 88 cannot clear a branch at 82 (88 > 82 means collision occurs). The logic appears to assume the branch bottom is at 82, but the collision check would still detect overlap. Consider verifying the actual collision boundaries or updating the documentation to accurately reflect the collision behavior.
| # collision box height = 4, so collision box bottom = 88 (CLEARS branch at 82) | |
| # collision box height = 4, so collision box bottom = 88 (HITS branch at 82; does NOT clear) |
No description provided.