This repository contains a reinterpretation from Dune game, originally published by Cryo Interactive. It is written in Swift and runs on macOS and Linux.
Game currently only supports Dune v2.1 assets (initial floppy version)
You need the original files from the game to play it.
Create a subfolder DuneFiles next to SwiftDune.xcodeproj and place the files in it.
Open SwiftDune.xcodeproj in Xcode and run the DuneMac scheme. The DuneEditor scheme opens the asset browser. The Mac app targets macOS 14.
From the repository root:
xcodebuild -project SwiftDune.xcodeproj -scheme DuneMac buildThe Linux build is the Swift package in SwiftDune/Engine/Platforms/Linux. It opens a window with X11 and OpenGL.
Install Swift 5.10 or newer, plus the X11, OpenGL, and ALSA development packages. On Ubuntu:
sudo apt-get install libx11-dev libxext-dev libgl1-mesa-dev libasound2-devThen, from the repository root:
cd SwiftDune/Engine/Platforms/Linux
swift build -c release
./.build/release/SwiftDuneThe game finds the DuneFiles folder by walking up from that directory. Set DUNE_FILES to use a copy stored somewhere else.
Docker runs the game on an Ubuntu desktop you can open in a browser. DuneFiles must sit next to this repository, as described above.
cd SwiftDune/Engine/Platforms/Linux
docker compose up --buildOpen http://localhost:6080/vnc.html?autoconnect=1&resize=scale
The first launch compiles a release build, then starts the game in that desktop. Sound plays through the default ALSA device on a native Linux build. The browser session has no audio device.
There are 2 applications:
- Editor view: used to browse the assets
- Game view: play the game
Code is split between three main sections:
- Editor: asset viewer
- Game: the game logic
- Engine: primitives for parsing original assets, perform world simulation and rendering
Architecture tries to use modern game patterns:
- events
- node structure
I got inspired by prior reverse-engineering works that amazing people made across the years:
A Dune Reborn Discord can be joined to discuss various works around the game here: Join the Discord