Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 648 Bytes

README.md

File metadata and controls

27 lines (18 loc) · 648 Bytes

Snake

SDL's example Snake game, written in C, built using the Zig build system.

Uses the castholm/SDL Zig package, which builds SDL3 from source using the Zig build system.

Preview

Building

Requires Zig 0.12.1, 0.13.0 or 0.14.0-dev (master).

# Run the game
zig build run

# Cross-compile for Windows
zig build -Dtarget=x86_64-windows-gnu -Doptimize=ReleaseFast

# Cross-compile for Linux
zig build -Dtarget=x86_64-linux-gnu -Doptimize=ReleaseFast