(cherry picked from commit 5a9e78a3be)
Note: Support for building on windows or mac was (probably) broken while cherry-picking
Signed-off-by: Thibault Lemaire <thibault.lemaire@protonmail.com>
Tenhauser Gate
📣 Play in your browser! Try our experimental wasm port here: Gardens of Kadesh
Source port of Homeworld 1 for Linux & macOS.
🛈 Not playing on Linux or macOS? Check out our central Homeworld SDL hub.
Homeworld is a 3D space real-time strategy game released in 1999. It's source code was released in 2003 by Relic Entertainment, allowing a small but dedicated community of fans to port it to SDL, enabling native versions for Linux, MacOS, and more recently, web browsers.
💬 Join our matrix space
Requirements
This repository contains only the source code for Homeworld's engine (metaphorically, the skeleton). In order to have a playable game, you will need the original assets (artwork, textures, sounds, meshes, ... Metaphorically again, the flesh).
To be clear: You need to have bought the game to use this project.
So make sure you either have:
-
The original Homeworld game from 1999 (It is not sold anywhere anymore, so either you have a CD dusting on your shelf, or you'll have to get one second-hand). In that case, you should also download the official 1.05 patch.
Asset checklist
This section is intended as a quick checklist to make sure you have everything needed for the game to run. If you don't know where to find one of these files, see the appropriate section below. (Most of them can be found in the game's installation folder.)
HomeworldSDL.bigYou will have to build this one from this repo. (Except if you plan to play with a 32b version, which is not the default, and deprecated.)
Original (1999)
-
Homeworld.bigsha256: af9dcc06e3f99404334a0a8ec17e399876080e85feb5b47858382dc715136040
-
Update.bigProvided by the official 1.05 Patchsha256: c71b07758ee7696b3a19c1d75c946cbd68830e03b30cd3c2888f2f6d22b7c976
-
HW_Comp.vcesha256: 15c4b988adb09b0969b0dc288b21ddc10ca9d42a2064d15b46b53dcf02fc2e44
-
HW_Music.wxdsha256: b909c2cdbc8c8db67be168f6005bf8e8facaa9857263b16d186c824a0c4eed4f
Remaster (2015)
-
homeworld.big(You might have to rename it toHomeworld.big, with a capitalH)sha256: e38c0528c1d4bd9d9195d26d5231ae29bef18f57d9bd1fe2eed33fb2b9b172a8
-
HW_Comp.vcesha256: 15c4b988adb09b0969b0dc288b21ddc10ca9d42a2064d15b46b53dcf02fc2e44
-
HW_Music.wxdsha256: 48f93c07bf718c56c20727aba12f06baf13d4d11d1c7185d2d2153543834e454
Setting up the assets folder
You should choose an installation folder where you will put (copy|move|symlink) all the required files. This will be refered to as $ASSETS_FOLDER from here on out. (For example ~/Games/HomeworldSDL/)
Extracting the assets
Original (1999)
Install the game and patch with wine (tested with wine 4.1)
wine HWSetup.EXE
wine si_homeworld_update_105.exe
Open the game installation folder (usually ~/.wine/drive_c/Sierra/Homeworld). This is where you'll find the required files. Put them to $ASSETS_FOLDER.
Remaster (2015)
Steam
After installing the game, you should find the required assets in ~/.local/share/Steam/steamapps/common/Homeworld/Homeworld1Classic/Data. Put them to $ASSETS_FOLDER.
macOS
To setup either the data from the original or remaster. Please place the data assets into 'Library/Application Support/Homeworld' or, if you are using Raider Retreat, place them in the same destination folder except to use 'Raider Retreat' instead of 'Homeworld'.
Compiling from source
Linux
If you have Nix installed, just run:
HW_Data=$ASSETS_FOLDER nix run --impure 'git+https://gitlab.com/homeworldsdl/TenhauserGate.git?dir=Linux#i-am-not-on-nixos'
Or if you are on NixOS:
HW_Data=$ASSETS_FOLDER nix run 'git+https://gitlab.com/homeworldsdl/TenhauserGate.git?dir=Linux'
Nix will download everything it needs, build the HomeworldSDL source code, then run the resulting binary.
If you don't have Nix installed, please refer to Linux/BUILD.md.
Game is slow/crashes
By default, the version compiled by nix has debugging tools enabled which can slow down the game and crash when its trying to fit round pegs in square holes.
If you experience any crash, please, send us the log!
But if you would prefer the latest stable version compiled in release mode (faster):
HW_Data=$ASSETS_FOLDER nix run 'git+https://gitlab.com/homeworldsdl/the-guidestone.git'
macOS
Go into the 'Mac' directory, and use the xcode project. Please note, you will need the SDL2.framework before you start. This can be found on the releases page of SDL's github repository as a .dmg file. Place this file into the same directory as the xcode project file and then proceed to build the engine.
Running the game for the first time
The first time you run the game, you will have to point it to the directory containing the required assets. For example, if you have compiled the game from source:
HW_Data=$ASSETS_FOLDER ./homeworld
where ./homeworld is the path to your HomeworldSDL binary executable.
Once the game starts, you should then configure the OpenGL renderer.
The game stores its configuration in ~/.homeworld, and will remember the asset directory and graphics configuration for later runs, which means you don't need to provide the HW_Data dir the next time you run the game, and you can safely move the executable around.
Configuring the OpenGL renderer
The first time you run the game, you'll have to configure the renderer to use OpenGL. This will be saved in your ~/.homeworld, so you won't have to do it every time you run the game.
Once the game has launched, you need to:
- Select "Options" from the main game menu.
- Select "Video" from the available option sub-menus listed on the right side of the screen.
- Select "(GL) Default OpenGL" from the "Rendering System" box.
- Choose a resolution from the "Resolution" box (any resolution you choose will do fine).
- Click on the "Accept!" button in the bottom-right corner of the screen.
The game will now attempt to switch to the OpenGL renderer.
If everything goes okay, you should be presented with a confirmation that the settings you requested were changed. Select "Yes", and you should be ready to go!
About
If you want to know more about this project (and see some screenshots!), please head over to the wiki.