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 Events, 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 Basic 3D Scene (Capsule) example

Basic 3D Scene (Capsule)

Shapes

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

Screenshot of the Basic 3D Scene (Engine Only) example

Basic 3D 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 Basic 3D Scene (Capsule) - File-Based App example

Basic 3D 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 Basic 2D Scene (Capsule) example

Basic 2D Scene (Capsule)

Shapes

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

Screenshot of the Basic 2D Scene (Capsule) - Bullet Physics example

Basic 2D Scene (Capsule) - Bullet Physics

Shapes

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

Screenshot of the Basic 3D Scene (Capsule) - Bullet Physics example

Basic 3D 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 3D Primitives example

3D Primitives

Shapes

Nine of the toolkit's 3D primitives - cube, box, cone, capsule, sphere, cylinder, teapot, torus and triangular prism - dropped into one scene so the...

Screenshot of the 2D Primitives example

2D Primitives

Shapes

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

Screenshot of the Basic Gum UI Setup example

Basic Gum UI Setup

UI

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

Screenshot of the Basic 3D Scene (Falling Shapes) example

Basic 3D Scene (Falling Shapes)

Shapes

The next step after the basic 3D scene: thirty shapes of five kinds and five colours, dropped in a column that topples into a pile.

Screenshot of the 3D Material example

3D Material

Rendering

The four numbers of a material over three rows of cubes: a glossiness sweep from rough to mirror, a metalness sweep from dielectric to metal, and a...

Screenshot of the 2D Material example

2D Material

Rendering

What each material helper does on a flat shape, in four rows of squares: the flat material a 2D scene wants, the same colours as a lit material, black...

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 attached to a sphere, 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 Basic 2D Scene (Falling Shapes) example

Basic 2D Scene (Falling Shapes)

Shapes

The next step after the basic 2D scene: thirty shapes of five kinds and five colours, dropped in a column that topples into a pile.

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 Collider Shapes example

Collider Shapes

Physics

One of every primitive shape dropped side by side, each with the collider the toolkit fits to it: a box, a sphere, a capsule and a cylinder get their...

Screenshot of the Reset Out of Bounds example

Reset Out of Bounds

Physics

A row of balls drops onto a tilted plank with no ground under it, rolls off its low end and falls.

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 Physics Materials example

Physics Materials

Physics

How to make something bouncy and how to make something slippery.

Screenshot of the Mesh Colliders example

Mesh Colliders

Physics

A collider made from real geometry, two ways: a convex hull wraps the model in the smallest convex shape that holds it, so a ring becomes a disc, and...

Screenshot of the Compound Colliders example

Compound Colliders

Physics

A hammer, a dumbbell and an L-piece, each one body whose compound collider holds a collider per piece at its own local pose and mass, beside the same...

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 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 five 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 HUD Basics (Step by Step) example

HUD Basics (Step by Step)

Shapes

A simple HUD built in eight steps with ShapeBatch: a panel in a corner, a health bar, an energy dial, a crosshair, labels, a warning panel and a...

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: fills, borders, rounded corners, glows of three strengths, glass, a...

Screenshot of the Trigger Zones example

Trigger Zones

Physics

Reacting to contact, three ways.

Screenshot of the Falling Shapes with Physics Options (2D) example

Falling Shapes with Physics Options (2D)

Physics

Thirty capsules and a rectangle dropped in a column, as in E01_2D_FallingShapes, with one thing added: each capsule is given its own Body2DComponent...

Screenshot of the Box2D Events example

Box2D Events

Physics

Shapes drop through a sensor zone onto a floor and one handler listens to everything Box2D reports: begin and end touch, hits with their approach...

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 Time Control example

Time Control

Physics

The simulation has a clock of its own, with three knobs: TimeScale runs it slower or faster than the game, Enabled pauses it, and PoseGravity changes...

Screenshot of the Basic 2D Scene (Debug Rendering) example

Basic 2D Scene (Debug Rendering)

Debug

A pile of falling 2D shapes with the physics text 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.

Screenshot of the Game - Pong example

