Ductane v1.4.0
Contents

Docs / Start

Get started

Ductane is a Swift package. Add it, run the sample game that ships with it, then play that game by script and check it the way the engine checks itself.

macOS 26+Swift 6.2Metal 4 GPU
  1. Add the package

    In your game's Package.swift:

    dependencies: [
        .package(url: "https://github.com/Ductane/Ductane.git", from: "1.4.0")
    ]
  2. Run the sample

    A complete small game — two levels, an editor, sound, a save — written against the public API only. It opens with the engine's splash; any key skips it and still does what it was pressed for.

    swift run DuctaneSample
    The sample's ruins at eye height: a stone lintel on posts, stairs and warm lamps.
    The ruins at eye height, drawn by the sample.
  3. Play it by script

    Keys and seconds, pressed through the same path a keyboard uses. The log says where the feet ended each segment.

    DUCTANE_SAMPLE_LEVEL=1 \
    DUCTANE_SAMPLE_WALK="d:0.7 w:1.0 w:0.4 wait:1" swift run DuctaneSample
    DuctaneSample: walk 'w:1.0' → feet (4.20, 1.20, -0.00), highest 1.20, on the ground, eye 1.69 m up
  4. Check it

    The tests run from your clone. Before a change is called done, the engine also replays its recorded walks and redraws its recorded frames; those records are kept with its development, not in the package. One walk and one frame of your own are a line each:

    swift test
    DUCTANE_SAMPLE_WALK="w:1" swift run DuctaneSample
    DUCTANE_SAMPLE_FRAME=frame.png swift run DuctaneSample