How ameyk94/super-mario-python works
This repository is a Pygame Super Mario implementation. Its main workflow is player input driving Mario’s movement and collisions in a JSON-loaded level, with entities and HUD/audio feedback providing the game result. The graph also preserves menus, pause handling, sprite loading, and the entity/trait systems. Some entry-point, UI, and audio internals were not excerpted; edges to those components rely on the SOURCE INDEX or README where noted.
Main entry points: Mario.py Mario gameplay · Level.py Level loading and rendering · main.py Game entry · Goomba.py Enemies
Components 24
Game runtime
- Game entry
main.py - Mario gameplay
entities/Mario.py - Input controls
classes/Input.py - Camera
classes/Camera.py
World and entities
- Level loading and rendering
classes/Level.py - Level layouts
levels/Level1-1.json - Enemies
entities/Goomba.py - Items and power-ups
entities/Mushroom.py - Interactive blocks
entities/CoinBox.py
Presentation
- Menus
classes/Menu.py - Sprite registry
classes/Sprites.py - Sprite sheet extraction
classes/Spritesheet.py - Animation
classes/Animation.py - HUD and score
classes/Dashboard.py - Text rendering
classes/Font.py - Pause overlay
classes/Pause.py - Blur effect
classes/GaussianBlur.py
Gameplay support
- Tile collision
classes/Collider.py - Entity collision
classes/EntityCollider.py - Movement traits
traits/leftrightwalk.py - Entity foundation
entities/EntityBase.py - Sound effects and music
classes/Sound.py - Audio assets
sfx
Other components
- Player
Connections 30
- Player → Game entry: starts game
README.md - Game entry → Menus: uses
main.py - Game entry → Level loading and rendering: uses
main.py - Game entry → Mario gameplay: uses
main.py - Game entry → HUD and score: uses
main.py - Game entry → Sound effects and music: uses
main.py - Level loading and rendering → Level layouts: loads
classes/Level.py - Level loading and rendering → Sprite registry: uses
classes/Level.py - Level loading and rendering → Enemies: creates
classes/Level.py - Level loading and rendering → Items and power-ups: creates
classes/Level.py - Level loading and rendering → Interactive blocks: creates
classes/Level.py - Mario gameplay → Input controls: checks input
entities/Mario.py - Mario gameplay → Camera: moves
entities/Mario.py - Mario gameplay → Level loading and rendering: checks entities
entities/Mario.py - Mario gameplay → Tile collision: checks tiles
entities/Mario.py - Mario gameplay → Entity collision: checks entities
entities/Mario.py - Mario gameplay → Pause overlay: creates
entities/Mario.py - Mario gameplay → HUD and score: updates score
entities/Mario.py - Mario gameplay → Sound effects and music: plays effects
entities/Mario.py - Mario gameplay → Movement traits: uses movement
entities/Mario.py - Enemies → Entity foundation: inherits
entities/Goomba.py - Enemies → Movement traits: uses movement
entities/Goomba.py - Enemies → Tile collision: checks tiles
entities/Goomba.py - Sprite registry → Sprite sheet extraction: extracts images
classes/Sprites.py - Sprite registry → Animation: builds animations
classes/Sprites.py - HUD and score → Text rendering: uses text
classes/Dashboard.py - Menus → Sprite sheet extraction: loads assets
classes/Menu.py - Pause overlay → Sprite sheet extraction: loads assets
classes/Pause.py - Pause overlay → Blur effect: uses effect
classes/Pause.py - Sound effects and music → Audio assets: plays assets