Demo gallery

All 187 demos, grouped by category. Each name links to the demo's own sub-project, where its page has the full description and source.

3d (28)

basic-voxel

an 8x8x8 voxel block, click one out. Run it with bb basic-voxel.

basic-voxel

billboard-rendering

camera-facing quads, one spins. Run it with bb billboard-rendering.

billboard-rendering

bouncing-spheres

spheres bouncing in a 3D box (rl/sphere!). Run it with bb bouncing-spheres.

bouncing-spheres

box-collisions

a player cube colliding with 3D boxes. Run it with bb box-collisions.

box-collisions

camera-3d

an orbiting 3D camera (Camera3D by value). Run it with bb camera-3d.

camera-3d

camera-3d-first-person

walk a yard of columns in first person. Run it with bb camera-3d-first-person.

camera-3d-first-person

camera-3d-free

a free-look camera around a cube, UpdateCamera. Run it with bb camera-3d-free.

camera-3d-free

camera-3d-split-screen

two players, two render-texture halves. Run it with bb camera-3d-split-screen.

camera-3d-split-screen

directional-billboard

a billboard whose facing row turns with the camera. Run it with bb directional-billboard.

directional-billboard

dna-helix

a turning double helix, coloured bases. Run it with bb dna-helix.

dna-helix

doom

a textured raycaster: one ray per screen column. Run it with bb doom.

doom

first-person-maze

walk a grid maze, with a minimap. Run it with bb first-person-maze.

first-person-maze

geometric-shapes

cubes, spheres, cylinders, cones, capsules. Run it with bb geometric-shapes.

geometric-shapes

helitorus

a helix wound around a torus, swept into a tube. Run it with bb helitorus.

helitorus

lorenz-attractor

the Lorenz attractor traced in 3D. Run it with bb lorenz-attractor.

lorenz-attractor

mesh-generation

eight GenMesh shapes, drawn with DrawMesh. Run it with bb mesh-generation.

mesh-generation

orthographic-projection

perspective vs orthographic (SPACE toggles). Run it with bb orthographic-projection.

orthographic-projection

picking-3d

click a box: a real GetScreenToWorldRay pick. Run it with bb picking-3d.

picking-3d

point-cloud

~1500 points as tiny rlgl cubes, rotating. Run it with bb point-cloud.

point-cloud

rlgl-solar-system

Sun/Earth/Moon via the rlgl matrix stack. Run it with bb rlgl-solar-system.

rlgl-solar-system

rotating-cube

a single cube spinning via the rlgl matrix stack. Run it with bb rotating-cube.

rotating-cube

spinning-cubes

a row of cubes each spinning with a phase offset. Run it with bb spinning-cubes.

spinning-cubes

tesseract-view

a rotating 4D hypercube projected to 2D. Run it with bb tesseract-view.

tesseract-view

textured-cube

two cubes, one textured atlas, one sub-rect. Run it with bb textured-cube.

textured-cube

waving-cubes

an NxN grid of cubes rippling in 3D. Run it with bb waving-cubes.

waving-cubes

wireframe-shapes

pyramid/octahedron/torus/helix in 3D lines. Run it with bb wireframe-shapes.

wireframe-shapes

world-screen

a 2D label tracks a cube via GetWorldToScreen. Run it with bb world-screen.

world-screen

yaw-pitch-roll

the three aircraft rotations in 3D. Run it with bb yaw-pitch-roll.

yaw-pitch-roll

audio (3)

amp-envelope

ADSR amplitude envelope on a 440Hz tone. Run it with bb amp-envelope.

amp-envelope

audio-raw-stream

arrow keys steer a live sine tone's pitch/pan. Run it with bb audio-raw-stream.

audio-raw-stream

audio-stream-callback

raudio pulls samples from its own thread. Run it with bb audio-stream-callback.

audio-stream-callback

core (34)

basic-screen-manager

a LOGO/TITLE/GAMEPLAY/ENDING flow. Run it with bb basic-screen-manager.

basic-screen-manager

camera-2d-mouse-zoom

