# Build main game (Linux)
gcc main.c -o emberbound -lraylib -lGL -lm -lpthread -ldl -lrt -lX11
# Build 2D camera example (Linux)
gcc 2d-camera.c -o 2d-camera -lraylib -lGL -lm -lpthread -ldl -lrt -lX11
# Build (macOS)
clang main.c -o emberbound -lraylib -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo -lm
# Build (Windows/MSYS2)
gcc main.c -o emberbound.exe -lraylib -lopengl32 -lgdi32 -lwinmm- Functions: PascalCase for public functions (
PlayerInit,PlayerUpdate,PlayerDraw) - Variables: camelCase (
player,envItems,cameraOption) - Constants: UPPER_SNAKE_CASE (
SCREEN_W,SCREEN_H,GROUND_Y) - Structs: PascalCase (
Player,EnvItem) - Enums: Anonymous enums with UPPER_SNAKE_CASE values
- Use
static inlinefor small utility functions (clampf) - Group related constants at the top of files
- Use
typedef structfor data structures - Function declarations before
main()when needed
- K&R brace style with opening brace on same line
- 4-space indentation
- No trailing whitespace
- Compact struct initialization:
(Vector2){ x, y } - Use designated initializers for clarity
- Core:
raylib.h,raymath.h - Standard:
stdbool.h,math.h - Build system: Uses
nob.h(NoBuild) for build automation