How austridg/rad-2d works
RAD-2D is a C++17 raylib wrapper for 2D drawing and animation. The principal workflow is to load textures and fonts, define animations in a shared registry, attach those assets and animations to drawables, then call each drawable’s draw method in the game’s raylib frame loop. Other capabilities include scrolling backgrounds, text effects and typewriter reveals, composite UI, and tilemaps with animated tiles. Asset implementation and parts of drawable rendering were not sampled, so some links are documented rather than source-verified.
Main entry points: draw.cpp Animated drawable base · tiles.cpp Tilemap · animation.cpp Animation registry · assets.cpp Texture and font registries
Components 13
Asset management
- Texture and font registries
assets/assets.cpp
Animation
- Animation definitions
animation/animation.cpp - Animation registry
animation/animation.cpp - Animation state
animation/animation.cpp
Drawing
- Animated drawable base
draw/draw.cpp - Sprite
draw/draw.cpp - Background
draw/draw.cpp - Text
draw/draw.cpp - UI element
draw/draw.cpp
Other components
- Game application
- raylib
Connections 23
- Game application → Texture and font registries: loads assets
README.md - Game application → Animation definitions: defines animations
README.md - Animation definitions → Animation registry: registers
README.md - Game application → Sprite: configures and draws
README.md - Game application → Background: draws
README.md - Game application → Text: draws
README.md - Game application → UI element: draws
README.md - Game application → Tilemap: draws
README.md - Animated drawable base → Animation registry: fetches animation
draw/draw.cpp - Animated drawable base → Animation state: sets playback
draw/draw.cpp - Sprite → Animated drawable base: inherits
draw/draw.cpp - Background → Animated drawable base: inherits
draw/draw.cpp - UI element → Animated drawable base: inherits
draw/draw.cpp - UI element → Text: draws attached text
draw/draw.cpp - Tile set → Animation registry: fetches animation
tiles/tiles.cpp - Tile set → Animation state: advances animated tiles
tiles/tiles.cpp - Tilemap → Tile set: looks up tiles
tiles/tiles.cpp - Texture and font registries → raylib: manages assets
- Sprite → raylib: renders
- Background → raylib: renders
draw/draw.cpp - Text → raylib: renders glyphs
draw/draw.cpp - UI element → raylib: renders
draw/draw.cpp - Tilemap → raylib: renders tiles
tiles/tiles.cpp