Features
Twelve elements, and what is in each.
What a native Mac game needs to ship, and was identical every time somebody wrote it. Every piece below is public API in Ductane 1.6.0, with a guide or a reference entry behind it.
- 1FpFrame pacing
FrameRenderer - 2SkSky and time
DaySky - 3WxWeather
WeatherSchedule - 4LsLight and shadow
ShadowCascades - 5MdModels
MeshLoader - 6PtParticles and decals
ParticleSystem - 7WfWorlds from a file
WorldPackage - 8ChCharacters
SkeletonPose - 9BdA body with feet
CharacterController - 10NvFinding the way
NavigationGrid - 11AuSound and music
AudioEngine - 12InInput and settings
InputBindings
- Time
- Picture
- World
- Player
Time
When things happen, and what the hour and the season look like.
Frame pacing
The engine owns when. It keeps frames in flight on Metal 4, steps your simulation at a fixed rate and tells you how far between two steps each frame falls, so motion stays smooth at any refresh rate.
- Frames in flight, and the device, queues and residency every renderer needs.
- A fixed simulation step, interpolated for display: a jump reaches the same height at 30 or 240 steps a second.
- Reversed-Z depth with an infinite far plane, enforced rather than suggested.
- HDR, with an exposure and a tone curve that fit it to the display.
- A clock that keeps game time while the window is hidden.
- A frame drawn into a texture with no window, for checks and screenshots, and a scene drawn smaller than the display and scaled up.
GameLoop FrameRenderer FixedTimestep FrameClock ToneMapping SceneScaling
Guides: GameLoop · Fixed timestep · Running hidden · Tone mapping · Recorded frames
Sky and time
One number, the hour, sets the sky: the sun's direction and light, the sky's colors and the eye's adjustment to the dark. A world clock runs the hours and the seasons by itself.
- A sky set by the time of day, drawn behind the scene with the sun's disc.
- Stars and the Milky Way turning about the pole, and a moon with its phase.
- Volumetric clouds with their own height, thickness and wind aloft.
- A world clock: the time of day, seasons on a game calendar, and the latitude the sun moves at, all from one shared time.
- Foliage through the year: each tree turns yellow, orange or red at its own pace, and grass goes straw.
- Image-based lighting from a procedural sky or an environment map.
DaySky SkyPass NightSky CloudPass WorldClock FallColors EnvironmentMap
Guides: The sky by the hour · The world's clock · Sky and environment
Weather
Clear, overcast, rain, storm, snow, fog and dust, as a few numbers a game draws and hears the same way an editor showed them. A schedule changes the weather by itself, worked out from a seed and the time, so everyone with the same clock sees the same sky.
- Presets by severity, or every setting by hand.
- Spells of weather one after another: clear for a while, cloud, a shower, clear again.
- Rain and snow falling around the eye, pushed by the wind, kept out from under roofs and bridges, and splashing where rain lands.
- Lightning: the bolt's shape, its flash, and the thunder's delay and volume.
- Volumetric fog with sun shafts, and ground fog pooling in hollows and over water.
- Snow building up on roofs and props, footprints where feet press, and props that sway in the wind.
Weather WeatherSchedule WeatherRenderer LightningBolt VolumetricFog GroundFog SnowCap FootprintTrail
Guide: Weather
Picture
What is drawn, and how it is lit.
Light and shadow
Cascaded shadows for the sun, and spot and point lights binned into clusters, any of which can cast.
- Cascaded sun shadows, handing over smoothly from one cascade to the next.
- Spot-light shadows packed into one atlas, and point-light shadows as cubes.
- The view cut into a grid of cells, so each fragment reads only the lights that reach it.
- A check you can run before a level ships: anywhere it asks for more lights than the budget holds.
- Physically based materials in the metallic-roughness model that glTF and USD both speak.
ShadowCascades ShadowMap ShadowAtlas ShadowCubes ClusteredLights LightSet Material
Guides: Shadows · Clustered lights · Materials and textures
Models
USD through Model I/O, and glTF and GLB with the compression they commonly carry. Textures are compressed once for the GPU and cached.
- USD, glTF and GLB, with Draco and meshopt geometry and KTX2 and WebP textures.
- Every asset brought into the engine's space by one matrix, whatever space it was authored in.
- Textures compressed to ASTC once and kept in a cache folder.
- Simpler versions of every mesh, made when it loads, or the maker's own levels of detail read from beside it.
- Many copies drawn in one call per mesh, and whatever is outside the view skipped.
- A model read as plain values — meshes, materials and images — for tools that need no GPU.
MeshLoader TextureStore CompressedTextures MeshDetail InstanceBatches Frustum ImportedModel
Guides: Loading meshes · Materials and textures · Many copies · Level of detail · Culling
Particles and decals
The things that say something just happened: dust, sparks and embers, and the marks a world keeps for a while afterward.
- Bursts, and emitters at a steady rate, from a recipe: how many, how they move, how long they last and how they look.
- Decals: bullet holes, scorches, footprints and splashes, each laid on its surface from a sheet of marks.
ParticleSystem ParticleEmitter ParticleRecipe DecalSet DecalAtlas DecalRenderer
World
Where the game happens, and who moves through it.
Worlds from a file
A world laid out in an editor, opened from one package and drawn whole by one renderer. The format is public and documented, so any tool can write one.
- A scene package (
.usdz) holding every prop, its textures and the world's description. - A documented world file: placements, ground, sky, water, effects, sounds, edges, and markers your game gives its own meaning.
- Drawn whole: painted ground with holes, puddles and fallen leaves; props instanced, culled and simplified by their size on screen; water that mirrors the scene; sky, weather, fog and seasons.
- Ground you stand on that is the ground you see: the heights and the drawn mesh come from one grid.
- For editors: worlds built and changed in code, with only the changed ground drawn again.
ductane-newwrites an Xcode project that opens an exported world and walks it in first person.
WorldPackage WorldFile WorldRenderer WorldScene WorldGround
Guides: Worlds from a file · Drawing a world · Your first game
Characters
Skinned animation from USD and glTF, skinned once a frame on the GPU, with gaits blended by speed and direction on one shared stride.
- Skeletons and clips read from USD and glTF — compressed glTF too — posed, blended and cross-faded.
- Skinned on the GPU: one compute dispatch per character, from a model shared by every copy.
- An idle and a gait picked by speed and direction, every stride on one phase so a blend never stumbles.
- Things hung off joints: a lamp on a hand, a turret on a hull, a sight on a rifle.
- A third-person camera that orbits, follows, keeps out of the scenery and eases back behind the character; and a first-person one.
Rig SkeletonPose SkinnedModel LocomotionBlend FigureMotion TransformHierarchy OrbitCamera
Guides: Skeletons and clips · Skinned characters · Moving a figure · Hanging things off joints · Camera
A body with feet
A character controller that walks, stands on things, steps up, falls off and crouches, and ends in the same place at any step rate.
- Stairs stepped up, the feet at once and the eye easing after them, and flight that follows the exact curve for gravity.
- Standing on things that move — a lift, a turntable, a ship's deck — and carried by them.
- Collision with the ground and with triangles: a bridge's deck, a cave's floor and walls, a boulder.
- Shots tested against a level's scenery without visiting every piece of it, each hit with the face it struck, for a mark to lie flat on.
- The edge of the world: a dome, or walls with a ceiling, and a net under the floor that catches anything that falls.
CharacterController MovementInput CollisionMesh Volume StaticVolumes WorldBoundary
Guides: CharacterController · The edge of the world
Finding the way
Where a body can walk and the way there, and the means to show a player where to go.
- A navigation grid over the ground and the floors on it — decks, stairs, ramps — that goes round costlier ground.
- A waymark: a line over the ground along the way a player can walk, and a beam of light at the place.
- Its sound made by the engine, so a game ships no file for it.
- A scan that sweeps out from the player and outlines what it finds, seen through walls, with an icon.
NavigationGrid Waymark WaymarkScan Findables
Guides: Finding a way · Showing the way
Player
What a player hears, and how they play.
Sound and music
Positional sound with a reach set per sound, a world's ambience played as its editor laid it out, and a score.
- Positional sound, full near its source and fading to silence at its reach.
- Ambience that starts as the listener comes within reach and fades at an area's edge, and sounds now and then, scattered through an area.
- Several takes of a sound, varied, so it does not grate the five-hundredth time.
- Music: one track looped, or a list in turn, faded in and out, held in place under a pause, with a world's own level mixed under the player's.
AudioEngine SoundReach Soundscape SoundArea SoundVariation MusicPlayer
Input and settings
Keyboard, mouse and game controllers read as one, bindings a player changes, and settings that are there next time.
- Keyboard, mouse and controllers collected into one state the simulation reads.
- Actions a player rebinds on keys and on pad buttons, with buttons known by where they sit, not what one maker calls them.
- A button held for a moment that acts once: holster, open a door, revive a friend.
- Sticks calibrated to where each one actually rests, and a pad that has stopped sending told apart from a stick being held.
- The graphics settings every 3D game's menu has — anti-aliasing, shadows, render scale, frame rate, clouds, fog, textures, draw distance, grass and reflections — every one applied by the world renderer when it changes.
- Settings and saves kept between runs.
InputState InputBindings PadBindings StickCalibration GraphicsSettings PlayerSettings SaveStore
Guides: Input and settings · Controller calibration · Graphics settings · Saving
Also in it
Pieces with no element of their own.
The HUD
Text from an installed font, colors for the interface, and images cut nine ways, filled like a bar or a dial, or clipped to a strip.
Loading screens
What stands in front of a world while it loads, so a player is never put into one that is half there.
Levels
A versioned level format, and an editor you use inside your running game.
Measuring
What each frame cost, a frame rate a person can read, the memory in use, and a fixed flythrough timed the same way every run.
Every type
All of the engine's public types, each with the first line of its documentation and the guide that explains it.
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.
Start with the sample.
A complete small game written against the public API only.
$swift run DuctaneSample