Convert Figma logo to code with AI

stride3d logostride

Stride Game Engine (formerly Xenko)

6,448
933
6,448
587

Top Related Projects

88,735

Godot Engine – Multi-platform 2D and 3D game engine

Unity C# reference source code.

11,280

One framework for creating powerful cross-platform games.

Flax Engine – multi-platform 3D game engine

18,111

Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.

Babylon.js is a powerful, beautiful, simple, and open game and rendering engine packed into a friendly JavaScript framework.

Quick Overview

Stride is an open-source C# game engine for realistic rendering and VR. It supports both 2D and 3D graphics, and provides a powerful set of tools for game development. Stride aims to be a versatile and user-friendly engine for indie developers and small studios.

Pros

  • Cross-platform support (Windows, macOS, Linux, iOS, Android)
  • Modern graphics API support (Vulkan, DirectX 12)
  • Built-in visual scripting system
  • Extensive documentation and community support

Cons

  • Smaller community compared to more established engines like Unity or Unreal
  • Limited asset marketplace
  • Steeper learning curve for beginners compared to some other engines
  • Less frequent updates compared to larger, more commercially-backed engines

Code Examples

  1. Creating a simple 3D scene:
public class MyGame : Game
{
    protected override void BeginRun()
    {
        Scene.Entities.Add(new Entity
        {
            new ModelComponent
            {
                Model = Content.Load<Model>("MyModel")
            },
            new TransformComponent()
        });

        Scene.Entities.Add(new Entity
        {
            new CameraComponent(),
            new TransformComponent
            {
                Position = new Vector3(0, 2, -5)
            }
        });
    }
}
  1. Adding a simple script to an entity:
public class RotateScript : SyncScript
{
    public override void Update()
    {
        Entity.Transform.Rotation *= Quaternion.RotationY(0.01f);
    }
}

// In your game class:
var entity = new Entity();
entity.Add(new RotateScript());
Scene.Entities.Add(entity);
  1. Creating a basic 2D sprite:
public class MyGame : Game
{
    protected override void BeginRun()
    {
        var spriteEntity = new Entity();
        var spriteComponent = new SpriteComponent
        {
            Sprite = Content.Load<SpriteSheet>("MySprite").Sprites[0]
        };
        spriteEntity.Add(spriteComponent);
        Scene.Entities.Add(spriteEntity);
    }
}

Getting Started

  1. Install Visual Studio 2019 or later with .NET desktop development workload
  2. Install Stride from the official website or via NuGet
  3. Create a new Stride project in Visual Studio
  4. Add the following code to your Game class:
public class MyGame : Game
{
    protected override void BeginRun()
    {
        // Add a camera
        var cameraEntity = new Entity { new CameraComponent() };
        cameraEntity.Transform.Position = new Vector3(0, 0, -5);
        Scene.Entities.Add(cameraEntity);

        // Add a cube
        var cubeEntity = new Entity();
        cubeEntity.Add(new ModelComponent
        {
            Model = GeometricPrimitive.Cube.New(GraphicsDevice)
        });
        Scene.Entities.Add(cubeEntity);
    }
}
  1. Build and run the project to see a basic 3D scene with a cube

Competitor Comparisons

88,735

Godot Engine – Multi-platform 2D and 3D game engine

Pros of Godot

  • Larger community and ecosystem, with more resources and third-party assets
  • More mature and feature-rich, with a longer development history
  • Built-in visual scripting system for non-programmers

Cons of Godot

  • Steeper learning curve for beginners, especially those new to game development
  • Less optimized for high-end graphics and large-scale projects
  • Limited support for certain platforms (e.g., consoles) compared to some commercial engines

Code Comparison

Godot (GDScript):

extends Sprite

func _ready():
    position = Vector2(100, 100)
    scale = Vector2(2, 2)

