🌐 Browser Demos

CNA's EasyGL (OpenGL ES 3.0) renderer compiles to WebAssembly via Emscripten and renders via WebGL 2. The demos below run directly in a modern browser — no installation required. They also double as manual smoke tests for the Emscripten/WebGL 2 target: if they load and respond to input, that target is healthy.

🏠

House 3D Demo

Live

A 3D procedural house scene built entirely from CNA primitives: exterior walls, a pitched roof, windows, a door, interior floors, and surrounding ground. The player can walk and jump with full gravity. Rendered via BasicEffect and the EasyGL renderer, compiled to WebAssembly with Emscripten.

Validates 3D matrix transforms, camera projection, per-vertex lighting, player physics, and the game loop — all running in-browser at interactive frame rates.

🎨

CNA 2D Demo

Live

A 2D sprite demo exercising the SpriteBatch API: texture loading, draw calls with position/rotation/scale, tinted sprites, and layered rendering. Runs in the browser via the same Emscripten/WebGL 2 pipeline as the 3D demo.

Acts as a manual regression check for 2D rendering correctness on the Emscripten target. Also validates the content loading pipeline for PNG textures under WebAssembly.

📌

Note: alpha.1 contains 21 workflow files, including focused Emscripten, multi-renderer, platform, Apple/Metal, declared C API and subsystem gates; the C API final target is compile-blocked and the Windows D3D/GDI lanes remain manual. Those workflows do not continuously launch these hosted demo files or cover every browser, renderer and driver combination. Treat a successful local browser run as separate visual evidence, not as an implication from the repository CI matrix.

🎯 Verification against the real XNA runtime

Unit tests verify individual types in isolation. What they cannot verify is whether CNA behaves the way the real XNA runtime behaved, or whether the full programming model hangs together when actual game code drives it. Three things address that, and all three are checked mechanically rather than by eye.

🎯

Pixel-exact against real XNA

CNA maintains an XNA oracle corpus: 39 scenes under tools/xna-oracle/, rendered by a real C#/XNA reference renderer and diffed against CNA's DIRECTX9 output at --tolerance 0.

This is the strongest correctness claim on the site: not "looks right", but byte-identical to what the original runtime produced. The DIRECTX9 renderer exists largely to make this comparison possible — it uniquely targets pixel-exact XNA 4.0 authenticity.

🔄

Differential testing against FNA

A real running FNA build lives under tools/fna-reference/ and dumps its observable behaviour as JSON. tools/cna-reference/ produces the C++ counterpart dump, and scripts/compare-fna-reference.py diffs the two.

Where XNA's documented behaviour is ambiguous, this settles it empirically instead of by interpretation. A separate compile-time CNAEXT purity check turns every non-XNA declaration into a [[deprecated]] warning under -Werror, keeping the XNA surface honest.

💾

Real ported games

Two genuinely separate projects drive CNA with real game code rather than test harnesses:

  • cna-craft — a 13,766-line port of fogleman/Craft, a voxel game, onto CNA.
  • cna-extended — 101,461 lines: a C++23 port of MonoGame.Extended plus a non-upstream World3DEXT 3D scene layer.

Alongside them, CNA itself ships 28 demo programs under examples/ — 2D, audio, XACT, input, devices, avatar, GamerServices and networking demos, plus house3d_demo.

What the oracle corpus actually looks like

Four of the 39 scenes. Every one of these frames was drawn by the real Microsoft XNA 4.0 runtime — they are the reference images, not CNA screenshots. CNA's DIRECTX9 renderer must reproduce each of them byte for byte. The full set is described on the verification page.

A triangle on a cornflower-blue background with red, green and blue vertex colours blended smoothly across its face.

Vertex-coloured triangle.

A quad with only its left half drawn — a red block above a white block — the right half discarded by the alpha test.

Alpha test discarding half a quad.

A square shading from bright orange-brown at the top to near-black at the bottom, on cornflower blue.

Fresnel-weighted environment reflection.

A brown square on a black background, the topmost sprite after back-to-front depth sorting.

Back-to-front sprite sorting.

📌

The honest framing: CNA is a research-grade porting-experiment framework, not yet a ship-a-commercial-game framework. What the evidence on this page supports is that the XNA programming model works, that rendering matches the original runtime where it has been measured, and that the test suite is large and real. It does not yet support a claim that any commercial title has shipped on it.

🏃 Real-World Validation — Speedy Blupi

Unit tests verify individual types and subsystems in isolation. What they cannot verify is whether the full XNA programming model hangs together when real game code drives it. The Speedy Blupi port answers that question.

🎮

What Speedy Blupi validates

Speedy Blupi is a classic open-source action game. Porting it to CNA exercises the full stack simultaneously:

  • SpriteBatch — layered sprite rendering with correct depth ordering
  • Input handling — keyboard and gamepad state each frame
  • AudioSoundEffect and SoundEffectInstance for per-event sounds
  • Content loading — texture and audio asset pipeline
  • Game loop semantics — fixed-timestep Update / variable-timestep Draw

What it proves

Real-world XNA-style game code works on CNA. The port did not require changes to the game's core logic — only the platform-facing layer was adapted. This demonstrates that:

  • CNA's API shape is close enough to XNA 4.0 that porting is mechanical, not a rewrite.
  • The framework is stable enough to run a multi-system game loop without crashing or producing rendering artifacts under sustained play.
  • Audio, input, and rendering subsystems interoperate correctly when driven by real game state.
