Table of Contents

Code-Only Examples

Every code-only example, with a screenshot of what it actually renders. Each one is a complete, self-contained program you can copy and run.

Prefer a list? Each level has its own page, linked from the table of contents.

Note

Most examples run from a copy of their project with the toolkit packages from NuGet. Stride.CommunityToolkit.Box2D, Stride.CommunityToolkit.Charts and Stride.CommunityToolkit.ImGuiNet are not on NuGet yet, so the examples built on them run from a clone of the repository: Box2D Explosion, Box2D Joints, Box2D Car, Box2D Character Mover, Charts 2D, Charts 3D, Basic 2D Scene (Stress Pile, Box2D), Junkyard (Box2D), Junkyard Playground (Box2D), Box2D.NET Physics, ImGui.NET Text Rendering.

C# Getting Started

Screenshot of the Basic3D Scene (Capsule) example

Basic3D Scene (Capsule)

Shapes

Create a minimal 3D scene using toolkit helpers, add a skybox, and place a single capsule primitive.

Screenshot of the Basic3D Scene (Engine Only) example

Basic3D Scene (Engine Only)

Shapes

A ground, a cube and a camera written against Stride alone, with no toolkit package: the graphics compositor, the camera, the lights, the procedural...

Screenshot of the Basic3D Scene (Capsule) - File-Based App example

Basic3D Scene (Capsule) - File-Based App

Shapes

The same minimal 3D scene as E01_3D_BasicScene, written as a .NET 10 file-based app: a single C# file with no .csproj.

Screenshot of the Basic2D Scene (Capsule) example

Basic2D Scene (Capsule)

Shapes

Create a minimal 2D scene using toolkit helpers and place a single capsule primitive with a flat material.

Screenshot of the Basic2D Scene (Capsule) - Bullet Physics example

Basic2D Scene (Capsule) - Bullet Physics

Shapes

Create a minimal 2D scene using toolkit helpers and place a single capsule primitive.

Screenshot of the Basic3D Scene (Capsule) - Bullet Physics example

Basic3D Scene (Capsule) - Bullet Physics

Shapes

The same first scene as E01_3D_BasicScene, running on the legacy Bullet physics engine instead of Bepu.

C# Beginner

Screenshot of the Basic3D Scene (Every Primitive) example

Basic3D Scene (Every Primitive)

Shapes

Every 3D primitive the toolkit can build - cube, cone, capsule, sphere, cylinder, teapot, torus and triangular prism - dropped into one scene so the...

Screenshot of the Basic Gum UI Setup example

Basic Gum UI Setup

UI

Initialize Gum UI in Stride using the official Gum.Stride runtime and the Stride Community Toolkit.

Screenshot of the Material example

Material

Rendering

The four numbers of a material, one per row of cubes: a glossiness sweep from rough to mirror, a metalness sweep from dielectric to metal, and a front...

Screenshot of the Post Effects example

Post Effects

Rendering

Every post effect Stride ships, one key each: bloom, ambient occlusion, screen-space reflections, depth of field, light streaks, lens flare, fog,...

Screenshot of the Mesh Line example

Mesh Line

Geometry

A line drawn between two spheres, built as a real mesh rather than a debug primitive.

Screenshot of the Wav File example

Wav File

Audio

Play a .wav read from disk at runtime, with no compiled asset: LoadWav decodes the file into memory and each CreateInstance is an independent...

Screenshot of the Procedural Sound example

Procedural Sound

Audio

A tone with no sound file: a callback computes the samples as they play.

Screenshot of the Give Me a Cube example

Give Me a Cube

Scripts

Add behaviour to an entity with a SyncScript component instead of the update callback of game.Run.

Screenshot of the Grabber example

Grabber

Physics

A gravity gun: click any body to pick it up, carry it on the end of the camera ray, and let go - with its velocity, so a flick throws it.

Screenshot of the SyncScript - moving a body every frame example

SyncScript - moving a body every frame

Scripts

A cube driven in a circle by a SyncScript, which is the ordinary way to run code every frame.

Screenshot of the Entity Text (Screen-Space) example

Entity Text (Screen-Space)

Text

A gallery of everything EntityTextComponent can do, one feature per pole: anchoring, shadows, backgrounds, scaling, rotation, opacity, distance...

Screenshot of the Easing Basics example

Easing Basics

Mathematics

Easing from the ground up, in four lanes that move a disc over the same two seconds: by hand with no easing, by hand with one formula, with the...

Screenshot of the Easing Cheat Sheet example

Easing Cheat Sheet

Mathematics

