How jonesy200/pygame_practice works
This repository is a small Pygame platformer prototype, with a procedural character-control loop in OOP/ and an earlier, self-contained loop in the root main.py. In the OOP version, input is handled by Game, which drives Player movement and updates; Player loads animation frames and resolves floor contact, while Game draws the floor and player. The asset tree includes additional character and effect animations beyond those loaded in the sampled code. The README is empty, and only the sampled source supports the relationships shown.
Main entry points: OOP/main.py OOP game loop · main.py Prototype loop · player.py Player · animation.py Animation loader
Components 10
Game loops
- OOP game loop
OOP/main.py - Prototype loop
main.py
Character runtime
- Player
OOP/player.py - Animation loader
OOP/animation.py - Floor
OOP/floor.py
Game assets
- Character sprites
Hero Knight/Sprites/HeroKnight - Effects and tiles
Hero Knight/Sprites - Clank sound
sounds/clank.wav
Other components
- Player
- Pygame display
Connections 10
- Player → OOP game loop: provides input
- OOP game loop → Player: controls and updates
- OOP game loop → Floor: draws and passes floor
- Player → Animation loader: loads frames
- Animation loader → Character sprites: loads images
- OOP game loop → Pygame display: draws frame
- Player → Prototype loop: provides input
- Prototype loop → Character sprites: loads frames
- Prototype loop → Clank sound: plays on key
- Prototype loop → Pygame display: draws frame