How reiferd/pindah-badak works
Pindah Badak! is a Python educational stacking game about relocating Javan rhinos. The player releases a rhino from a swinging crane; the game simulates its fall, checks alignment with the platform or existing stack, and on success adds it to the stack and advances conservation facts. The game engine coordinates input, simulation, scoring, and presentation. Graphics use a scene graph and Pycairo-rendered assets and scenery. Edges reflect calls and data reads shown in excerpts or documented in the README; unsampled details are omitted.
Main entry points: game_engine.py Game engine · crane.py Crane motion and drawing · facts_manager.py Fact progression · cairo_renderer.py Cairo asset renderer
Components 13
Game runtime
- Game entry point
run.py - Game engine
src/gameplay/game_engine.py - Game settings
src/config.py
Stacking gameplay
- Crane motion and drawing
src/gameplay/crane.py - Rhino fall and alignment
src/gameplay/rhino.py - Stack and score state
src/gameplay/game_engine.py
Graphics
- Scene graph transforms
src/graphics/scene_graph.py - Cairo asset renderer
src/graphics/cairo_renderer.py - Procedural landscape
src/graphics/procedural_env.py
Conservation education
- Fact progression
src/education/facts_manager.py - Conservation facts
assets/data/education_data.json - Education panel
src/gameplay/game_engine.py
Other components
- Player
Connections 14
- Player → Game engine: controls
src/gameplay/game_engine.py - Game entry point → Game engine: starts
run.py - Game engine → Game settings: reads settings
src/gameplay/game_engine.py - Game engine → Crane motion and drawing: updates and draws
src/gameplay/game_engine.py - Game engine → Rhino fall and alignment: spawns and updates
src/gameplay/game_engine.py - Game engine → Procedural landscape: draws
src/gameplay/game_engine.py - Game engine → Stack and score state: checks and records
src/gameplay/game_engine.py - Stack and score state → Fact progression: advances facts
src/gameplay/game_engine.py - Education panel → Fact progression: gets current fact
src/gameplay/game_engine.py - Fact progression → Conservation facts: loads
src/education/facts_manager.py - Crane motion and drawing → Scene graph transforms: uses transforms
src/gameplay/crane.py - Crane motion and drawing → Cairo asset renderer: renders claw
src/gameplay/crane.py - Rhino fall and alignment → Cairo asset renderer: renders unit
src/gameplay/rhino.py - Procedural landscape → Cairo asset renderer: creates surface
src/graphics/procedural_env.py