Every easing curve in the toolkit on one screen: a tile per curve with its graph, a dot riding the graph on a shared clock, and a slider that moves...

Screenshot of the Easing in a 3D Game example

Easing in a 3D Game

Mathematics

Easing doing real work in a 3D scene, four ways, each one a Tween: a kinematic platform lifts a stack of physics bodies on a sine curve and comes back...

Screenshot of the Easing in a 2D Game example

Easing in a 2D Game

Mathematics

Easing doing real work in a 2D physics scene, each piece a Tween: a kinematic lift carries a stack of boxes up and down on a sine curve, coins pop in...

Screenshot of the World Text (In-Scene) example

World Text (In-Scene)

Text

A gallery of everything WorldTextComponent can do, one setting per station: billboarding that stays upright, free billboarding, text fixed in place,...

Screenshot of the 2D Panels and Text example

2D Panels and Text

Shapes

Twenty-four HUD panel recipes side by side, each one property away from the last: fill only, border only, transparent fill over a stripe that proves...

Screenshot of the Basic2D Scene (Multiple Primitives) example

Basic2D Scene (Multiple Primitives)

Shapes

Create a minimal 2D scene using toolkit helpers and place multiple different primitive shapes.

Screenshot of the Basic2D Scene (Falling Shapes) example

Basic2D Scene (Falling Shapes)

Physics

Create a minimal 2D scene using toolkit helpers and place multiple capsule primitives with flat materials.

Screenshot of the Box2D Explosion example

Box2D Explosion

Physics

A grenade in one call: Explode gives every shape within a radius an impulse away from the centre, per metre of perimeter facing the blast, so a wide...

Screenshot of the Basic2D Scene (Debug Rendering) example

Basic2D Scene (Debug Rendering)

Debug

A pile of falling 2D shapes with the physics debug overlays turned on, so what the simulation is actually solving can be seen rather than inferred.

Screenshot of the DPI-Aware Window example

DPI-Aware Window

Debug

The capsule scene again, with two differences.

C# Intermediate

Screenshot of the Procedural Geometry example

Procedural Geometry

Geometry

A triangle, a plane and a circle built at runtime with MeshBuilder, which handles the vertex layout and buffer bookkeeping that raw buffers make you...

Screenshot of the Simple Geometry (Labelled Triangle) example

Simple Geometry (Labelled Triangle)

Geometry

The smallest possible custom mesh - one triangle from three vertices - with each vertex labelled on screen so the relationship between the numbers in...

Screenshot of the Material Gallery example

Material Gallery

Rendering

The engine's material system on a ring of stations, all from code: the four numbers of a PBR material first, then the maps, the inputs a map can be...

Screenshot of the Material Preview example

Material Preview

Rendering

Game Studio's material thumbnail rebuilt in code, with the editor's own numbers: the forward renderer with no post effects on a grey background, a...

Screenshot of the Cylinder Mesh example

Cylinder Mesh

Geometry

A cylinder generated with MeshBuilder, split into the three jobs any surface of revolution needs: place a ring of vertices, join consecutive rings...

Screenshot of the Partial Torus Mesh example

Partial Torus Mesh

Geometry

A torus defined parametrically from two angles - one around the tube, one around the ring - and cut short by limiting the second, which turns the same...

Screenshot of the 3D Letters (Mesh Text) example

3D Letters (Mesh Text)

Text

A gallery of every glyph LetterMeshFactory can build - the digits, the full A-Z alphabet and the dash - as solid extruded meshes that catch the light...

Screenshot of the Give Me a Cube (SimulationUpdate) example

Give Me a Cube (SimulationUpdate)

Physics

Drive an entity from the physics clock instead of the render loop.

Screenshot of the Raycast example

Raycast

Physics

Click the ground and a sphere is kicked towards where you clicked; click the sphere and it stops dead.

Screenshot of the Ship HUD example

Ship HUD

Shapes

A cockpit HUD composed from the toolkit's shapes and world text: a heading tape that scrolls, a pitch ladder, a gun-sight, speed and altitude tapes...

Screenshot of the Spatial Sound example

Spatial Sound

Audio

3D positional audio for a runtime sound: a looping pad on an orb that circles a pillar, heard from the camera.

Screenshot of the Collision Group example

Collision Group

Physics

Two players and an enemy, where the players collide with each other but the enemy passes through both.

Screenshot of the Collision Layer example

Collision Layer

Physics

The same players-and-enemy scene as the collision group example, solved the other way.

Screenshot of the Box2D Joints example

Box2D Joints

Physics

