Create Project
Command line and Visual Studio Code
The steps below show how to create a new Stride project using the command line. If you prefer Visual Studio Code, run the same commands from its integrated terminal. For the shortest possible start - one .cs file, no project file at all - see Create a File-Based App.
Note
Match the toolkit version to your Stride version - the table is in Getting Started. --prerelease takes the newest preview, so on an older Stride pin it, for example --version 1.0.0-preview.62 for Stride 4.3.
- Prerequisites: Make sure all prerequisites are installed. See Getting started for details.
- Create a console app. You can follow the official Microsoft tutorial or run:
dotnet new console --framework net10.0 --name YourProjectName - Navigate to the project folder:
cd YourProjectName - Add the toolkit package. It brings in the Stride packages and the asset compiler build step:
dotnet add package Stride.CommunityToolkit --prerelease - Add the Bepu physics package:
dotnet add package Stride.CommunityToolkit.Bepu --prerelease - Update Program.cs: Paste the example code below into your Program.cs file.
- Build (optional):
dotnet runperforms an implicit build, but you can build explicitly:dotnet build - Run the project:
dotnet run
Visual Studio 2026 and JetBrains Rider
- Create a C# Console Application targeting .NET 10.
- Add the
Stride.CommunityToolkitNuGet package (pre-release). This pulls in the required Stride packages and the asset compiler. - Add the
Stride.CommunityToolkit.Bepupackage (pre-release) to include the Bepu physics integration. - Update Program.cs: Paste the example code below.
- Run the project using your IDE.
Example code
using Stride.CommunityToolkit.Bepu;
using Stride.CommunityToolkit.Engine;
using Stride.CommunityToolkit.Rendering.ProceduralModels;
using Stride.Core.Mathematics;
using Stride.Engine;
using var game = new Game();
game.Run(new SceneSetup3D().UseBepu(), start: Start);
void Start(Scene rootScene)
{
var entity = game.CreatePrimitive(Primitive3D.Capsule());
entity.Transform.Position = new Vector3(0, 8, 0);
entity.Scene = rootScene;
}
using var game = new Game();creates a newGameinstance.game.Run(new SceneSetup3D().UseBepu(), start: Start);sets up a basic 3D scene (camera, lighting, sky, ground) with Bepu physics, starts the game and callsStartwhen the scene is ready. Every piece of the setup is a property; see Scene Setup.void Start(Scene rootScene)is invoked on start with the active root scene.game.CreatePrimitive(Primitive3D.Capsule())creates a capsule primitive.Primitive3D.Capsule(radius, length)sizes it.entity.Transform.Position = new Vector3(0, 8, 0);places the capsule 8 units above the ground.entity.Scene = rootScene;adds the entity to the scene so it is rendered and simulated. Without it the entity does not appear.
With UseBepu() on the setup, CreatePrimitive() gives the capsule a rigid body, so it falls to the ground.
Create Project - Engine Only builds a ground, a cube and a camera against the engine alone, with no toolkit package, and maps each part to the helper it replaces.
Tip
Remove entities you no longer need to free resources and avoid unnecessary physics updates.

Additional examples
Browse more examples in the navigation on the left, grouped by language and complexity.