Novolis Docs
novolis-rendering / design-planar.md

2D rendering (`Novolis.Rendering.Planar`)

dotnetgraphicsrenderingnovolis

Orthographic 2D renderer for platformers (Mario-style): backgrounds, sprite animation, static polygons with colliders, HUD, and menus.

Packages

PackageRole
Novolis.Rendering.PlanarHost-neutral scene, collision, HUD, menus, tessellate, PNG load
Novolis.SilkGLFW/OpenGL submit of tessellated quads (novolis-silk)

Path tracing packages (Novolis.Rendering.Runtime, Backends.Cpu, etc.) stay separate. Apps can use both stacks if needed.

Conventions

  • World space: BCL Vector3 on the XZ plane (Y = 0).
  • Screen HUD/menus: pixel coordinates, origin top-left.
  • No Vector2 in public API.

Mario-style checklist

FeatureAPI
Background imagePlanarScenePrimitives.AddBackground + PlanarPngLoader
Character animationPlanarAnimatedSprite + PlanarAnimationClip.FromRow
Platforms / blocksPlanarScene.AddPlatform or PlanarStaticPolygon
CollisionPlanarCollisionWorld.MoveCircle
HUDPlanarHud.AddText / AddSprite
MenusPlanarMenuStack.Push + SilkGame menu keys

Layered grid export

PlanarSceneGridRasterizer / PlanarScene.ToLayeredGrids() produce per-PlanarDrawLayer DenseGrid<Rgba32> buffers for unit tests and ASCII debug (PlanarLayerGridSet.ToAscii). No Silk/OpenGL required.

Related