📱

Platform targets

The Speedy Blupi port records these project targets:

  • Linux x86_64 — primary desktop target, EasyGL renderer
  • Android — SDL_RENDERER/NDK project path; revalidate against the exact CNA release used to package it
  • WebAssembly — Emscripten/WebGL 2 build in progress

Consumer-project results are useful evidence for that project's pinned revision, not a continuous alpha.1 platform gate. CNA itself has no Android workflow at this tag.

📚 Sample Applications — cna-samples

The cna-samples repository contains direct ports of the original XNA Game Studio 4.0 sample suite. Each one follows the original C# source as closely as possible — the point is to test CNA's API against what real XNA code actually demanded, not to write flattering new demos.

63 of the 86 addressable samples build today, including Platformer, MarbleMaze, RolePlayingGame, CatapultWars, HoneycombRush, NinjAcademy, GameStateManagement, Audio3D and the peer-to-peer networking samples — spanning 2D primitives, collision, AI and pathfinding, particles, complete 2D games, 3D audio, touch gestures and LAN multiplayer.

The 23 that don't build are the most informative number on this page, because they nearly all fail for the same reason: they ship custom .fx shaders, and CNA cannot compile HLSL bytecode. BloomSample, ShadowMapping, NormalMapping, SkinningSample, PerPixelLighting, DistortionSample and the rest are blocked on that one gap rather than on anything scattered across the API. Close it and most of them come along.

PrimitivesSample

Ported

Port of the original XNA Game Studio 4.0 Primitives Sample demonstrating 2D primitive rendering: lines, triangles, rectangles, and circles drawn using SpriteBatch and procedurally generated textures.

Validates: SpriteBatch.Begin/End, pixel-texture creation, 2D coordinate mapping, and the basic game loop with variable-size window support.

Primitives3D

Ported

Port of the original XNA Game Studio 4.0 3D Primitives Sample demonstrating 3D shape rendering: box, sphere, cylinder, torus, and teapot primitives rendered with BasicEffect lighting and per-object transform matrices.

Validates: BasicEffect with ambient/diffuse/specular lighting, VertexBuffer/IndexBuffer management, view/projection matrix setup, and the 3D rendering pipeline end-to-end.

🏆

CatapultWars

Ported

Port of the original XNA Game Studio 4.0 Catapult Wars — a complete two-player turn-based artillery game with scoring, animated sprites, and game-state screens.

Validates: a full game loop end-to-end, not just an isolated API — sprite animation, input handling, scoring, and screen transitions working together.

📌

GameStateManagement

Ported

Port of Microsoft's Game State Management sample: a reusable screen-stack framework (menus, gameplay, pause, transitions) used as the foundation for many of the other official XNA sample games.

Validates: a layered GameComponent/screen architecture on top of CNA's Game base class.

🧩

Pathfinding & FlockingSample

Ported

Ports of the XNA AI sample pair covering grid-based pathfinding and boid-style flocking/steering behavior, alongside related ports (ChaseAndEvade, WaypointSample, AimingSample, FuzzyLogic).

Validates: math-heavy gameplay code (vectors, steering forces, grid search) ported faithfully from C# to C++23.

🔊

Audio3D & GesturesSample

Ported

Ports covering positional 3D audio playback and touch gesture recognition (tap, drag, pinch, flick) — the two least-graphics-focused corners of the XNA API surface.

Validates: SoundEffect3D-style positional audio and Microsoft::Xna::Framework::Input::Touch gesture handling outside of pure rendering code.

🔗

Repository: All sample ports live at github.com/openeggbert/cna-samples. Each sample includes build instructions and mirrors the structure of the original XNA sample project. Additional XNA 4.0 sample ports are added as API coverage expands.

🖥 Platform Validation

CNA is built on SDL3, which provides the portability layer. The table below reflects current validated state — "validated" means demos or game code has been built and run on real hardware or a real browser, not merely that the code compiles.

Platform Renderer Status Notes
Linux x86_64 EasyGL + SDL_RENDERER Validated Primary source and CI platform. The tag's Linux workflows exercise several configured slices, not every renderer or every test definition. EasyGL's OPENGLES3 identity is the Linux default.
Android SDL_RENDERER Partial Source and CMake/NDK integration exist, including Android sensor paths. Alpha.1 has no Android workflow lane, so do not promote configure/cross-build support into a runtime-observed device claim.
WebAssembly / Browser EasyGL (WebGL 2) Validated House 3D Demo and CNA 2D Demo are hosted WebGL 2 examples. The tag also has focused Emscripten multi-renderer and HTML DOM workflow evidence; neither substitutes for testing every browser renderer in target browsers.
Windows SDL_RENDERER, DIRECTX9, DIRECTX11, DIRECTX12 Partial Native MSVC and MinGW-w64 cross-build paths exist. Direct3D/GDI workflow lanes in alpha.1 are manually dispatched, and there is no automatic MinGW/Wine lane at the tag. Report a concrete configured build or runtime run rather than treating source support as continuous Windows validation.

Renderer note: CNA 0.1.0-alpha.1 exposes 50 identities across 46 implementation families. A default build contains one selected with CNA_GRAPHICS_RENDERER; an opt-in CNA_GRAPHICS_RENDERERS build can contain several compatible families and select one before device creation. This page demonstrates only a tiny subset, so do not generalize its output or capabilities to the full inventory. See Renderers for the source-audited matrix and Runtime Renderer Selection for the multi-renderer boundary.