Every Box2D joint, one rig each, in a row you can pull on: a hinge pendulum with a motor and a limit, a slider on a spring, a wheel on a suspension, a...

Screenshot of the Box2D Car example

Box2D Car

Physics

A car on two wheel joints over hilly terrain: the wheel joint pins the wheel, lets it turn, springs it along the suspension axis with a travel limit,...

Screenshot of the Box2D Character Mover example

Box2D Character Mover

Physics

A platformer character with no rigid body, on Box2D v3's mover API: a capsule the game moves itself, Quake style, asking the world only what it...

Screenshot of the Multiple Physics Simulations example

Multiple Physics Simulations

Physics

Two Bepu simulations in one game, side by side: the left lane falls under Earth gravity, the right under Moon gravity, and an amber ball that belongs...

Screenshot of the Car example

Car

Physics

A drivable car from four constraints per wheel, the recipe of bepuphysics2's own car demo in Stride's components: a linear axis servo as the...

Screenshot of the Cloth example

Cloth

Physics

Cloth from ordinary bodies and constraints, the way bepuphysics2's own demo does it: a lattice of sphere nodes tied by distance limits that may bunch...

Screenshot of the Simple Constraint example

Simple Constraint

Physics

One constraint, doing one thing: a distance servo holding two spheres three units apart, pulling them together or pushing them apart until they settle...

Screenshot of the Constraints - Servo vs Motor vs Limit example

Constraints - Servo vs Motor vs Limit

Physics

The three kinds of Bepu constraint, side by side.

Screenshot of the First-Person Character (Bepu) example

First-Person Character (Bepu)

Physics

A first-person character built entirely from code - no Game Studio scene - on a Bepu CharacterComponent, with boxes to walk into and jump onto.

Screenshot of the GPU Instancing example

GPU Instancing

Performance

Render two identical walls of cubes built two different ways, side by side.

Screenshot of the Particle Gallery example

Particle Gallery

Rendering

Thirty-one particle systems on a ring of stations, all built from code: the building blocks one at a time - spawners, shapes, initializers, updaters,...

Screenshot of the Debug Shapes example

Debug Shapes

Debug

The full tour of the DebugShapes package: every immediate-mode primitive it can draw, exercised from a ShapeUpdater component so the shapes animate...

Screenshot of the Render to Texture example

Render to Texture

Rendering

Five cameras watch one scene and each draws into a texture shown on a monitor: an overhead map, a chase camera following an orbiting ball, a fixed...

Screenshot of the GPU Picking example

GPU Picking

Rendering

What is under the mouse, answered by the renderer instead of by physics.

Screenshot of the Debug Shapes Usage example

Debug Shapes Usage

Debug

The short version of the debug shapes example: turn the system on, draw a sphere and a circle, done.

Screenshot of the ShapeBatch Gallery example

ShapeBatch Gallery

Rendering

A ring of numbered stations, one ShapeBatch idea each, from a single disc to a scrolling textured panel: discs, rings, polygons and rectangles on any...

Screenshot of the Stride UI - Capsule and Window example

Stride UI - Capsule and Window

UI

A capsule in a 3D scene with a "Hello, World" panel drawn over it using Stride's built-in UI.

Screenshot of the Stride UI - Button Hover Animation example

Stride UI - Button Hover Animation

UI

A main menu built from code whose buttons grow a blue underline while the pointer is over them.

Screenshot of the ImGui UI example

ImGui UI

UI

An ImGui overlay for in-game tools, debug panels and live tweaking.

Screenshot of the 2D Spawn Menu example

2D Spawn Menu

Input

Drive a scene from the keyboard without filling the screen with instructions.

Screenshot of the Cube Clicker example

Cube Clicker

UI

A small clicker game: cubes appear, left and right clicks are counted, and both the score and the cube positions are written to disk so the next run...

Screenshot of the Charts 2D example

Charts 2D

Rendering

A flat, paper-like chart drawn entirely in code - no assets, no chart control, every line a pixel-width stroke in a shape batch.

Screenshot of the Charts 3D example

Charts 3D

Rendering

The same code-only chart API as the 2D example, in a lit 3D scene.

C# Advanced

Screenshot of the Custom Scene Renderers example

Custom Scene Renderers

Rendering

Two ways to draw your own 2D content over a 3D scene, side by side.

Screenshot of the Root Renderer Shader example

Root Renderer Shader

Rendering

An animated ribbon background drawn by a custom RootRenderFeature, which is the deepest extension point Stride offers short of writing your own...

Screenshot of the Mesh Outline Render Feature example

