How spacesinmotion/beat works
This is a small graphical incremental game: players gain beats by clicking or pressing Space, spend them to unlock producers and buy enhancements, and see progress through a rendered interface. Timed updates add producer output to the beat total. The repository also contains dr_wav, a standalone WAV read/write library; the shown game source has its include and implementation lines commented out, so no runtime connection is established. The source excerpts show the game callbacks and state changes; unsampled code may add details, so unsupported links are omitted.
Main entry points: beat.c Button Events
Components 11
Game Runtime
- Game Callbacks
beat.c - Game State
beat.c - Beat Economy
beat.c - Producers
beat.c - Enhancements
beat.c
Input and Display
- Button Events
beat.c - Screen Rendering
beat.c - Sokol App
- Sokol Graphics
WAV Library
- WAV Read/Write
dr/dr_wav.h
Other components
- Player
Connections 11
- Player → Sokol App: sends input
- Sokol App → Game Callbacks: runs callbacks
beat.c - Game Callbacks → Button Events: dispatches events
beat.c - Button Events → Beat Economy: increments beats
beat.c - Button Events → Producers: buys producers
beat.c - Button Events → Enhancements: buys upgrades
beat.c - Producers → Game State: updates counts
beat.c - Enhancements → Game State: updates levels
beat.c - Beat Economy → Game State: updates total
beat.c - Game Callbacks → Screen Rendering: draws frame
beat.c - Screen Rendering → Sokol Graphics: renders display
beat.c