zoom toward the cursor, pinning the point under it. Run it with bb camera-2d-mouse-zoom.

camera-2d-mouse-zoom

camera-2d-platformer

five ways a camera can follow a jumping player. Run it with bb camera-2d-platformer.

camera-2d-platformer

camera-2d-split-screen

two players, two cameras, two render textures. Run it with bb camera-2d-split-screen.

camera-2d-split-screen

camera2d

a 2D camera over a skyline (struct-by-value). Run it with bb camera2d.

camera2d

clipboard-text

type, C copies, V pastes. Run it with bb clipboard-text.

clipboard-text

compute-hash

CRC32/MD5/SHA1/SHA256 + Base64 of typed text. Run it with bb compute-hash.

compute-hash

core

the minimal raylib window + text. Run it with bb core.

core

custom-logging

raylib's log captured by a jolt callback. Run it with bb custom-logging.

custom-logging

delta-time

per-frame vs delta-time movement. Run it with bb delta-time.

delta-time

directory-files

a file browser over LoadDirectoryFilesEx. Run it with bb directory-files.

directory-files

drop-files

drag files in: FilePathList by value. Run it with bb drop-files.

drop-files

highdpi-demo

logical points vs physical pixels, two rulers. Run it with bb highdpi-demo.

highdpi-demo

highdpi-testbed

diagnostic overlay: monitors, DPI, crosshair. Run it with bb highdpi-testbed.

highdpi-testbed

input

steer a ball with the arrow keys. Run it with bb input.

input

input-actions

abstract input actions: keyboard + gamepad. Run it with bb input-actions.

input-actions

input-gamepad

sticks, triggers and buttons for pad 0. Run it with bb input-gamepad.

input-gamepad

input-gestures

tap, hold, drag and swipe, named as they happen. Run it with bb input-gestures.

input-gestures

input-multitouch

touch points (the mouse is point 0). Run it with bb input-multitouch.

input-multitouch

input-virtual-controls

an on-screen D-pad and action button. Run it with bb input-virtual-controls.

input-virtual-controls

keyboard-testbed

an on-screen ENG-US keyboard, every key lit. Run it with bb keyboard-testbed.

keyboard-testbed

monitor-detector

every attached display, current one lit. Run it with bb monitor-detector.

monitor-detector

mouse

a ball follows the mouse; click to recolor. Run it with bb mouse.

mouse

random-sequence

bars in a shuffled order, each height used once. Run it with bb random-sequence.

random-sequence

random-values

a new random value every two seconds. Run it with bb random-values.

random-values

scissor-test

a scissor rectangle clips a grid. Run it with bb scissor-test.

scissor-test

smooth-pixelperfect

sub-pixel camera smoothing at 5x upscale. Run it with bb smooth-pixelperfect.

smooth-pixelperfect

storage-values

values that survive a restart, via a file. Run it with bb storage-values.

storage-values

undo-redo

move a square, then step back through the history. Run it with bb undo-redo.

undo-redo

viewport-scaling

6 viewport-scaling policies, resize live. Run it with bb viewport-scaling.

viewport-scaling

wheel

scroll a box with the mouse wheel. Run it with bb wheel.

wheel

window-flags

toggle vsync/resizable/topmost live. Run it with bb window-flags.

window-flags

window-letterbox

a fixed picture letterboxed into the window. Run it with bb window-letterbox.

window-letterbox

window-should-close

close is a question: ESC asks before it exits. Run it with bb window-should-close.

window-should-close

games (11)

asteroids

the classic vector shooter (rotate/thrust/fire). Run it with bb asteroids.

asteroids

breakout

paddle + ball + brick grid (mouse paddle). Run it with bb breakout.

breakout

flappy-bird

flap through the pipe gaps (SPACE). Run it with bb flappy-bird.

flappy-bird

game-2048

2048: 4x4 tile-merge puzzle (arrow keys). Run it with bb game-2048.

game-2048

minesweeper

reveal/flag grid (mouse L reveal, R flag). Run it with bb minesweeper.

minesweeper

pacman

pac-man, with the classic ghost personalities. Run it with bb pacman.

