Skip to content

Stride 4.4.0

Latest

Choose a tag to compare

@xen2 xen2 released this 09 Oct 09:12
· 55 commits to master since this release

Stride 4.4 is one of the largest updates the engine has received in years, with roughly 3200 commits since the previous version!

The main focus of this release was on modernization and reach, which includes much more stable Vulkan and Direct3D 12 backends, support for non-Windows platforms no longer being experimental and an overhaul of the shader compiler.

This update also includes many exciting new features, such as a CLI tool, ability to replace read-only assets and much more.

Highlights

Here are a few of the stand-out changes:

📱 Platform support

So far, Stride has mostly been a Windows-first engine. Other platforms were supported, but creating and running games on them would often lead to many problems. This update changes that.

All platforms have been brought back into shape and the test suite for them has been expanded to make sure they won't fall behind again. Additionally, with changes to the asset compiler, building projects on Linux and macOS now works the same as it does on Windows.

A Stride sample running on a physical iPhone.

For Linux users: this release removed some legacy code which now makes it possible to use Game Studio on Linux via Proton/Wine. The experience isn't as solid as on the native Windows version, but it's still a big step forward for Linux development. If you'd like to try it out, we have created a guide that's available in the documentation.

Game Studio running on Linux.

Note

Game Studio is being rewritten to be cross-platform.

Credits to Jklawreszuk for doing research and creating patches that enabled Proton support.

⌨️ New stride CLI tool

Some tasks that previously required the use of Game Studio or the launcher can now be done directly from the command-line! By using the CLI tool you can install and manage versions of Stride, create new projects and launch Game Studio with simple commands.

For more information, visit the Stride CLI page of our documentation.

dotnet tool install -g stride.cli      # Install Stride CLI
stride sdk install                     # Install the latest version of Stride
stride new topdownrpg && cd TopDownRPG # Create a project from a template
stride studio                          # Open it in Game Studio

dotnet new templates are also available if you'd rather use the standard .NET tooling directly:

dotnet new install Stride.Templates
dotnet new stride-game -n MyGame

🎮 Vulkan & Direct3D 12

Both APIs have received a large overhaul. They're now solid enough that we plan to make one of them the editor default and potentially remove Direct3D 11 in the next major release.

This overhaul also made it far easier to track down GPU crashes, as Stride can now pinpoint the exact rendering step that caused a device hang.

Note

If you write custom low-level rendering code, note that Direct3D 12 and Vulkan now use an explicit barrier/layout model. Direct3D 12 also requires Enhanced Barriers.

You can now pick the graphics API right from the UI for both your project and the editor. Game Studio can be configured in Settings > Environment > Graphics API (takes effect after a restart) and the game in the properties of the Windows package.

Selecting a Windows project package's graphics API from the Property grid.

🎨 A brand-new SDSL shader compiler

The biggest internal change in 4.4 is a complete rewrite of the SDSL shader compiler, now built around a modern SPIRV-centric pipeline.

