How notfulii/pokefight works
PokeFIGHT is a local, turn-based Pokémon game built with Python and Pygame. The main workflow moves from login and mode selection through Pokémon selection and battle, then displays the result and rankings; multiplayer can request a second login before saving a win. Pokémon data and media are fetched or loaded into a local cache for gameplay. The README also documents debug controls, screen music, and animated battles. Some screen transitions and persistence details are supported only by the README or source index, so unsupported links are omitted.
Main entry points: main.py Game loop · get_pokemon.py Pokédex loader · battle_screen.py Battle screen · select_pokemon_screen.py Pokémon selection
Components 25
Game flow
- Game loop
main.py - Start screen
start_menu.py - Mode selection
difficulty_screen.py - Pokémon selection
select_pokemon_screen.py - Battle result
result_screen.py
Battle system
- Battle screen
battle_screen.py - Pokémon combat model
pokemon.py
Pokémon data
- Pokédex loader
get_pokemon.py - PokéAPI client
pokeapi.py - Stats cache
stats.py - Moves cache
moves.py
Accounts and rankings
- Login screen
login_screen.py - Registration screen
register_screen.py - Rankings screen
rankings_screen.py - Account authentication
auth.py - Text input
input_box.py - Ranking records
rankings.py
Game services
- Sprite animation
animation.py - Backgrounds
backgrounds.py - UI rendering
ui.py - Audio playback
sound.py - Debug console
debug_console.py - Game settings
settings.py
Other components
- Player
- PokéAPI
Connections 36
- Player → Game loop: plays
README.md - Game loop → Start screen: creates screens
main.py - Game loop → Login screen: creates screens
main.py - Game loop → Registration screen: creates screens
main.py - Game loop → Mode selection: creates screens
main.py - Game loop → Pokémon selection: creates screens
main.py - Game loop → Battle screen: creates screens
main.py - Game loop → Battle result: creates screens
main.py - Game loop → Rankings screen: creates screens
main.py - Game loop → Ranking records: saves records
main.py - Login screen → Account authentication: checks credentials
login_screen.py - Login screen → Text input: uses fields
login_screen.py - Registration screen → Account authentication: registers account
register_screen.py - Registration screen → Text input: uses fields
register_screen.py - Pokémon selection → Pokédex loader: reads choices
select_pokemon_screen.py - Pokémon selection → Backgrounds: draws backdrop
select_pokemon_screen.py - Pokémon selection → UI rendering: draws controls
select_pokemon_screen.py - Battle screen → Pokédex loader: loads combatants
battle_screen.py - Battle screen → Pokémon combat model: calculates damage
battle_screen.py - Battle screen → Sprite animation: animates attacks
battle_screen.py - Battle screen → UI rendering: draws battle
battle_screen.py - Battle screen → Audio playback: plays effects
battle_screen.py - Pokédex loader → PokéAPI client: gets Pokémon data
get_pokemon.py - Pokédex loader → Stats cache: loads stats
get_pokemon.py - Pokédex loader → Moves cache: loads moves
get_pokemon.py - Pokédex loader → Pokémon combat model: builds instances
get_pokemon.py - Pokédex loader → Sprite animation: loads GIFs
get_pokemon.py - Pokédex loader → Audio playback: loads cries
get_pokemon.py - PokéAPI client → PokéAPI: requests data
pokeapi.py - Stats cache → PokéAPI client: requests move data
stats.py - Moves cache → PokéAPI client: requests move data
moves.py - Game loop → Debug console: handles commands
main.py - Game loop → Audio playback: plays screen music
main.py - Game loop → Backgrounds: loads backgrounds
main.py - Rankings screen → Ranking records: reads records
rankings_screen.py - Game loop → Game settings: configures game
main.py