How philosoph228/gdi-voxel-game works
WinCraft is an experimental WinAPI voxel game whose main workflow is Windows input and resize events entering GameState, updating the player and world, then drawing a CPU-rendered frame into a GDI backbuffer. The README also describes transforms, projection, clipping, triangle rasterization, voxel-world structure and experimental gameplay. Core engine behavior is concentrated in wincraft.c; its excerpts support the platform handoff and selected rendering and movement stages, but not every internal call. World-generation wiring is therefore shown conservatively.
Main entry points: main.c Window Launcher · wincraft.c Game State · perlin.c Terrain Noise · wincraft.h World Data
Components 16
Windows Platform
- Window Launcher
launcher/main.c
Game Runtime
- Game State
wincraft.c - Input Handling
wincraft.c - Player Movement
wincraft.c - Block Interaction
wincraft.c
Voxel World
- World Data
wincraft.h - Chunk Management
wincraft.c - Terrain Noise
perlin.c - Random Generator
jrnd.h
Software Rendering
- Camera Transforms
wincraft.c - Frustum Clipping
wincraft.c - Triangle Rasterizer
wincraft.c - Frame Backbuffer
wincraft.c
Other components
- Player
- WinAPI Events
- GDI Output
Connections 17
- WinAPI Events → Window Launcher: dispatches
- Window Launcher → Game State: allocates
- Window Launcher → Input Handling: queues events
- Window Launcher → Game State: resizes
- Player → Window Launcher: provides input
- Window Launcher → Game State: requests draw
- Game State → Input Handling: processes events
- Game State → Player Movement: updates
- Player Movement → Chunk Management: ensures nearby
- Block Interaction → World Data: reads and edits
- Game State → Camera Transforms: uses camera
- Camera Transforms → Frustum Clipping: transforms geometry
- Frustum Clipping → Triangle Rasterizer: passes triangles
- Triangle Rasterizer → Frame Backbuffer: writes pixels
- Window Launcher → Frame Backbuffer: reads backbuffer
- Frame Backbuffer → GDI Output: blits frame
- Terrain Noise → Random Generator: uses RNG