Instead of parsing and stitching shaders together as text, Stride now works in SPIR-V bytecode end to end:

  • Each .sdsl shader is parsed once and compiled into its own SPIR-S module (SPIR-Stride, Stride's extended SPIR-V dialect).
  • Effects (.sdfx) then mix and compose those modules directly as bytecode, converting the result to standard SPIR-V for the GPU backend.
  • Crucially, text parsing happens only at that first step: recombining a new shader variation from already-compiled SPIR-S needs no re-parsing.

The new SDSL shader pipeline: many .sdsl shaders are parsed once into per-shader SPIR-S bytecode, .sdfx effects mix and compose them into standard SPIR-V, which feeds Vulkan natively and Direct3D and Metal via SPIRV-Cross.

What this means for you:

  • Much faster shader handling. Generating the many shader permutations a game needs now works directly with byte-code, without a need to re-parse any text.
  • Improved stability. Stride now uses battle-tested tools in order to handle conversion between different Graphics APIs.
  • Far better support for advanced features. Direct3D 12 and Vulkan now handle things like tessellation and compute shaders much more reliably.
  • A future-proof foundation. With a real SPIR-V pipeline in place, adding modern GPU features such as ray tracing, mesh shaders/meshlets and wave intrinsics becomes much easier going forward.

Warning

Because the entire shader compiler was replaced, custom .sdsl shaders may need minor adjustments to compile cleanly. If you encounter any problems, please open an issue on GitHub so we can fix it.

Huge thanks to Youness Kafia, whose early prototyping and experimentation laid the foundation for the new SDSL pipeline.

⚡ NativeAOT & trimming support

The engine is now NativeAOT and trimming-friendly. This unlocks smaller, faster-starting, self-contained game builds. For more information on how to use this, visit the documentation.

📦 Improved assets and content workflow

Stride 4.4 makes it easier to work with assets through code thanks to the automatically generated Assets class, which provides strongly typed URL constants for all assets in your project. Now when you rename an asset, you will get build errors instead of a "content not found" message during runtime.

// Old approach
var playerModel = Content.Load<Model>("Models/Player");

// New approach
var playerModel = Content.Load(Assets.Models.Player);

Asset paths from external packages now begin with a namespace, to ensure there are no conflicts between different libraries. This won't break your existing projects, as the paths will be automatically changed in your code during the upgrade.

Adding assets to root now defaults to using the project package that an asset belongs to instead of the current one (like MyGame.Windows). This ensures that your assets work the same across different platforms. Game Studio also now tells you the name of the project package where the asset will be root and allows you to choose from alternatives.

Finally, Stride now allows you to create replacement assets, which can be used to override assets from external packages or even the engine itself. For more information, visit their dedicated page in the documentation.

Replacement assets can be used to override the default font used by Stride.

🚀 Launcher update

Along with 4.4, we also released an update to the launcher. On the surface, everything is mostly the same, aside from a minor face-lift. The real change comes under-the-hood with the launcher now using Avalonia as its UI framework, which will make it possible to target Linux and macOS in the future.

The new launcher is a part of the ongoing cross-platform editor rewrite. This is an enormous endeavour that will take a lot of time and effort, so if you are willing to help, check out the white paper and the Avalonia Editor Rewrite project on GitHub.

Credits to Kryptos for leading the avalonia rewrite and doing most of the work on the new launcher.

🧰 Building and engine architecture

  • Much faster asset builds. Assets compile 2x faster for a typical game, and up to 10x faster for Stride's own tests, thanks to a new asset-build cache.
  • .slnx is the new default solution format. Existing .sln solutions still open and save normally.
  • Game Studio can now open projects that use newer versions of .NET. You can use the newest C# features in your projects without having to update or fork the engine.
  • Support for file-based apps. You can now create a Stride game using a single C# file. For more information, check out the community toolkit.
  • Dropped support for 32-bit. The engine now only targets modern 64-bit systems.

⚙️ Changes to the physics CharacterComponent

While our integration of the Bepu physics engine is definitely mature enough by now, the CharacterComponent we introduced was not as well put together as it ought to have been.

  • The gravity you may set would be mutated internally to prevent the body from sliding down slopes.
  • Moving surfaces would not carry the character along with them.
  • Moving past a slope would cause the character to fly off.
  • Forces applied to bodies, and especially constraints, required unintuitive tweaks to work.

We looked at Bepu's own character example to solve these issues. Unfortunately, we could not avoid introducing a fair amount of breaking changes. Fortunately, we added a couple of sections in Characters to describe the new features and properties.

📖 Documentation

Since 4.3, our documentation has received a lot of changes. This is a part of an ongoing effort to bring the documentation up-to-date and restructure it to provide space for future content.

Documentation changelog is available in the manual.

We have also started documenting parts of Stride's internal architecture in the main engine repository to help other contributors navigate this large codebase. A copy of these pages is available on the documentation website.

📈 Metrics and crash reports

Game Studio is now telemetry-free! We removed legacy metrics code, as it was mostly broken and the data collected with it didn't see much use. However, we are looking into reintroducing it in a future update as an opt-in system.

The crash reporter has been overhauled from the ground-up. It now runs independently from Game Studio and the launcher, which should make it much more stable compared to the old version.

Crash reports can now be sent with a single button via Sentry. This should make it easier for us to fix common errors and improve engine stability. For full transparency, here are some notes about how crash data is collected and reported:

  • You are in control. You can customize and view crash reports before they are sent.
  • No automatic telemetry. Crash reports cannot be sent automatically without your consent. Note that failed uploads will be kept and sent later.
  • All reports are private. Only certain core-contributors have access to the Sentry dashboard, which is the only place where crash reports can be viewed.
  • Anonymity. The crash reporter masks user names, device timezone and other information that could be used to retrace your data back to you.

🧪 Quality & CI

These changes don't affect the engine directly, but they impact how confidently you can contribute back to its code.

Stride 4.4's test suite has been greatly expanded. Instead of being occasionally invoked for a few specific configurations, the CI (Continuous Integration) now runs the entire test matrix across all platforms and graphics APIs.

Regressions on any platform or backend are now caught automatically before any change gets merged. This means that you can confidently open a pull request and trust the CI to prove it works everywhere.

The GitHub dashboard shows all tests across multiple platforms and graphics APIs.

Our gold-image workflow has also received many improvements. For those unaware, Stride uses pre-taken screenshots (gold images) and compares them to new ones in order to test if its rendering capabilities work as intended. Of course, there are always small couple-pixel differences, even when comparing the same version, which is why it's important to have proper tooling.

The new CompareGold tool helps visualize differences between images and determine if something is wrong. It also makes it easier to promote images (replacing old gold images with new screenshots) and even pull results directly from any CI run or fork. For more information, check out GPU Regression Testing in the engine repository.

CompareGold reviewing differences between pre-rendered and newly created images.

The CI can also now automatically generate gold images for every platform. This means that you no longer have to waste time retaking screenshots by hand, as the Test Gold Generation workflow will do it for you.

Breaking changes

  • Custom shaders: the SDSL compiler was rewritten, so you might want to review how your custom shaders render. If you have a shader that no longer compiles or behaves differently, please open an issue on GitHub so we can fix it.
  • Low-level graphics: Direct3D 12 now requires Enhanced Barriers. The legacy barrier path has been removed.
  • Vulkan updated to 1.3: this might break support for older devices and users with outdated drivers.
  • OpenGL has been removed: consider changing the graphics API of your project to Vulkan or Direct 3D.
  • Convex hull changes: the library we use to generate convex hulls (V-HACD) was updated. This new version improves on speed and accuracy, but has a wildly different set of configurable parameters, so you may want to validate them for accuracy.
  • Bepu CharacterController was reworked: existing character setups will behave differently and need adjustment. See ⚙️ Changes to the physics CharacterComponent.
  • Removed the ability to override Game Settings: the feature was partially broken and not really that useful, which is why it was decided to remove it altogether. If you want to change settings depending on a user's platform/device, consider creating a custom Game class.
  • Dropped support for 32-bit systems.

Changes to code API (should be automatically resolved during project upgrade):

  • GameSettings.Configuration.Get<T> is now GameSettings.GetOrCreateConfiguration<T>
  • Utilities.CopyWithAlignmentFallback is now MemoryUtilities.CopyWithAlignmentFallback.
  • Utilities.Clear is now MemoryUtilities.Clear.
  • Utilities.AllocateMemory is now MemoryUtilities.Allocate.
  • Utilities.AllocateClearedMemory is now MemoryUtilities.AllocateCleared.
  • Utilities.FreeMemory is now MemoryUtilities.Free.
  • Utilities.IsMemoryAligned is now MemoryUtilities.IsAligned.
  • Utilities.Swap<T> is now MemoryUtilities.Swap<T>.
  • ScrollViewer.ScrollOfInternal is now private.

What's Changed

Auto-generated; a maintainer may hand-edit.

🎮 Graphics

  • Vulkan and Direct3D 12 got a large overhaul and are much more stable. Both now use explicit resource barriers, Direct3D 12 requires Enhanced Barriers, and Vulkan moves to version 1.3 with dynamic rendering (@xen2, #3122, #3337, #3338, #3466, d3ac111; @sasvdw, #3324, #3311)
  • Direct3D now runs on Silk.NET instead of SharpDX, and the graphics libraries were updated (@Ethereal77, #1715; @VaclavElias, #3294; @w0wca7a, 8ef20fd; @Feralnex, #2991)
  • Removed the OpenGL and OpenGL ES graphics APIs. Use Vulkan or Direct3D instead (@xen2, #3069)
  • Choose the graphics API from the UI: for Game Studio in Settings, and for your game in the Windows package properties. Game Studio offers a fallback when the saved API isn't available (@xen2, 53e49d4, f07623b, faf2304)
  • A lost graphics device (driver crash, GPU removed) now stops the game cleanly with a clear exception. Before, it could crash, freeze or be ignored (@xen2, #3476)
  • Fixed Vulkan crashes and glitches: when resizing the window, when closing the scene editor, with Local Reflections, with thumbnails, with the profiler overlay, on Linux windows and on Android after suspend, resume or screen rotation (@xen2, 5bd99d5, 366665c, #3400, #3465, 640b3c5, 4695607, 628a59b, 746720e; @sasvdw, #3287, e5f61cd)
  • Vulkan textures now report the depth-stencil format the device actually uses (@xen2, #3427)
  • Fixed Direct3D issues: Direct3D 12 reported more MSAA samples than supported, Direct3D 11 GPU timing queries read results too early, and the timestamp frequency had a different type on Direct3D 11 (@xen2, 8c82860, 0d07705, 130d14a)
  • Fixed games that sometimes hung on exit while waiting for the GPU (@xen2, #3217, 4ce8295, 6cfd56b)
  • Fixed a zero-sized window or crash after minimizing and restoring, and the window position is now only restored when leaving fullscreen (@xen2, #3300, 79ce727)
  • Fixed voxel global illumination (@Nicogo1705, #3382, #3449)
  • Fixed lighting and post-effect bugs: bloom no longer breaks on infinite or NaN values, environment light prefiltering is more accurate, the -Z face shows correctly in the cubemap cross view, alpha-tested shadow casters shade correctly, and the shadow map shader overrides were restored (@Nicogo1705, #3429; @sasvdw, #3341, #3330; @xen2, 6f1e300, 26db1ae, a12f7ea; @Eideren, #3038)
  • Restored the blend settings of thin glass and SpriteStudio, and fixed saving blend state descriptions (@VaclavElias, #3501; @xen2, 9e873cc)
  • Fixed a texture streaming crash with textures whose size isn't a power of two (@xen2, d1ff2c8)
  • Fixed wrong normals on scaled procedural models, and a crash when comparing index buffer bindings (@Basewq, #3308; @johang88, #3078)
  • One render stage can now render to several output formats (@xen2, 373dacd)
  • The editor's fallback effects now draw tessellated meshes without tessellation, and each resource group keeps its own constant buffer (@xen2, #3475, #3479)
  • The Null graphics backend compiles again (@sasvdw, #3371)

🔤 Fonts & images

🎨 Shaders

  • Rewrote the SDSL shader compiler around a SPIR-V pipeline. Custom shaders may need small adjustments (@xen2, @ykafia, #3134)
  • Fixed parser bugs: trailing-dot floats like 1., integer suffixes after 0 and on hex literals, binary expressions inside vector constructors, a dangling . or [, and numbers on non-English systems (@azeno, #3421, #3412; @Nicogo1705, #3467; @xen2, #3426; @sasvdw, #3325)
  • Fixed compiler crashes: a field named like a built-in method, calls to abstract methods, and geometry shaders reading input arrays directly (@azeno, #3391, #3413, #3422)
  • Fixed wrong shader output: multidimensional arrays, Buffer<T> element types, matrix truncating casts, eye data in multi-view, integer math in float expressions, SV_Coverage, entry point overrides, and code that HLSL conversion rejected (@sasvdw, #3293, #3431, #3304; @xen2, #3333, #3409, #3411, #3447, 37812f2, 3456cd1, b20f6ac; @Eideren, #3408; @Nicogo1705, #3468, #3450)
  • Constant expressions are now evaluated, so switch labels can be constants. A method that matches an inherited one without override is now a compile error. Generic shaders and loop attributes are handled more reliably (@xen2, #3453, #3454; @VaclavElias, #3493; @Nicogo1705, #3389)
  • Shader classes keep their attributes, and the shader API gained BinaryOperator.AddMath plus a small cleanup (@azeno, #3381; @Eideren, #3436, #3407)
  • Shader hot-reload works more than once, shaders no longer recompile endlessly, and you can opt out of loading shader source from its original location (@xen2, #3410, cc7ca73; @azeno, #3105)
  • Clearer error when a stream is read before it's written. Fixed the precompiled shader batch file and a shader converter library conflict (@xen2, 33e1ed2, 653b8cb in #3069, 5ea321b, 18786dd)

📱 Platforms

📦 Assets & content

  • Asset paths now carry a package namespace so assets from different packages don't collide, with an automatically generated Assets class of typed asset paths. Existing paths are updated during upgrade (@xen2, #3270, 0cb7693, 8f74993, 9eef715, 748e736, c818a30)
  • Replacement assets let you override assets from external packages or the engine itself (@xen2, #3295, 03edac1, 46c0de5)
  • Faster asset builds: one build cache shared by the editor and every platform, cleaned up automatically, and the asset compiler reads a small build manifest instead of re-scanning your projects (@xen2, #3271, #3219, 442eca8)
  • Adding an asset to root now uses the package the asset belongs to, and Game Studio lets you pick another one (@xen2, #3435)
  • Project upgrades back up changed files first, ask once before writing, show progress, update your code automatically (for example renamed Utilities memory helpers and PixelFormat members), and work on projects without a solution. Very old pre-4.0 upgrade paths were removed (@xen2, #3244, 49607a7, 7571ad0, 0ac3fe9, e208935, ee76532, 4e340c2, f10df72, e8f751c)
  • Removed Game Settings overrides (@ferafiks, #3343)
  • ContentManager.Load now always throws with a clear message when an asset is missing. LoadAsync / ReloadAsync became extension methods in Stride.Engine (@xen2, #3327, #3169)
  • Fixed loading of the assets a runtime-created material references, and of serialized values whose type changed (@sasvdw, #3370; @xen2, #3305; @Eideren, b309fa0)
  • Asset issues in logs now include the asset name, and the build stops early when an asset fails to compile (@Eideren, #3202; @xen2, b9a207d)
  • Sprite sheets and their thumbnails recompile when the source image changes (@Acissathar, #3159)
  • Model import can limit bone weights per vertex (@Nicogo1705, #3110)
  • Asset types are removed correctly when a game assembly is unloaded (@ds5678, #3445)

⚙️ Physics

  • Reworked the Bepu CharacterComponent based on Bepu's own character example. It handles slopes, moving platforms and forces properly, and accounts for collider mass. This is a breaking change (@Eideren, #3195, 975a586, 0533456)
  • Fixed transforms of bodies parented to other bodies, moving static colliders, and collisions with more complex meshes (@Eideren, #3013, 66a910b, #3036)
  • Fixed crashes: adding the debug render component in the editor, overlap queries, convex hull generation, and invalid position or rotation values (@Nicogo1705, #3050; @Eideren, #3275, #3278, 5f01a46, #3306; @xen2, 137215c)
  • Simulation callbacks keep the calling script's context, physics uses Stride's own job dispatcher, and statics skip inertia calculation (@Eideren, #3092, #3281; @Spajker7, 518e006)
  • Updated BepuPhysics (@Nicogo1705, #3049, #3112)
  • TransformComponent.SetWorld now applies rotation in the right order (@rafzi, #3087)

🧭 Navigation

🖥️ UI

🔊 Audio, video & input

🧠 Core

  • Faster script system and fewer dictionary lookups (@Eideren, #2986; @Henr1k80, #3156)
  • PriorityQueue and PriorityNodeQueue keep their order on Remove (@xen2, #3456)
  • Fixed late async task crashes and thread-safety issues in the update engine (@xen2, 844aaac, 66d49f9)
  • The debug network listener only accepts connections from your own machine by default (@xen2, 24140ee)
  • Logging lets you set levels per listener and per module, and no longer prints lines twice (@xen2, #3402)
  • The profiler's result page no longer goes below 1 (@Nicogo1705, #3405)
  • Removed all data collection (metrics) from the engine (@Jklawreszuk, #3279, #3342)
  • The Stride assembly was renamed to Stride.Foundation (@xen2, #3234)

🛠️ Editor / Game Studio

📚 Templates, samples & tools

🔧 Under the hood

New Contributors

Full Changelog: releases/4.3.0.2507...releases/4.4.0