Skip to content

Conversation

@ibywind
Copy link

@ibywind ibywind commented May 25, 2025

Previously, when you were boosting (holding shift) and ran into a still Koopa shell, Mario would die instead of kicking the shell.

This commit refactors the _onCollisionWithMob method in entities/Mario.py to:

  • Ensure that kicking a still Koopa shell is prioritized over Mario dying if the conditions for a kick are met (side collision with a live, non-active, non-bouncing Koopa).
  • The Koopa shell now becomes bouncing and is kicked in the appropriate direction.
  • A small nudge is given to the kicked shell to help prevent immediate re-collision with a fast-moving Mario.
  • Additionally, I adjusted the logic for stomping an already still Koopa shell to make it start bouncing, aligning with common platformer mechanics.

Previously, when you were boosting (holding shift) and ran into a still Koopa shell, Mario would die instead of kicking the shell.

This commit refactors the `_onCollisionWithMob` method in `entities/Mario.py` to:
- Ensure that kicking a still Koopa shell is prioritized over Mario dying if the conditions for a kick are met (side collision with a live, non-active, non-bouncing Koopa).
- The Koopa shell now becomes `bouncing` and is kicked in the appropriate direction.
- A small nudge is given to the kicked shell to help prevent immediate re-collision with a fast-moving Mario.
- Additionally, I adjusted the logic for stomping an already still Koopa shell to make it start bouncing, aligning with common platformer mechanics.
Three new levels have been added to the game:
- Level1-3.json
- Level1-4.json
- Level1-5.json

These levels introduce varied designs, platforming challenges, and enemy placements.
The game's menu system dynamically loads levels from the 'levels' directory, so these new levels will be available for selection automatically.
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.

1 participant