This repository follows the "The Nature of Code" book by Daniel Shiffman, implemented in Zig with Raylib.
This project contains implementations of the examples and exercises from the book "The Nature of Code". It uses the Zig programming language and Raylib for graphics.
- Zig (greater than 0.13.0 - the version tested on)
To build the main executable:
zig buildThis project includes several example implementations. Each example can be built and run individually.
Here are the examples included so far:
RandomWalk:./src/00_randomness/RandomWalk.zigUniformDistribution:./src/00_randomness/UniformDistribution.zigRightWalker:./src/00_randomness/RightWalker.zigNormalDistribution:./src/00_randomness/NormalDistribution.zigAcceptRejectDistribution:./src/00_randomness/AcceptRejectDistribution.zigWalkerRandomSteps:./src/00_randomness/WalkerRandomSteps.zigPerlinGraphs:./src/00_randomness/PerlinGraphs.zig
To build an example:
zig build <ExampleName>To run an example:
zig build run-<ExampleName>Replace <ExampleName> with the name of the example you want to run, e.g., RandomWalk.