Game - Pong

Game

Pong, the first game: two paddles, a ball and a score to seven, with no assets and no physics engine.

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 Scene Switching example

Scene Switching

Scripts

Rooms as child scenes: three rooms built in code, each a scene attached to the root by adding it to Children and detached by removing it, one at a...

Screenshot of the 3D Text from a Font example

3D Text from a Font

Text

Solid 3D text from a real font: TextMesh reads a font's glyph outlines through the FreeType the engine ships, triangulates them, holes and all, and...

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

Two raycasts with two jobs.

Screenshot of the Shape Queries example

Shape Queries

Physics

Two questions a raycast cannot answer: what is inside this volume right now, and what would this shape touch first if it moved that way.

Screenshot of the Ship HUD example

Ship HUD

Shapes

A cockpit HUD composed from the toolkit's shapes and world text, with one widget per file.

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 Impact Sounds example

Impact Sounds

Audio

Balls of three sizes drop onto a plate and every landing is heard.

Screenshot of the Collision Group example

Collision Group

Physics

Collision groups are a number rule inside a layer: bodies with the same group Id ignore each other when their indexes are the same or adjacent, and...

Screenshot of the Collision Layer example

Collision Layer

Physics

Four layers, Players, Enemies, Shots and Debris, and the collision matrix that says which pairs collide, shown twice: as a grid on screen and as the...

Screenshot of the Debris Filtering example

Debris Filtering

Physics

A burst of a few hundred fragments lands in a walled pit.

Screenshot of the Dodgeball example

Dodgeball

Physics

Dodgeball on four collision layers: each team's players and each team's balls have a layer of their own, and the matrix says a team's balls pass...

Screenshot of the Cube Fountain example

Cube Fountain

Physics

A fountain of cubes, spheres and cylinders that runs on the physics clock.

Screenshot of the Planet Gravity example

Planet Gravity

Physics

A ring of bodies orbiting a planet.

Screenshot of the Solver Substeps example

Solver Substeps

Physics

Why a tall stack wobbles and what firms it up.

Screenshot of the Layer Selection example

Layer Selection

Physics

Selecting things through collision layers.

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 Third-Person Camera example

Third-Person Camera

Physics

A character on a stepped pyramid with the toolkit's follow camera behind it: the camera trails the character's steps with a short lag, swings round it...

Screenshot of the Planet Walker example

Planet Walker

Physics

A character walking round a planet with the follow camera behind it.

Screenshot of the GPU Instancing example

GPU Instancing

Performance

Render two walls of the same cube built two different ways, side by side.

Screenshot of the Particle Gallery example

Particle Gallery

Rendering

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

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 Split Screen example

Split Screen

Rendering

Two players in one window.

Screenshot of the View Model example

View Model

Rendering

The weapon that never clips: a tool held in front of a first-person camera is drawn by a camera of its own over the finished view.

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

Three ways to draw 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

Every object stays a real entity, with a transform and a physics body, while the whole crowd is drawn in one draw call: a master entity holds the...

Screenshot of the 3D Text Shaders example

3D Text Shaders

Text

Four materials on the same solid lettering, which is geometry like any other with normals and texture coordinates: a gradient texture read through the...

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

Basic 2D 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 the Jitter2 physics engine with Stride.

Screenshot of the Jitter2 Physics - Constraining to 2D example

Jitter2 Physics - Constraining to 2D

Physics

Demonstrates restricting a Jitter2 3D physics simulation to 2D-style behaviour using axis locking.

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 Myra UI - Draggable Window and Services example

Myra UI - Draggable Window and Services

UI

Myra, an external UI library, hosted inside Stride: a draggable window, two health bars - one declared in the view, one added while it runs - and...

Screenshot of the Myra UI - Control Panel example

Myra UI - Control Panel

UI

Myra's widget set at work in one draggable window that drives a Stride scene: a menu bar, tabs, a grid of sliders for the light and the physics clock,...

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 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 from code, its six compiled sound assets the one exception.

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 every entity's mesh rather than its collider, from one script...

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.