How firminpangolin/roguelike works
This repository implements a Raylib room-based shooter. The principal workflow is a game loop that updates the player, advances bullets and enemies, resolves collisions and room progression, then refreshes the display. The graph separates those gameplay stages from shared world and room state. Source excerpts show the loop and several event/player behaviors; initialization, enemy movement, and rendering details are only partially sampled, so their internal relationships are not expanded.
Main entry points: main.c Game loop · player.c Player control · bullet.c Bullet management · events.c Bullet simulation
Components 12
Game loop
- Game loop
src/main.c - Bullet simulation
src/events.c - Collision resolution
src/events.c
Combat entities
- Player control
src/player.c - Bullet management
src/bullet.c - Enemy behavior
src/ennemy.c
Room progression
- Room navigation
src/events.c - Room completion
src/events.c - Room topology
src/room.c
World and display
- World state
src/world.c - Graphics refresh
src/graphics.c
Other components
- Keyboard player
Connections 14
- Keyboard player → Player control: provides input
src/player.c - Game loop → World state: initializes state
src/main.c - Game loop → Player control: updates control
src/main.c - Game loop → Bullet simulation: updates bullets
src/main.c - Game loop → Room navigation: checks exits
src/main.c - Game loop → Enemy behavior: updates enemies
src/main.c - Game loop → Collision resolution: checks collisions
src/main.c - Game loop → Room completion: checks completion
src/main.c - Game loop → Graphics refresh: refreshes display
src/main.c - Player control → Bullet management: creates shots
src/player.c - Bullet simulation → Bullet management: frees offscreen
src/events.c - Collision resolution → Bullet management: removes hit shots
src/events.c - Room navigation → Enemy behavior: spawns room enemies
src/events.c - World state → Room topology: stores room links