8. January 2025 13:14
by nKast
0 Comments
The latest release of KNI v4.0.9001 marks a pivotal milestone for the framework. After nine releases over three years, KNI is now production-ready, with most platforms achieving near-parity with XNA 4.0. This update brings significant architectural changes, expanded platform support, and performance improvements. A more detailed list of the changes is available on the changelog.
Download KNI v4.0 today.
See migrate to v4.0 on how to upgrade your current projects.
Architecture
The restructuring of the framework represents the culmination of a long-term plan to improve modularity and streamline development workflows. All components of the framework have now been decoupled, completing an ongoing effort to enhance flexibility and scalability. The final components to be decoupled were the Storage API, Sensor API, and the Virtual reality API. This transition enhances usability for developers while providing a robust foundation for upcoming features.
-
Storage API: Now decoupled into a standalone package, the Storage API is platform-independent and provides a robust foundation. While the API is not finalized and remains subject to change, it lays a strong groundwork for upcoming improvements.
-
Devices API: The Accelerometer and Compass classes are now part of the new Xna.Framework.Devices.Sensors
namespace. Previously exclusive to Android and iOS packages, these classes were ports of the deprecated Windows Phone APIs under the Microsoft.Devices.Sensors namespace. A new Haptics class has also been introduced under Xna.Framework.Devices
, supporting haptic feedback on mobile devices.
-
XR API: The VR APIs for Meta (OVR) and Google Cardboard have been unified under a new Xna.Framework.XR
namespace. This standalone package offers a consistent API across VR platforms. Note that the API has undergone changes, requiring minor porting efforts for existing projects. The API is still evolving, and further updates are anticipated in the future.
To align with the updated architecture, platform NuGet packages have been renamed to follow a consistent naming scheme as a combination of the hosting platform and the graphics backend:
- nkast.Kni.Platform.Android.GL
- nkast.Kni.Platform.Blazor.GL
- nkast.Kni.Platform.Cardboard.GL
- nkast.Kni.Platform.Oculus.GL
- nkast.Kni.Platform.SDL2.GL
- nkast.Kni.Platform.iOS.GL
- nkast.Kni.Platform.UAP.DX11
- nkast.Kni.Platform.WinForms.DX11
Support for the legacy Xamarin targets on Android and iOS has been dropped. Additionally, the Blazor target no longer supports .NET 6.
Virtual Reality
- Native Oculus: With the new Oculus backend, KNI now supports native development for Meta Quest headsets. Meta’s leadership in VR makes this an essential addition, ensuring KNI remains a top choice for developers targeting immersive platforms.
- WebXR on Blazor: This release introduces VR and AR support for the Blazor.GL target through WebXR.
-
Special thanks to @squarebananas for providing proof-of-concept experiments and critical feedback throughout development.
You can see this in action in a simple game on itch.io, made for VR-Jam#5, or simply click on the iframe below.
You can also play the port of Ship-Game by @squarebananas at https://squarebananas.github.io/kni-unofficial-webxnar-experiments.github.io/

Performance
New GetData() implementations for Texture2D, Texture3D, TextureCube, IndexBuffer, and VertexBuffer avoid unnecessary memory allocations and data copies, providing substantial performance benefits for real-time applications.
The Content Pipeline now supports Brotli compression for .xnb asset files. This reduces app sizes and improves loading times, especially for platforms with slower storage media such as Android and Oculus, as well as loading assets over the Web.
Usage: Enable Brotli compression in your .mgcb file:
/compress:True
/compression:Brotli
Productivity
The MGCB tool now supports consuming importers and processors from NuGet packages, simplifying content management workflows.
Usage: Add an extension package to your .mgcb file:
/packageReference:KNI.Extended.Content.Pipeline 4.0.3
Or add a package from the content Editor.

Sponsors
We’re grateful to our contributors and sponsors for their continued support. By becoming a sponsor, you help ensure the growth and sustainability of the KNI framework. Together, we’re shaping the future of open-source game development.