pacman

pong

two-paddle classic, you (W/S) vs a CPU. Run it with bb pong.

pong

snake

the classic snake (arrow keys, grow, don't crash). Run it with bb snake.

snake

space-invaders

marching aliens (arrows + SPACE to shoot). Run it with bb space-invaders.

space-invaders

tetris

the block-stacking puzzle (move/rotate/drop). Run it with bb tetris.

tetris

vampire-survivors

auto-fire survival: move, waves chase you. Run it with bb vampire-survivors.

vampire-survivors

generative (10)

boids

flocking birds (separation/alignment/cohesion). Run it with bb boids.

boids

cellular-automata

Wolfram's elementary automata. Run it with bb cellular-automata.

cellular-automata

clock-of-clocks

six digits spelled by a grid of clock hands. Run it with bb clock-of-clocks.

clock-of-clocks

fireworks

rockets + fading particle bursts. Run it with bb fireworks.

fireworks

flow-field

particles steered by a flow field (trails). Run it with bb flow-field.

flow-field

fourier-epicycles

rotating circles trace a square wave. Run it with bb fourier-epicycles.

fourier-epicycles

game-of-life

Conway's Game of Life (SPACE reseeds). Run it with bb game-of-life.

game-of-life

l-system

an L-system fractal plant (grows + regrows). Run it with bb l-system.

l-system

particles

water/smoke/fire particles follow the mouse. Run it with bb particles.

particles

spirograph

animated hypotrochoid roulette curves. Run it with bb spirograph.

spirograph

shaders (20)

ascii-rendering

ascii art from a post-process shader. Run it with bb ascii-rendering.

ascii-rendering

basic-lighting

four point lights, custom vertex shader. Run it with bb basic-lighting.

basic-lighting

color-correction

contrast/saturation/brightness shader. Run it with bb color-correction.

color-correction

custom-uniform

a mouse-steered swirl over a scene. Run it with bb custom-uniform.

custom-uniform

eratosthenes-sieve

the Sieve of Eratosthenes, one test per pixel. Run it with bb eratosthenes-sieve.

eratosthenes-sieve

fog-rendering

exponential distance fog in the light shader. Run it with bb fog-rendering.

fog-rendering

julia-set

the Julia set, mouse-steered, in a shader. Run it with bb julia-set.

julia-set

mandelbrot-set

the Mandelbrot set, zoomable, in a shader. Run it with bb mandelbrot-set.

mandelbrot-set

mesh-instancing

10000 lit cubes in one draw call. Run it with bb mesh-instancing.

mesh-instancing

multi-sampler

two textures blended by a second sampler. Run it with bb multi-sampler.

multi-sampler

palette-switch

bands recolored by an ivec3 palette. Run it with bb palette-switch.

palette-switch

postprocessing

post-process shaders cycled over a scene. Run it with bb postprocessing.

postprocessing

raymarching

a raymarched SDF scene in a shader. Run it with bb raymarching.

raymarching

rounded-rect-shader

SDF rounded rects: fill, border, shadow. Run it with bb rounded-rect-shader.

rounded-rect-shader

shader-hot-reload

swap and recompile the GLSL at runtime. Run it with bb shader-hot-reload.

shader-hot-reload

texture-outline

a shader outline around a sprite's alpha edge. Run it with bb texture-outline.

texture-outline

texture-painting

a blank texture painted by a shader. Run it with bb texture-painting.

texture-painting

texture-rendering

a grid of squares painted entirely by a shader. Run it with bb texture-rendering.

texture-rendering

texture-waves

a starfield rippled by a UV-displacement shader. Run it with bb texture-waves.

texture-waves

vertex-displacement

a flat plane made terrain in the vertex stage. Run it with bb vertex-displacement.

vertex-displacement

shapes (45)

analog-clock

a live analog clock (libc local time). Run it with bb analog-clock.

analog-clock

ball-physics

2D balls under gravity, SPACE respawns. Run it with bb ball-physics.

ball-physics

bounce

a ball bouncing around the window. Run it with bb bounce.

bounce

bullet-hell

a rotating bullet spiral. Run it with bb bullet-hell.

bullet-hell

circle-sector-drawing

a sector whose segment count you can starve. Run it with bb circle-sector-drawing.

circle-sector-drawing

collision-area

AABB collision between two boxes. Run it with bb collision-area.

collision-area

color-wheel

an HSV color wheel (rlgl triangle fan). Run it with bb color-wheel.

color-wheel

colors

every named raylib color in a grid. Run it with bb colors.

colors

dashed-line

a dashed line follows the mouse. Run it with bb dashed-line.

dashed-line

digital-clock

a seven-segment HH:MM:SS clock (libc time). Run it with bb digital-clock.

digital-clock

double-pendulum

chaotic double-pendulum motion + trail. Run it with bb double-pendulum.

double-pendulum

easings

a grid of balls, each on a different easing curve. Run it with bb easings.

easings

easings-ball

slide, swell and fade, one curve each. Run it with bb easings-ball.

easings-ball

easings-box

drop, flatten, spin, grow, fade: five curves. Run it with bb easings-box.

easings-box

easings-rectangles

a grid easing out in size and rotation at once. Run it with bb easings-rectangles.

easings-rectangles

easings-testbed

one curve at a time, plotted and run. Run it with bb easings-testbed.

easings-testbed

ellipse-collision

two ellipses that redden when they overlap. Run it with bb ellipse-collision.

ellipse-collision

eyes

two eyes track the mouse. Run it with bb eyes.

eyes

gradient

a vertical two-color gradient. Run it with bb gradient.

gradient

hilbert-curve

a rainbow Hilbert space-filling curve. Run it with bb hilbert-curve.

hilbert-curve

kaleidoscope

strokes mirrored with 6-fold symmetry. Run it with bb kaleidoscope.

kaleidoscope

lines-bezier

a cubic Bézier that follows the mouse. Run it with bb lines-bezier.

lines-bezier

lines-drawing

a rotating fan of thick lines (line-ex!). Run it with bb lines-drawing.

lines-drawing

the raylib logo from rectangles + text. Run it with bb logo.

logo

logo-anim

the raylib logo assembling itself, unsmoothed. Run it with bb logo-anim.

logo-anim

math-angle-rotation

fixed spokes + a spinning line. Run it with bb math-angle-rotation.

math-angle-rotation

math-sine-cosine

a live unit-circle trig visualization. Run it with bb math-sine-cosine.

math-sine-cosine

mouse-trail

a fading trail follows the cursor. Run it with bb mouse-trail.

mouse-trail

outlines-thickness

thick outlines, and what a negative one does. Run it with bb outlines-thickness.

outlines-thickness

penrose-tiling

a P3 Penrose rhombus tiling (deflation). Run it with bb penrose-tiling.

penrose-tiling

pie-chart

labelled pie slices via rl/sector!. Run it with bb pie-chart.

pie-chart

rectangle-advanced

per-side roundness with a horizontal gradient. Run it with bb rectangle-advanced.

rectangle-advanced

rectangle-scaling

drag the corner handle to resize a rect. Run it with bb rectangle-scaling.

rectangle-scaling

recursive-tree

a binary fractal tree. Run it with bb recursive-tree.

recursive-tree

ring-drawing

an animated annulus via rl/ring!. Run it with bb ring-drawing.

ring-drawing

rlgl-color-wheel

a hue wheel as a triangle fan, per-vertex colour. Run it with bb rlgl-color-wheel.

rlgl-color-wheel

rlgl-triangle

a Gouraud triangle with draggable corners. Run it with bb rlgl-triangle.

rlgl-triangle

rounded-rectangle

rounded rects via sector! corners. Run it with bb rounded-rectangle.

rounded-rectangle

shapes

shape primitives + an rlgl triangle. Run it with bb shapes.

shapes

splines

Catmull-Rom / Bezier / B-spline (SPACE cycles). Run it with bb splines.

splines

starfield-effect

flying starfield (wheel=speed, SPACE=mode). Run it with bb starfield-effect.

starfield-effect

stars

a twinkling starfield. Run it with bb stars.

stars

top-down-lights

lights and shadow volumes in an alpha mask. Run it with bb top-down-lights.

top-down-lights

triangle-strip

a rainbow strip via rlgl immediate mode. Run it with bb triangle-strip.

triangle-strip

vector-angle

the angle between two vectors (arc + readout). Run it with bb vector-angle.

vector-angle

text (8)

format-text

padded score + MM:SS timer readouts. Run it with bb format-text.

format-text

inline-styling

colour markup inside the string itself. Run it with bb inline-styling.

inline-styling

input-box

type into a text box (GetCharPressed). Run it with bb input-box.

input-box

rectangle-bounds

draggable word-wrap text container. Run it with bb rectangle-bounds.

rectangle-bounds

strings-management

bouncing text you slice, shatter and glue. Run it with bb strings-management.

strings-management

text

font sizes + MeasureText centering. Run it with bb text.

text

words-alignment

align a word inside a box (MeasureText). Run it with bb words-alignment.

words-alignment

writing-anim

a message types itself out. Run it with bb writing-anim.

writing-anim

textures (28)

background-scrolling

three parallax skyline layers, each scrolling. Run it with bb background-scrolling.

background-scrolling

blend-modes

four 2D blend modes over a night skyline. Run it with bb blend-modes.

blend-modes

bunnymark

the sprite-count benchmark (click to add). Run it with bb bunnymark.

bunnymark

fog-of-war

fog lifted by a 25x15 render texture. Run it with bb fog-of-war.

fog-of-war

framebuffer-rendering

two cameras, two framebuffers, one scene. Run it with bb framebuffer-rendering.

framebuffer-rendering

image-channel

R/G/B/A split; alpha masked to show structure. Run it with bb image-channel.

image-channel

image-drawing

shapes baked once, then drawn live each frame. Run it with bb image-drawing.

image-drawing

image-generation

nine procedural textures, none of them loaded. Run it with bb image-generation.

image-generation

image-kernel

sharpen, sobel and gaussian, one call each. Run it with bb image-kernel.

image-kernel

image-processing

nine CPU-side image operations, picked live. Run it with bb image-processing.

image-processing

image-rotate

0/90/180/270 exact, one angle grows the buffer. Run it with bb image-rotate.

image-rotate

image-text

text baked into the image, pixelates at 4x. Run it with bb image-text.

image-text

magnifying-glass

a round lens that reveals hidden markers. Run it with bb magnifying-glass.

magnifying-glass

mouse-painting

a paint program on a render-texture canvas. Run it with bb mouse-painting.

mouse-painting

npatch-drawing

nine-patch stretching, corners held fixed. Run it with bb npatch-drawing.

npatch-drawing

particles-blending

200 sparks trail the mouse, alpha vs additive. Run it with bb particles-blending.

particles-blending

polygon-drawing

hue-wheel texture on a spinning polygon. Run it with bb polygon-drawing.

polygon-drawing

raw-data

textures built from a hand-filled byte buffer. Run it with bb raw-data.

raw-data

render-texture

a scene drawn off-screen, then reused. Run it with bb render-texture.

render-texture

screen-buffer

the classic DOS fire effect. Run it with bb screen-buffer.

screen-buffer

sprite-animation

six generated poses, one source rectangle. Run it with bb sprite-animation.

sprite-animation

sprite-button

one sheet, three states, sliced by v. Run it with bb sprite-button.

sprite-button

sprite-stacking

40 generated slices faking a 3D car. Run it with bb sprite-stacking.

sprite-stacking

srcrec-dstrec

srcrec picks the frame, dstrec scales+spins it. Run it with bb srcrec-dstrec.

srcrec-dstrec

texture-procedural

four textures built pixel by pixel. Run it with bb texture-procedural.

texture-procedural

texture-tiling

one tile repeated across the window. Run it with bb texture-tiling.

texture-tiling

textured-curve

a texture laid along a cubic Bezier. Run it with bb textured-curve.

textured-curve

to-image

one image, VRAM to RAM to VRAM and back up. Run it with bb to-image.

to-image