How kmu1757/dreamfarm works
DreamFarm is a Pygame narrative farming game. The player starts a story, chooses a crop, manages its changing field through care actions and minigames, then reaches an attitude-based ending; endings and events contribute to persistent progress, achievements, and the gallery. The main loop owns scene dispatch and global overlays. The README documents the larger scene arc, while source-index references and excerpts support the implementation links shown here; unsampled scene-to-scene transitions are omitted where their caller is not evidenced.
Main entry points: farm.py Farm scene · game_main.py Game loop · save_system.py Save system · ending.py Endings
Components 28
Game runtime
- Game entry
main.py - Game loop
game_main.py - Settings overlay
core/settings_overlay.py
Farm gameplay
- Crop selection
scenes/crop_select.py - Farm scene
scenes/farm.py - Field simulation
scenes/farm_simulator.py - Farm renderer
scenes/farm_renderer.py - Care minigames
scenes/tending.py - Crop stages
scenes/stage4_harvest.py
Story and discovery
- Title screen
scenes/title.py - Intro
scenes/intro.py - Story choices
scenes/story_choice.py - Memory scenes
scenes/memory.py - Epiphany
scenes/epiphany.py - Star connection
scenes/star_connect.py - Father's day
scenes/father_day.py - Endings
scenes/ending.py - Gallery
scenes/gallery.py
Shared game services
- Game state
core/game_state.py - Crop rules
core/crops.py - Save system
core/save_system.py - Achievements
core/achievements.py - Graphics and fonts
core/assets.py - Audio engine
core/audio.py - Localization
core/i18n.py - Translation catalog
core/i18n_data.py - Steam achievements
core/steam.py
Other components
- Player
Connections 44
- Player → Game entry: launches
- Game entry → Game loop: starts
main.py - Game loop → Title screen: dispatches
game_main.py - Game loop → Crop selection: dispatches
game_main.py - Game loop → Farm scene: dispatches
game_main.py - Game loop → Crop stages: dispatches
game_main.py - Game loop → Gallery: dispatches
game_main.py - Game loop → Settings overlay: routes input
game_main.py - Player → Title screen: chooses
- Title screen → Intro: begins story
- Intro → Crop selection: leads to
- Crop selection → Farm scene: selects crop
scenes/crop_select.py - Farm scene → Field simulation: updates field
scenes/farm.py - Farm scene → Farm renderer: renders field
scenes/farm.py - Farm scene → Care minigames: opens care
scenes/farm.py - Care minigames → Farm scene: returns result
scenes/tending.py - Field simulation → Crop rules: uses crop rules
scenes/farm_simulator.py - Farm scene → Game state: reads state
scenes/farm.py - Farm scene → Save system: saves progress
scenes/farm.py - Farm scene → Crop stages: enters crop stages
- Crop stages → Endings: reaches outcome
- Endings → Game state: judges attitude
scenes/ending.py - Endings → Achievements: unlocks rewards
scenes/ending.py - Endings → Save system: records ending
scenes/ending.py - Endings → Gallery: returns to gallery
- Player → Story choices: makes choices
- Player → Memory scenes: views memories
- Player → Epiphany: reaches insight
- Player → Star connection: plays scene
- Player → Father's day: views scene
- Story choices → Game state: updates progress
scenes/story_choice.py - Story choices → Save system: records story
scenes/story_choice.py - Gallery → Achievements: shows unlocks
scenes/gallery.py - Gallery → Save system: reads records
scenes/gallery.py - Achievements → Save system: records unlocks
core/achievements.py - Achievements → Steam achievements: unlocks optionally
core/achievements.py - Farm scene → Graphics and fonts: uses graphics
scenes/farm.py - Farm scene → Audio engine: plays sounds
scenes/farm.py - Intro → Graphics and fonts: uses graphics
scenes/intro.py - Intro → Audio engine: plays sounds
scenes/intro.py - Localization → Translation catalog: loads translations
core/i18n.py - Settings overlay → Localization: changes language
core/settings_overlay.py - Settings overlay → Save system: stores settings
core/settings_overlay.py - Graphics and fonts → Localization: translates rendered text
core/assets.py