C# Code Only Basic Examples
This page briefly overviews the basic examples available for code-only projects in Stride. Each linked page includes focused code snippets and explanations.
Examples Overview
- Capsule with rigid body: Demonstrates creating and positioning a 3D capsule in a scene.
- Mesh line: Demonstrates creating a mesh line.
- Material: Demonstrates creating a material and applying it to a 3D entity.
- Give me a cube: A variant of the above, positioning a 3D cube in a scene.
- Stride UI - Capsule with rigid body and Window: Demonstrates creating a 3D capsule, positioning it, and showing a simple window with text.
- Stride UI - Grid - Save and load game state: Demonstrates a simple game where clicking a cube increases the score and manages game state.
- Procedural geometry: Demonstrates creating procedural meshes (triangle, plane, circle) and adding them to a scene.
- Cylinder mesh: Demonstrates creating a cylinder mesh.
- Partial torus mesh: Demonstrates creating a partial torus mesh.
- Particles: Demonstrates creating a particle system.
- Raycast: Demonstrates raycasting and physics interactions.
- Collision Group: Demonstrates a scene with two players and an enemy using collision groups.
- Collision Layer: Demonstrates a similar scene using collision layers.
Interactive Console Application
Prefer an interactive approach? Use the console app in the Stride.CommunityToolkit.Examples
project. It provides a menu to select and run examples directly.
Here's a glimpse of the interactive menu:
Stride Community Toolkit Examples
[1] Basic Example - Capsule with rigid body
[2] Basic Example - Capsule with rigid body - Bullet Physics
[3] Basic Example - Capsule with rigid body - F#
[4] Basic Example - Capsule with rigid body - Visual Basic
[5] Basic Example - Mesh Line
[6] Basic Example - Material
[7] Basic Example - Give me a cube
[8] Basic Example - Stride UI - Canvas - Capsule with rigid body and Window
[9] Basic Example - Stride UI Grid - Save and load game state
[10] Basic Example - Procedural Geometry
[11] Basic Example - Cylinder Mesh
[12] Basic Example - Partial Torus Mesh
[13] Basic Example - Partial Torus Mesh in F#
[14] Basic Example - Particles
[15] Basic Example - Raycast
[16] Basic Example - CollisionGroup
[17] Basic Example - CollisionLayer
[18] Advance Example - Simple Constraint
[19] Advance Example - Various Constraints
[20] Advance Example - Myra UI - Draggable Window, GetService()
[21] Advance Example - Stride UI - Draggable Window
[22] Advance Example - Stride UI - Draggable Window - Bullet Physics
[23] Advance Example - ImGui UI
[24] Advance Example - Image Processing
[25] Advance Example - Root Renderer Shader
[26] Advance Example - Box2D.NET Physics
[27] Advance Example - Mesh Outline
[28] Other - Debug Shapes
[29] Other - Debug Shapes Usage
[30] Other - Renderer
[31] Other - Blazor + SignalR - Run this from IIS
[32] Other - Stride + SignalR - Website two way communication
[33] Other - 2D Playground [WIP]
[34] Other - Bepu Playground [WIP]
[35] Other - Game - Cubicle Calamity [WIP]
[36] Other - Game - Cubicle Calamity [WIP] - Bullet Physics
[37] Basic Example - Basic 2D Scene [WIP]
[Q] Quit
Enter example id and press ENTER to run it.
(Debug output may appear; you can ignore it and type another id at any time.)
Choice: