How faonpingoin634/pokemon_game works
This is a playable Pokémon-inspired 2D RPG demo. The user workflow runs from the menu into tile-map exploration, where movement, collision and tall-grass encounters can start turn-based battles; combat returns to exploration when finished. The graph also preserves the documented camera, battle UI/AI, creature roster, and special tile event. Relationships are limited to calls and behaviors shown in excerpts or stated in the README; some initialization and rendering details are unsampled.
Main entry points: Game.cpp Game State Orchestrator · BattleSystem.cpp Battle Logic and UI · Map.cpp Tile Map · Player.cpp Player
Components 11
Game Flow
- Game State Orchestrator
src/Game.cpp - Application Entry
src/main.cpp
World Exploration
- Tile Map
src/Map.cpp - Movement and Encounters
src/Game.cpp - Camera Tracking
src/Game.cpp
Turn-Based Battle
- Battle Logic and UI
src/BattleSystem.cpp
Game Entities
- Player
src/Player.cpp - Creatures and Moves
src/Creature.cpp
Audio and Events
- Music and Special Event
src/Game.cpp
Other components
- Player
- SFML
Connections 19
- Player → Application Entry: starts game
src/main.cpp - Application Entry → Game State Orchestrator: runs
src/main.cpp - Game State Orchestrator → Movement and Encounters: updates
src/Game.cpp - Game State Orchestrator → Battle Logic and UI: dispatches input
src/Game.cpp - Game State Orchestrator → Battle Logic and UI: updates battle
src/Game.cpp - Game State Orchestrator → Battle Logic and UI: draws battle
- Movement and Encounters → Tile Map: checks terrain
src/Game.cpp - Movement and Encounters → Player: moves and updates
- Game State Orchestrator → Tile Map: draws map
- Game State Orchestrator → Player: draws player
- Movement and Encounters → Battle Logic and UI: starts encounter
src/Game.cpp - Movement and Encounters → Creatures and Moves: chooses opponent
- Battle Logic and UI → Creatures and Moves: applies moves
src/BattleSystem.cpp - Game State Orchestrator → Camera Tracking: tracks player
src/Game.cpp - Game State Orchestrator → Music and Special Event: switches audio
src/Game.cpp - Tile Map → SFML: renders tiles
src/Map.cpp - Player → SFML: renders sprite
src/Player.cpp - Battle Logic and UI → SFML: renders battle UI
src/BattleSystem.cpp - Music and Special Event → SFML: plays audio