Skip to content

Compiling for Windows

Starciad edited this page Dec 23, 2025 · 4 revisions

Introduction

Compiling for Windows is a straightforward process that requires just a few steps. If you have already followed the instructions in Compiling the Game and Development Setup, you are ready to proceed.

Preparation

First, you need to clone the repository locally on your machine. To do this, use the command below:

git clone --recursive--submodules "https://github.com/Starciad/StardustSandbox.git"

The --recursive--submodules flag complements the command, causing submodules to be initialized and updated automatically. This is important for synchronization with project assets located in another repository on GitHub.

If you forgot the flag, don't worry! You can follow the sequence of commands below to do the same thing:

# Step 1: Clone the repository into the current directory.
git clone "https://github.com/Starciad/StardustSandbox.git"

# Step 2: Enter the directory.
cd "StardustSandbox"

# Step 3: Initialize the submodules.
git submodule init

# Step 4: Update the submodules.
git submodule update

After that, the assets will be available locally.

Compiling

With everything prepared, you can start the compilation process. Choose one of the methods below:

Compiling with Visual Studio 2022

In the src directory of the source code, you will find a .sln (solution) file with the following naming pattern:

SS.{Platform}.sln
  1. Open the corresponding solution file in Visual Studio 2022.
  2. Press F6 to start the compilation process, or use the option Build > Build Solution.

During the build process, all required libraries will be downloaded, and the assets will be processed. This may take some time, so please be patient.

If everything goes smoothly, the compilation will complete successfully.

Compiling via Terminal

After extracting the source code, navigate to the src directory. Locate the solution file you want to use, following the same naming pattern:

SS.{Platform}.sln

Open a PowerShell or Command Prompt terminal in the directory and execute the following command to compile the project:

dotnet build "SS.Windows.sln"

To optimize and publish the game, use:

dotnet publish "SS.Windows.sln"

The process will download the necessary libraries and build all project components. This might take a while, so please wait.

If everything completes without errors, the game will be successfully compiled.

Running and Debugging

After compiling the project, the executable file will be available at:

StardustSandbox/src/Game/bin/Debug/{runtime}/StardustSandbox.exe

or

StardustSandbox/src/Game/bin/Release/{runtime}/StardustSandbox.exe

Clone this wiki locally