MIT License NuGet

Home / Docs

Getting started

Thirteen pages, in the order you will need them. This is the practical half of the documentation — how to build something. The feature tour is the other half: what the engine does, and what it does not.

You do not need a launcher, an editor or an asset pipeline. You need the .NET 10 SDK, a GPU from the last decade, and a text editor. A scene is a C# class.

The shortest complete program

Two types are enough. BaseApp is the application: window title, resolution, camera and the quality defaults. Panel is the composition unit: it owns controls and other panels.

using Season.Basic;
using Season.Controls;
using Season.Panels;
using Season.Rendering;
using System.Numerics;

namespace Hello;

internal class Scene : Panel
{
    internal Scene()
    {
        AddControl(new Model
        {
            Name = "Assets/island.glb",
            PosX = 0f, PosY = 0f, PosZ = 0f,
            Width = 60f, Height = 12f, Depth = 60f
        });
    }
}

internal class App : BaseApp
{
    internal App()
    {
        Title = "Hello";

        StorageService.DirectoryBase = "Hello";

        BackgroundColor = Colors.White;

        BasicResolution = new Vector2(1920f, 1080f);

        CameraTarget = new Vector3(0f, 3.5f, -2.5f);
        CameraPos = CameraTarget + new Vector3(0f, 0.5f, -3.5f);

        Camera.FovY = MathF.PI / 4f;
        Camera.Near = 0.1f;
        Camera.Far = 1300f;

        // Read once at initialization. Setting it later has no effect.
        RenderQuality.DefaultGlobalIllumination = GiMode.Ddgi;
    }

    public override void Create()
    {
        base.Create();

        AddPanel(new Scene());
    }
}

That is a lit, shadowed, globally illuminated scene under a physical sky. Nothing in it configures lighting, shadows, tonemapping or anti-aliasing, because those are pipeline defaults rather than things you assemble.

MemberMeaning
TitleWindow and task-bar title.
StorageService.DirectoryBaseOne folder name; each platform resolves it to its own settings and data location.
BackgroundColorClear colour for the scene target.
BasicResolutionThe design resolution your 2D layout is written in. The engine scales it to the real surface.
CameraPos / CameraTargetLeft-handed view setup. With CameraPos.Z < 0 the camera looks toward the origin and world +X is screen right.
Camera.FovY / Near / FarProjection, changeable at runtime. Identical values do not dirty the matrices.
Create()Called once after graphics initialization. Build the panel tree here, and call base.Create() first.
Constructor versus Create

The constructor runs before graphics initialization, which is why the RenderQuality.Default* values must be set there — they bake shader variants and size allocations. Anything that touches GPU resources, including controls, belongs in Create or later. Setting a Default* value after initialization is not an error and does nothing, which is the most confusing kind of no-op; if a quality setting seems to be ignored, check which side of that line it is on.

Four things to know before you start

  • Sizes are absolute, not multipliers. Width = 1f means one world unit wide, whatever the model file says. See placement.
  • Model.Rotation is in radians. Writing 90 gives you 90 radians and a model that looks almost right.
  • There is no Draw to write. You update state; the pipeline reads it. See the frame loop.
  • Assets are addressed by path below Resources/Raw/, identically on all six platforms. See project layout.

How these pages are organised

When the documentation runs out

The XML documentation on the engine types is unusually detailed: it records why a decision was made, not just what a member does. Several of the sharper explanations on this site are lifted from it. While the API is still moving, a project reference to Season/Season.csproj beats a package reference, because being able to read the implementation of anything that surprises you is worth more than a version number.

Beyond that, the two sample applications are the documentation with the most detail in it. Every panel in the reference app is a worked example.