NEOLearn

Examples

More than 400 small programs that each show one part of the NEO engine, grouped by category, with what each one shows and the command that runs it.

Updated October 20, 2026

On this page

The engine source comes with more than 400 examples: small, self-contained programs that each show one part of the engine, from printing "Hello, World!" to a full PBR scene. Each one is a single Rust file you can read, run and change. They are the quickest way to see how an API is meant to be used.

The pages below list every example by category, with what it shows, whether it also runs in a browser, and the command that runs it.

Run an example#

The examples live in the engine core's own Cargo workspace, under examples/. From that folder of the engine source (the one that holds the neo crate's Cargo.toml):

Shell
cargo run --example hello_world
cargo run --release --example breakout       # optimised: smoother, slower to compile

The first build compiles the whole engine and takes a few minutes; later runs only rebuild the example. Every example's source starts with a comment saying what it shows, and the file is at the path its category page names it by, for example examples/games/breakout.rs.

Some examples need extra cargo features, and the Run column includes them:

Shell
cargo run --example fps_overlay --features neo_dev_tools,render_dev_tools

Several of those features (neo_feathers, free_camera, neo_dev_tools and others) aren't on in NEO's game builds. Running an example with them is fine; using the same thing in a game means turning the feature on for the game too. See Cargo features.

On Linux, pick a display server with --features x11 or --features wayland if the default doesn't open a window.

Run an example in a browser#

Examples marked Web: Yes also run as WebAssembly with WebGL 2. The workspace has a helper that builds one and writes the page's files to examples/wasm/:

Shell
rustup target add wasm32-unknown-unknown
cargo install wasm-bindgen-cli --version <the version in Cargo.lock>
cargo run -p build-wasm-example -- --api webgl2 breakout

Then serve the examples/wasm folder with any static web server and open it. --debug builds without optimisations, --features a,b adds cargo features, and --api webgpu builds for WebGPU instead, which NEO's own web builds don't use. To package a whole game for the browser, see Web builds.

Categories#

CategoryExamplesWhat they cover
2D rendering29Sprites, 2D meshes and shapes, 2D cameras and 2D post-processing.
3D rendering62Meshes, materials, lights, shadows, the environment, post-processing and anti-aliasing.
Animation13Clips, graphs, masks, morph targets, easing and animated properties.
Application19Plugins, runners, headless apps, exiting, logging and settings.
Assets18Loading, asset events, custom assets and loaders, sources, saving and processing.
Async tasks3Work on the task pools.
Audio8Sounds, music, playback control and spatial audio.
Camera9Projections, viewports, controllers and following a target.
Dev tools4The FPS overlay, the infinite grid, schedule data and the inspector.
Diagnostics3Frame time and your own diagnostics.
ECS35Entities, components, systems, queries, messages, observers, hooks, relationships and schedules.
Games7Small complete games: Breakout, a minesweeper, a game menu and a loading screen.
Gizmos9Debug drawing in 2D and 3D.
glTF9glTF scenes, meshes, materials and extensions.
Input12Keyboard, mouse, gamepads, touch, text input and IME.
Math6Primitives, bounding volumes, curves, sampling and ray casts.
Picking7Pointer events on meshes, sprites and UI.
Reflection10Runtime type information, the type registry and serialization.
Remote protocol4Inspecting and controlling a running app from outside.
Scene2Saving a world as a scene and spawning it back.
Shaders31Custom materials, shader defs, post-processing passes and compute shaders.
State4States, sub-states, computed states and custom transitions.
Stress tests19Heavy workloads for measuring performance.
Time3Time, virtual time, timers and the fixed timestep.
Transforms5Moving, rotating and scaling, and the hierarchy.
UI66Layout, text, images, buttons, scrolling, focus and widgets.
Window11Window settings, multiple windows, cursors and screenshots.
Other8Usage patterns, fixed-timestep movement, small tools and a no_std library.

Examples in NEO's own crates#

NEO's gameplay crates have examples of their own, run with -p from the engine source's root workspace rather than from the engine core's. For example, the gameplay kit's third-person character:

Shell
cargo run -p neo_gameplay_kit --example third_person

See Gameplay kit.

Next steps#