The elements of a Mac game.

Swift 6 and Metal 4 all the way down. No runtime, no translation layer, no editor you are required to learn. Your game is a Swift package.

Start with the sample $swift run DuctaneSample
  1. 1FpFrame pacingFrameRenderer
  2. 2SkSky and timeDaySky
  3. 3WxWeatherWeatherSchedule
  4. 4LsLight and shadowShadowCascades
  5. 5MdModelsMeshLoader
  6. 6PtParticles and decalsParticleSystem
  7. 7WfWorlds from a fileWorldPackage
  8. 8ChCharactersSkeletonPose
  9. 9BdA body with feetCharacterController
  10. 10NvFinding the wayNavigationGrid
  11. 11AuSound and musicAudioEngine
  12. 12InInput and settingsInputBindings
macOS 26 or later Swift 6.2 A Metal 4 GPU Ships sandboxed or not — your call
The engine's sample courtyard in daylight: animated figures, a stone turntable and long shadows.
The courtyard, drawn by the sample.

A game is a Swift file

The engine owns when. Your game owns what.

Pacing, frames in flight and the fixed timestep are the engine's. Your pipelines, your draws and your rules are yours — the line sits exactly where every renderer it came from stopped being the same.

import Metal
import Ductane

final class Game: GameLoop {
    var body = CharacterController(feet: .zero)
    var world = CharacterController.Surroundings()

    func beginFrame() {}

    func step(deltaTime: Float) {
        body.step(yaw: 0, input: MovementInput(forward: 1),
                  deltaTime: deltaTime, in: world)
    }

    func viewportSizeChanged(width: Int, height: Int) {}

    func encode(into encoder: MTL4RenderCommandEncoder,
                frameSlot: Int, interpolation: Float) {
        // your pipelines, your draws
    }
}

The whole contract: GameLoop. Everything above it is the engine's.

Shows its work

A game engine that shows its work.

Every feature was pulled out of a working game, and every claim on this page is a number you can reproduce on your own machine, with the check that holds it.

The same jump, however often the game steps.

Apex of a 6.3 m/s jump, in meters. The height it should reach is 0.992.

Steps a secondStepped simplyDuctane
300.8900.992
600.9400.992
1200.9660.992
2400.9790.992

Stepped simply, a game at 60 misses a ledge one at 120 clears. In Ductane one course of walking, jumping, sliding and landing ends in the same place at all four rates.

The sample's ruins from above at dusk, lit by braziers, casting long shadows.

Found by drawing one frame

Every shadow was a frame stale.

The scene read shadow maps that the same command buffer was still writing. In play it looked right — last frame's maps were there — and nothing said otherwise.

Drawing a single frame into a file showed it: the first frame came out different every run. Two barriers later, four runs of that frame are the same bytes, and the frame is a check.

What's in it

What a native Mac game needs to ship, and was identical every time somebody wrote it.

Time

FpFrame pacing

Frames in flight, a fixed timestep, a clock that keeps time with the window hidden.

FrameRenderer · FixedTimestep

SkSky and time

A sky set by the hour, a calendar of seasons, the sun by date and latitude, stars and a phased moon.

DaySky · WorldClock

WxWeather

Cloud, rain, snow, wind, fog and lightning on a seeded schedule every player sees alike. Puddles, lying snow and footprints follow.

Weather · WeatherSchedule

Picture

LsLight and shadow

Cascaded sun shadows, and spot and point lights binned into clusters that each cast.

ShadowCascades · ClusteredLights

MdModels in any format

USD, glTF and GLB with Draco, meshopt, KTX2 and WebP. Textures compressed once and cached.

MeshLoader · CompressedTextures

PtParticles and decals

Smoke, sparks, streaks of rain and effects that follow a thing, and marks laid on the world.

ParticleSystem · DecalSet

Many copies

Instanced drawing: a wood of trees or a field of debris in one draw per kind.

InstanceBatches · InstanceBuffer

Detail by distance

Simpler versions of every mesh, made when it loads; each copy draws the one its distance earns.

MeshDetail

World

WfWorlds from a file

A world laid out in an editor — ground, props, water, lights, sounds, weather — opened from one package.

WorldPackage · WorldFile

ChCharacters

Skinned animation from USD and glTF, gaits blended by speed, cross-fades, and things hung off joints.

SkeletonPose · LocomotionBlend

BdA body with feet

Stairs, lifts, turntables, being pushed — and the same at any step rate.

CharacterController

NvFinding the way

A navigation grid that goes round costlier ground, and a waymark that shows a player where to go.

NavigationGrid · Waymark

Levels

A versioned level format, and an editor you use inside your running game.

Level · LevelEditor

Player

AuSound and music

Positional sound with a reach per sound, ambience that fades at an area's edge, sounds now and then, and playlists.

AudioEngine · Soundscape

InInput and settings

Keys and pads a player rebinds, calibrated sticks, and graphics and audio settings that save.

InputBindings · GraphicsSettings

What it deliberately isn't

Each of these is something the engine leaves to you, or to a game that proves it is needed.

No scene graph

Your game owns its objects. The engine owns when things happen.

No ECS

Structure your game the way your game wants to be structured.

No editor inside the engine

A level editor embeds in your game and edits its levels in place. A standalone editor is a separate product built on the engine, not part of it — Worldra is one.

Not a runtime

Mac first. Another platform means a native port, not a wrapper.

Tools for it

Two Mac apps built on the engine. Neither is needed to use it, and the engine opens what they save.

Worldra

Lay out worlds from anyone's environment packs: place props, sculpt and paint the ground, scatter, and set the sky, weather and sound. Its export is a world your game opens with WorldPackage.

Rigkin

Build characters from anyone's modular parts, then export them rigged and animated, as USD or glTF, ready for the engine's characters.

How it's checked

On every change, before it's called done.

1,267

Tests

Each new one shown to fail with its feature switched off.

swift test
45

Scripted walk runs

17 walks of the sample, played by script and invisibly — seven of them at four step rates, and one again under the splash.

DUCTANE_SAMPLE_WALK="w:1" swift run DuctaneSample
6

Recorded frames

Drawn with no window and compared pixel by pixel against the last good one.

DUCTANE_SAMPLE_FRAME=frame.png swift run DuctaneSample