Skip to content

About

Rewrite in Swift of Dune original game created by Cryo Interactive

Topics

Resources

Stars

6 stars

Watchers

1 watching

Forks

Latest commit

 

History

91 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dune

This repository contains a reinterpretation from Dune game, originally published by Cryo Interactive. It is written in Swift and runs on macOS and Linux.

Installation

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.

Build

macOS

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 build

Linux

The 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-dev

Then, from the repository root:

cd SwiftDune/Engine/Platforms/Linux
swift build -c release
./.build/release/SwiftDune

The game finds the DuneFiles folder by walking up from that directory. Set DUNE_FILES to use a copy stored somewhere else.

Linux desktop in Docker

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 --build

Open 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.

How to use

There are 2 applications:

  • Editor view: used to browse the assets
  • Game view: play the game

Architecture

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

Thanks

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

About

Rewrite in Swift of Dune original game created by Cryo Interactive

Topics

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages