How sheikh-hashir14/dragon-fist works
Dragon Fist is a desktop 2D fighting game. The player enters through the menu, selects a mode and fighter, then plays rounds of movement and combat that resolve into round and match outcomes, with the game loop rendering the scene and HUD. The README documents roster selection, CPU and local multiplayer, and custom sprites and stages; unsampled portions of main.c prevent mapping their detailed dispatch. The graph captures only relationships visible in the excerpts or README; major gameplay capabilities share the single game implementation file.
Main entry points: main.c Game loop · resource_dir.h Resource locator · raylib.h Raylib API · resources Game assets
Components 16
Game flow
- Game loop
src/main.c - Main menu
src/main.c - Fighter selection
src/main.c - Player controls
src/main.c - CPU opponent
src/main.c - Fighter movement
src/main.c - Combat resolution
src/main.c - Round system
src/main.c - Match results
src/main.c
Visuals and assets
- Stage rendering
src/main.c - Fighter sprites
src/main.c - Health HUD
src/main.c - Game assets
resources
Runtime platform
- Resource locator
src/resource_dir.h - Raylib API
lib/raylib/include/raylib.h
Other components
- Player
Connections 19
- Player → Game loop: plays
readme.md - Game loop → Main menu: dispatches
readme.md - Main menu → Fighter selection: offers selection
readme.md - Fighter selection → Game loop: starts match
src/main.c - Game loop → Player controls: reads input
src/main.c - Player controls → Fighter movement: drives
src/main.c - Game loop → CPU opponent: updates opponent
src/main.c - CPU opponent → Fighter movement: provides input
src/main.c - Game loop → Fighter movement: updates
src/main.c - Fighter movement → Combat resolution: enables attacks
src/main.c - Game loop → Round system: tracks
src/main.c - Round system → Match results: counts wins
src/main.c - Game loop → Stage rendering: renders
src/main.c - Game loop → Fighter sprites: renders
src/main.c - Game loop → Health HUD: draws
src/main.c - Game loop → Resource locator: sets asset directory
src/main.c - Resource locator → Raylib API: uses filesystem API
src/resource_dir.h - Game loop → Raylib API: uses graphics API
src/main.c - Game loop → Game assets: loads textures
src/main.c