Stride (C#):

public class MyEntity : SyncScript
{
    public override void Start()
    {
        Entity.Transform.Position = new Vector3(1, 1, 1);
        Entity.Transform.Scale = new Vector3(2, 2, 2);
    }
}

Both engines offer intuitive ways to manipulate game objects, but Godot uses its custom GDScript language, while Stride leverages C# for scripting. Godot's syntax is more concise, while Stride's approach may be more familiar to developers with C# experience.

Unity C# reference source code.

Pros of UnityCsReference

  • More extensive documentation and community support
  • Larger ecosystem of assets and plugins
  • Wider industry adoption and job market

Cons of UnityCsReference

  • Closed-source core engine
  • Less flexible licensing options
  • Steeper learning curve for advanced features

Code Comparison

Stride:

public class MyScript : SyncScript
{
    public override void Update()
    {
        // Game logic here
    }
}

UnityCsReference:

public class MyScript : MonoBehaviour
{
    void Update()
    {
        // Game logic here
    }
}

Both engines use C# for scripting, but Stride uses SyncScript as a base class, while Unity uses MonoBehaviour. Stride's Update method is marked as override, indicating a different inheritance structure.

Stride offers a more open-source approach, allowing developers to modify the engine's core. UnityCsReference provides access to C# reference source code but doesn't allow direct modifications to the engine.

Unity's larger user base and market presence provide more resources and job opportunities. However, Stride's open-source nature offers greater flexibility and potential for customization.

Both engines have their strengths, and the choice between them depends on project requirements, team expertise, and long-term goals.

11,280

One framework for creating powerful cross-platform games.

Pros of MonoGame

  • Mature and stable framework with a large community and extensive documentation
  • Cross-platform support for multiple desktop, mobile, and console platforms
  • Familiar XNA-like API, making it easier for developers with XNA experience

Cons of MonoGame

  • Limited built-in editor support, requiring more manual setup and configuration
  • Less advanced graphics features compared to modern game engines
  • Slower development cycle for complex projects due to lack of visual tools

Code Comparison

MonoGame:

protected override void Draw(GameTime gameTime)
{
    GraphicsDevice.Clear(Color.CornflowerBlue);
    spriteBatch.Begin();
    spriteBatch.Draw(texture, position, Color.White);
    spriteBatch.End();
    base.Draw(gameTime);
}

Stride:

public override void Draw(CommandList commandList)
{
    commandList.Clear(GraphicsDevice.Presenter.BackBuffer, Color.CornflowerBlue);
    spriteBatch.Begin(commandList);
    spriteBatch.Draw(texture, position, Color.White);
    spriteBatch.End();
}

Both frameworks use similar drawing concepts, but Stride's API is more modern and flexible, utilizing command lists for rendering.

Flax Engine – multi-platform 3D game engine

Pros of FlaxEngine

  • More active development with frequent updates and commits
  • Larger community and user base, leading to better support and resources
  • More comprehensive documentation and tutorials

Cons of FlaxEngine

  • Steeper learning curve for beginners
  • Less flexible licensing options compared to Stride
  • Heavier resource requirements for development

Code Comparison

Stride:

public class MyScript : SyncScript
{
    public override void Start()
    {
        // Initialization code
    }

    public override void Update()
    {
        // Update logic
    }
}

FlaxEngine:

public class MyScript : Script
{
    public override void OnStart()
    {
        // Initialization code
    }

    public override void OnUpdate()
    {
        // Update logic
    }
}

Both engines use C# for scripting, with similar structure for game object components. The main differences lie in method names and inheritance hierarchy. Stride uses SyncScript as the base class, while FlaxEngine uses Script. The lifecycle methods are named slightly differently, with Stride using Start and Update, and FlaxEngine using OnStart and OnUpdate.

18,111

Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.

Pros of Cocos2d-x

  • More mature and established framework with a larger community
  • Supports multiple programming languages (C++, Lua, JavaScript)
  • Extensive documentation and learning resources available

Cons of Cocos2d-x

  • Steeper learning curve, especially for beginners
  • Less modern architecture compared to Stride
  • Limited built-in 3D capabilities

Code Comparison

Cocos2d-x (C++):

auto sprite = Sprite::create("sprite.png");
sprite->setPosition(Vec2(100, 100));
this->addChild(sprite);

Stride (C#):

var sprite = new SpriteComponent
{
    SpriteSheet = Content.Load<SpriteSheet>("sprite"),
};
Entity.Add(sprite);

Key Differences

  • Stride focuses on C# and .NET, while Cocos2d-x supports multiple languages
  • Stride has a more modern, component-based architecture
  • Cocos2d-x has a larger ecosystem of extensions and plugins
  • Stride offers better 3D capabilities out of the box
  • Cocos2d-x has a longer history and more widespread adoption in the industry

Both engines have their strengths, with Cocos2d-x being more established and versatile, while Stride offers a more modern approach with stronger 3D support.

Babylon.js is a powerful, beautiful, simple, and open game and rendering engine packed into a friendly JavaScript framework.

Pros of Babylon.js

  • Larger community and ecosystem, with more resources and third-party plugins
  • Better documentation and learning materials
  • More mature and feature-rich, especially for web-based 3D applications

Cons of Babylon.js

  • Steeper learning curve for beginners
  • Potentially higher performance overhead for complex scenes
  • Less integrated with game development workflows compared to Stride

Code Comparison

Babylon.js (JavaScript):

const scene = new BABYLON.Scene(engine);
const camera = new BABYLON.FreeCamera("camera", new BABYLON.Vector3(0, 5, -10), scene);
const light = new BABYLON.HemisphericLight("light", new BABYLON.Vector3(0, 1, 0), scene);
const sphere = BABYLON.MeshBuilder.CreateSphere("sphere", {diameter: 2}, scene);

Stride (C#):

public override void Start()
{
    var sphere = new Entity("Sphere");
    sphere.Transform.Position = new Vector3(0, 0, 0);
    sphere.Add(new SphereColliderShape());
    sphere.Add(new ModelComponent(Content.Load<Model>("Models/Sphere")));
    Entities.Add(sphere);
}

Both engines offer powerful 3D rendering capabilities, but Babylon.js is more focused on web-based applications, while Stride is geared towards game development with a more traditional engine structure. Babylon.js has a larger community and more resources, but Stride offers tighter integration with game development workflows and potentially better performance for complex games.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

The stride logo, a geometrical 'S' in the form of a cube

Join the chat at https://discord.gg/f6aerfE All Contributors Financial sponsors License

Welcome to the Stride source code repository!

Stride is an open-source C# game engine for realistic rendering and VR. The engine is highly modular and aims at giving game makers more flexibility in their development. Stride comes with an editor that allows you to create and manage the content of your games or applications visually and intuitively.

Stride Editor

To learn more about Stride, visit stride3d.net.

Earn money by contributing

If you are a developer with solid experience in C#, rendering techniques, or game development, we want to hire you! We have allocated funds from supporters on OpenCollective and can pay for work on certain projects. More info about this here.

License and governance

.NET Foundation

This project is supported by the .NET Foundation.

License

Stride is covered by the MIT License unless stated otherwise (i.e. for some files that are copied from other projects). You can find the list of third-party projects here. Contributors need to sign the following Contribution License Agreement.

Code of conduct

Stride being a .NET Foundation project, it has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information see the .NET Foundation Code of Conduct.

Documentation

Find explanations and information about Stride:

Community

Ask for help or report issues:

Building from source

Prerequisites

  1. Latest Git with Large File Support selected in the setup on the components dialog and for convenience a git UI client like GitExtensions.
  2. .NET 8.0 SDK
    • Run dotnet --info in a console or powershell window to see which versions you have installed
  3. Visual Studio 2022 with the following workloads:
    • .NET desktop development with .NET Framework 4.7.2 targeting pack (should be enabled by default)
    • Desktop development with C++ with
      • Windows 10 SDK (10.0.18362.0) or later version (should be enabled by default)
      • MSVC v143 - VS2022 C++ x64/x86 build tools (Latest) (should be enabled by default)
      • C++/CLI support for v143 build tools (Latest) (not enabled by default)
    • Optional (to target iOS/Android): .NET Multi-paltform App UI development and Android SDK setup individual component (enabled by default), then in Visual Studio go to Tools > Android > Android SDK Manager and install NDK (version 20.1+) from Tools tab.
    • Optional (to build VSIX package): Visual Studio extension development

Build Stride

  1. Clone the repo with a git UI or open a command prompt, point it to a directory and clone Stride to it: git lfs clone https://github.com/stride3d/stride.git
    • Do NOT use GitHub -> Code -> Download ZIP, this won't include the lfs files.
  2. Open <StrideDir>\build\Stride.sln with Visual Studio 2022 and build Stride.GameStudio in the 60-Editor solution folder (it should be the default startup project) or run it from VS's toolbar.
    • Optionally, open and build Stride.Android.sln, Stride.iOS.sln, etc.

Build Stride without Visual Studio

  1. Install Visual Studio Build Tools with the same prerequisites listed above
  2. Add MSBuild's directory to your system's PATH (ex: C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin)
  3. Clone the repo with a git UI or open a command prompt, point it to a directory and clone Stride to it: git lfs clone https://github.com/stride3d/stride.git
  4. Navigate to /Build with the command prompt, input msbuild /t:Restore Stride.sln then compile.bat

If building failed:

  • Some errors for test projects are normal, GameStudio will start anyway.
  • The Visual Studio extension might fail to build if you are missing the Visual Studio SDK, but GameStudio will start anyway.
  • If you skipped one of the Prerequisites thinking that you already have the latest version, update to the latest anyway just to be sure.
  • Visual Studio might have issues properly building if an anterior version is present alongside 2022. If you want to keep those version make sure that they are up to date and that you are building Stride through VS 2022.
  • Your system's PATH should not contain older versions of MSBuild (ex: ...\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin should be removed)
  • Some changes might require a system reboot, try that if you haven't yet.
  • Make sure that Git, Git LFS and Visual Studio can access the internet.
  • Close VS, clear the nuget cache (in your cmd dotnet nuget locals all --clear), delete the hidden .vs folder inside \build and the files inside bin\packages, kill any msbuild and other vs processes, build the whole solution then build and run GameStudio.

Do note that test solutions might fail but it should not prevent you from building Stride.GameStudio.

Contribution Guidelines

Please check our Contributing Guidelines.

Build Status

Branchmaster
Windows D3D11
Windows D3D12
Windows Vulkan
Windows OpenGL
Windows OpenGL ES
iOS
Android
Linux Vulkan
Linux OpenGL
Tests Windows Simple
Tests Windows D3D11

Contributors ✨

Thanks goes to these wonderful people (emoji key):

xen2
xen2

💻
Eideren
Eideren

💻
Jorn Theunissen
Jorn Theunissen

📖
Tebjan Halm
Tebjan Halm

💻
Elias Holzer
Elias Holzer

💻
Johan Gustafsson
Johan Gustafsson

💻
Youness KAFIA
Youness KAFIA

💻
Marian Dziubiak
Marian Dziubiak

💻
AmbulantRex
AmbulantRex

💻
Basewq
Basewq

💻
Jarmo
Jarmo

💻
Antonio Junaković
Antonio Junaković

💻
Nicolas Musset
Nicolas Musset

💻
Novaleaf
Novaleaf

💻
salahchafai
salahchafai

🎨
Mehar
Mehar

💻
Vaclav Elias
Vaclav Elias

💻
EternalTamago
EternalTamago

💻
WhyPenguins
WhyPenguins

💻
Aunnop Kattiyanet
Aunnop Kattiyanet

💻
Anon
Anon

🎨
D3ZAX
D3ZAX

💻
Phr00t
Phr00t

💻
sebl
sebl

💻
Artromskiy
Artromskiy

💻
Jean-François Pustay
Jean-François Pustay

💻
Daniel Miller
Daniel Miller

💻
joreg
joreg

💻
James Rinker
James Rinker

💻
Tristan McPherson
Tristan McPherson

💻
Eric
Eric

💻
Sebastian Gregor
Sebastian Gregor

💻
insomnyawolf
insomnyawolf

💻
Doprez
Doprez

💻
Jakub Ławreszuk
Jakub Ławreszuk

💻
Mario Guerra
Mario Guerra

💻
tamamutu
tamamutu

💻
IXLLEGACYIXL
IXLLEGACYIXL

💻
arturo
arturo

💻
Chia-Hsiang Cheng
Chia-Hsiang Cheng

💻
Nicolae Tugui
Nicolae Tugui

💻
Mattias Cibien
Mattias Cibien

💻
Oleg Ageev
Oleg Ageev

💻
SeleDreams
SeleDreams

💻
Alexandre Castro
Alexandre Castro

💻
SVNMLR
SVNMLR

🎨
Jeromy Walsh
Jeromy Walsh

💻
Parham Gholami
Parham Gholami

🎨
adrsch
adrsch

💻
Alexander Schill
Alexander Schill

💻
froce
froce

💻
Anthony Marmont
Anthony Marmont

💻
MaximilianEmel
MaximilianEmel

💻
Schossi
Schossi

💻
Dagan Hartmann
Dagan Hartmann

💻

This project follows the all-contributors specification. Contributions of any kind welcome!