How marblexu/pythonsupermario works
SuperMario is a Pygame platform game. The player chooses a game from the menu; the state controller runs screens and levels, while the level loads map data and coordinates movement, collisions, scoring, and progression. The graph preserves the documented four-level, pipe, enemy, and slider capabilities. Some level and component source was only sampled, so edges are limited to shown references and documented behavior.
Main entry points: level.py Level runtime · main.py Game bootstrap · tools.py State controller · load_screen.py Load and end screens
Components 19
Game Runtime
- Game entry
main.py - Game bootstrap
source/main.py - State controller
source/tools.py - Pygame setup and assets
source/setup.py - Game constants
source/constants.py
Level World
- Level runtime
source/states/level.py - Level map data
source/data/maps - Player data
source/data/player
Game Entities
- Player character
source/components/player.py - Bricks and boxes
source/components/brick.py - Enemies
source/components/enemy.py - Power-ups and fireballs
source/components/powerup.py - Coins
source/components/coin.py - World objects
source/components/stuff.py - Question boxes
source/components/box.py
Screens and HUD
- Main menu
source/states/main_menu.py - Load and end screens
source/states/load_screen.py - HUD and status
source/components/info.py
Other components
- Player
Connections 20
- Player → Game entry: starts game
README.md - Game entry → Game bootstrap: calls entry
main.py - Game bootstrap → State controller: creates controller
source/main.py - Game bootstrap → Main menu: registers states
source/main.py - Game bootstrap → Load and end screens: registers states
source/main.py - Game bootstrap → Level runtime: registers state
source/main.py - State controller → Main menu: dispatches states
source/tools.py - State controller → Load and end screens: dispatches states
source/tools.py - State controller → Level runtime: dispatches states
source/tools.py - Level runtime → Level map data: loads map data
README.md - Level runtime → Player character: coordinates gameplay
source/states/level.py - Level runtime → Bricks and boxes: builds and checks
source/states/level.py - Level runtime → Question boxes: checks interactions
source/states/level.py - Level runtime → Enemies: manages encounters
source/states/level.py - Level runtime → Power-ups and fireballs: manages items
source/states/level.py - Level runtime → Coins: updates score
source/states/level.py - Level runtime → World objects: builds world objects
source/states/level.py - Level runtime → HUD and status: updates HUD
source/states/level.py - Load and end screens → HUD and status: renders status
source/states/load_screen.py - Level runtime → Player data: loads player settings