Status: CNA is actively developed but not yet complete or production-ready. XNA 4.0 API coverage is incremental and growing. It is suitable for engine research, experimentation, and open-source contribution — not for shipping commercial games at this stage.

Background — the XNA programming model

Microsoft XNA Game Studio was a managed game development framework targeting Windows, Xbox 360, and Windows Phone. Released around 2006–2013, it offered developers a clean, well-structured API for 2D and 3D game development. The framework's game loop (Initialize, LoadContent, Update, Draw), its sprite batching system, content pipeline, and the Microsoft.Xna.Framework namespace hierarchy were widely praised for their clarity.

XNA was discontinued by Microsoft in 2014. The open-source community responded with notable projects:

  • FNA — a fully managed C# reimplementation that is binary-compatible with XNA 4.0, built on SDL2.
  • MonoGame — a cross-platform C# successor to XNA, used commercially to this day.

Both FNA and MonoGame are excellent projects. However, both remain in the managed C# ecosystem. There was no mature native C++ reimplementation of the XNA 4.0 API.

Why CNA?

CNA was created to fill a specific niche: native C++ implementation of the XNA 4.0 API. The reasons this is useful:

  • No managed runtime: C++ avoids garbage collection pauses, managed heap overhead, and JIT warmup costs. Useful for performance-critical or embedded scenarios.
  • Toolchain flexibility: C++ integrates directly with any C or C++ codebase, LLVM toolchains, and embedded/console targets that may not support .NET.
  • Engine foundation: CNA is intended as the internal runtime base for the Nova-3D engine — a higher-level 3D engine that requires the control that a native layer provides.
  • API preservation: The XNA programming model is genuinely good design. Preserving it in C++ keeps the conceptual clarity that game developers appreciated while moving to a native runtime.
  • Portability: Built on SDL3, CNA can target Linux, Windows, Android, and potentially WebAssembly via Emscripten from a single codebase.

What problem does CNA solve?

If you are building a game or engine in C++ and you want:

  • A familiar, well-structured game loop modelled after XNA
  • A SpriteBatch API for 2D rendering
  • A GraphicsDevice abstraction that hides backend details
  • Portability across Linux, Windows, and mobile
  • The ability to swap rendering backends without changing game code

…then CNA offers a foundation that provides all of these things while keeping the implementation in native C++23.

What CNA is not

  • CNA is not a C# framework or a .NET library.
  • CNA is not affiliated with or endorsed by Microsoft Corporation.
  • CNA does not use any Microsoft, Xbox, or XNA branding assets. XNA is referenced only as the compatibility target and API inspiration.
  • CNA is not a game — it is a framework and runtime abstraction layer.
  • CNA is not production-ready in its current state.

Relationship to FNA and MonoGame

📝

Attribution — based in part on FNA (C#): CNA is partially based on the FNA project, a managed C# reimplementation of the XNA 4.0.4 API. Portions of CNA's design, API structure, and implementation logic are derived from or inspired by FNA's C# source code. FNA is authored by Ethan Lee and contributors, and is likewise licensed under the Microsoft Public License (Ms-PL). CNA's use of FNA as a basis is permitted by and compliant with the Ms-PL. The full attribution is in NOTICE.md and THIRD_PARTY_NOTICES.md.

In practical terms: where FNA provides a C# class implementing a particular XNA behaviour, CNA translates that behaviour into C++23 idioms — replacing managed types with RAII, delegates with virtual methods, and properties with getter/setter methods. The game-facing API shape follows FNA's C# surface as the authoritative XNA 4.0 reference, while the internal implementation is native C++ throughout.

Both FNA and MonoGame remain excellent choices for managed C# game development. CNA serves the C++ ecosystem specifically.

Licence

CNA is licensed under the Microsoft Public License (Ms-PL). See the LICENSE file for full terms. Portions of CNA are derived from or based on FNA, which is also licensed under the Ms-PL.