How bo-xd/wolfenstein3d-style-terminal works
Wolfenstein-style terminal shooter: the player starts from a validated ASCII map, then the ncurses game loop handles movement, shooting, pickups and enemy turns before rendering each frame or the victory screen. Raycasting, combat, enemy pathfinding, pickup handling and ECS-backed world state are distinct runtime stages. The README documents capabilities such as HUD, weapon animation and victory effects; source excerpts show the main dispatch and several implementations. Some module relationships are supported by the SOURCE INDEX rather than full source excerpts.
Main entry points: main.c Game loop · map.c Map loading · ecs.c World state · combat.c Combat
Components 16
Game loop
- Game loop
src/main.c
World setup
- Level map
src/assets/map.txt - Map loading
src/map.c - World state
src/ecs.c - Game settings
src/game_config.h - Game types
src/game_types.h
Gameplay systems
- Player movement
src/player.c - Combat
src/combat.c - Enemy behavior
src/enemy.c - Pickups
src/pickup.c
Rendering
- Raycasting
src/raycast.c - Enemy rendering
src/enemy.c - Pickup rendering
src/pickup.c - Weapon display
src/weapon.c
Other components
- Player
- Terminal
Connections 19
- Player → Game loop: provides input
readme.md - Game loop → Level map: loads
src/main.c - Game loop → Map loading: loads map
src/main.c - Map loading → World state: creates entities
- Game loop → Player movement: dispatches movement
src/main.c - Game loop → Combat: dispatches firing
src/main.c - Game loop → Pickups: updates pickups
src/main.c - Game loop → Enemy behavior: updates enemies
src/main.c - Game loop → Raycasting: casts view rays
src/main.c - Combat → Raycasting: casts shot ray
src/combat.c - Game loop → Enemy rendering: renders enemies
src/main.c - Game loop → Pickup rendering: renders pickups
src/main.c - Game loop → Weapon display: draws weapon
src/main.c - Game loop → Terminal: renders frames
src/main.c - Enemy behavior → World state: updates state
src/enemy.c - Combat → World state: updates state
src/combat.c - Pickups → World state: updates state
- Player movement → Map loading: checks walls
- Enemy behavior → Map loading: checks routes
src/enemy.c