Mesh Outline Render Feature

Rendering

Draw coloured outlines around 3D primitives with a custom RootRenderFeature.

Screenshot of the Image Processing (TextureCanvas) example

Image Processing (TextureCanvas)

Rendering

Every combination of anchor and stretch that TextureCanvas can apply, drawn as a grid of thumbnails so the options can be compared rather than read...

Screenshot of the Instancing with Entity Transforms example

Instancing with Entity Transforms

Performance

Keep every object a real entity - with a transform, a physics body and anything else you need - while still drawing the whole crowd in a single draw...

Screenshot of the Basic2D Scene (Stress Pile) example

Basic2D Scene (Stress Pile)

Performance

Thousands of 2D physics bodies piling up, drawn in two instanced draw calls - awake bodies through one master, sleeping bodies tinted green through...

Screenshot of the Basic 2D Scene (Stress Pile, Box2D) example

Basic 2D Scene (Stress Pile, Box2D)

Performance

The Box2D twin of the stress pile: thousands of bodies piling up, drawn in two instanced draw calls - awake bodies through one master, sleeping bodies...

Screenshot of the Junkyard (Box2D) example

Junkyard (Box2D)

Performance

A faithful replica of the Box2D.NET BenchmarkJunkyard sample: 8,000 small five-sided rocks rain into a walled yard and a kinematic plow sweeps back...

Screenshot of the Junkyard Playground (Box2D) example

Junkyard Playground (Box2D)

Physics

The playground sibling of the Junkyard replica: the same walled yard and sweeping plow, built the Stride way - every shape is an entity carrying...

Screenshot of the Various Constraints example

Various Constraints

Physics

The full tour of Bepu constraints in one interactive scene: a distance limit holding two spheres within a range, a distance servo actively driving a...

Screenshot of the Rope - building a stable chain of constraints example

Rope - building a stable chain of constraints

Physics

Bepu has no rope type, so a rope is a chain of small bodies tied together at runtime.

Screenshot of the Box2D.NET Physics example

Box2D.NET Physics

Physics

A 2D simulation run by Box2D.NET rather than by Stride's own physics, with Stride reduced to drawing the result.

Screenshot of the Jitter2 Physics Integration example

Jitter2 Physics Integration

Physics

Demonstrates integrating Jitter2 physics engine with Stride.

Screenshot of the Jitter2 Physics - Constraining to 2D example

Jitter2 Physics - Constraining to 2D

Physics

Demonstrates constraining a Jitter2 3D physics simulation to 2D-style behaviour.

Screenshot of the Stride UI - Draggable Window example

Stride UI - Draggable Window

UI

A windowing system built on Stride's UI: windows with title bars and close buttons that can be dragged around, and that come to the front when...

Screenshot of the Stride UI - Draggable Window - Bullet Physics example

Stride UI - Draggable Window - Bullet Physics

UI

The draggable window example running on the legacy Bullet physics engine.

Screenshot of the Compute Shader Boids example

Compute Shader Boids

Performance

A flock of thousands of boids that lives entirely on the GPU.

Screenshot of the ImGui.NET Text Rendering example

ImGui.NET Text Rendering

UI

Render debug text with ImGui.NET, both in screen space and anchored to positions in the 3D scene.

Screenshot of the Stride + SignalR - Orbital Cargo Deck example

Stride + SignalR - Orbital Cargo Deck

Networking

A Stride game and a Blazor web page as two consoles of the same orbital cargo deck, talking both ways over a SignalR hub.

Screenshot of the Game - Cube Collapse example

Game - Cube Collapse

Game

A colour-match collapse puzzle built entirely from code.

C# Other

Screenshot of the Collidable Gizmo example

Collidable Gizmo

Debug

A single-purpose demo of CollidableGizmoScript, which draws the collider Bepu is actually using so it can be compared against the model you think you...

Screenshot of the Debug Render Component example

Debug Render Component

Debug

The companion to the collidable gizmo: DebugRenderComponentScript draws the wireframe of an entity's own mesh rather than its collider.

F# Getting Started

Screenshot of the Capsule with rigid body in F# example

Capsule with rigid body in F#

Shapes

The first code-only scene written in F#.

F# Intermediate

Screenshot of the Partial Torus Mesh in F# example

Partial Torus Mesh in F#

Geometry

The parametric partial torus, written in F#.

Visual Basic Getting Started

Screenshot of the Capsule with rigid body in Visual Basic example

Capsule with rigid body in Visual Basic

Shapes

The first code-only scene written in Visual Basic.