2022-11-23 15:49:13 +00:00
|
|
|
## Metaforce [![Build Status]][actions] [![Discord Badge]][discord]
|
2021-04-06 22:58:11 +00:00
|
|
|
|
2022-11-23 15:49:13 +00:00
|
|
|
[Build Status]: https://github.com/AxioDL/metaforce/actions/workflows/build.yml/badge.svg
|
|
|
|
[actions]: https://github.com/AxioDL/metaforce/actions
|
|
|
|
[Discord Badge]: https://dcbadge.vercel.app/api/server/AMBVFuf?style=flat
|
|
|
|
[discord]: https://discord.gg/AMBVFuf
|
2019-08-23 01:42:47 +00:00
|
|
|
|
2022-11-23 15:49:13 +00:00
|
|
|
A reverse-engineered, native reimplementation of Metroid Prime.
|
2016-12-22 01:42:10 +00:00
|
|
|
|
2022-11-23 15:07:42 +00:00
|
|
|
This project is currently in **alpha** state.
|
|
|
|
Builds are currently unavailable while the project undergoes large changes.
|
2016-01-05 19:17:34 +00:00
|
|
|
|
2022-11-23 15:49:13 +00:00
|
|
|
Separately, a [matching decompilation](https://github.com/PrimeDecomp/prime) of Metroid Prime is currently underway. Contributions are welcome.
|
|
|
|
Progress on the decompilation benefits Metaforce with bug fixes and new implementations.
|
2020-04-14 20:14:02 +00:00
|
|
|
|
2022-11-23 15:49:13 +00:00
|
|
|
![Metaforce screenshot](assets/metaforce-screen1.png)
|
2016-01-05 19:17:34 +00:00
|
|
|
|
2015-09-12 21:47:31 +00:00
|
|
|
### Platform Support
|
2022-11-23 15:49:13 +00:00
|
|
|
* Windows 10+ (64-bit, D3D12 / Vulkan / OpenGL)
|
2020-06-26 00:57:21 +00:00
|
|
|
* macOS 10.15+ (Metal)
|
2022-11-23 15:49:13 +00:00
|
|
|
* Linux (Vulkan / OpenGL)
|
2021-02-28 04:23:06 +00:00
|
|
|
* Follow [this guide](https://github.com/lutris/docs/blob/master/InstallingDrivers.md) to set up Vulkan & appropriate drivers for your distro.
|
2021-06-12 15:26:52 +00:00
|
|
|
|
2022-11-23 15:07:42 +00:00
|
|
|
### Usage
|
2021-06-12 15:26:52 +00:00
|
|
|
|
|
|
|
Windows:
|
2022-11-23 15:07:42 +00:00
|
|
|
- Open `metaforce.exe`
|
2021-06-12 15:26:52 +00:00
|
|
|
|
|
|
|
macOS:
|
|
|
|
- Open `Metaforce.app`
|
|
|
|
|
|
|
|
Linux:
|
|
|
|
- Ensure AppImage is marked as executable: `chmod +x Metaforce-*.AppImage`
|
|
|
|
- Open `Metaforce-*.AppImage`
|
|
|
|
|
2022-11-23 15:07:42 +00:00
|
|
|
#### CLI options (non-exhaustive)
|
2020-02-22 06:47:49 +00:00
|
|
|
|
|
|
|
* `-l`: Enable console logging
|
|
|
|
* `--warp [worldid] [areaid]`: Warp to a specific world/area. Example: `--warp 2 2`
|
2021-06-12 15:26:52 +00:00
|
|
|
* `+developer=1`: Enable developer UI
|
2015-10-12 00:04:11 +00:00
|
|
|
|
|
|
|
### Build Prerequisites:
|
2021-06-12 15:26:52 +00:00
|
|
|
* [CMake 3.15+](https://cmake.org)
|
2020-05-24 16:03:33 +00:00
|
|
|
* Windows: Install `CMake Tools` in Visual Studio
|
|
|
|
* macOS: `brew install cmake`
|
2015-10-12 00:04:11 +00:00
|
|
|
* [Python 3+](https://python.org)
|
2020-05-24 16:03:33 +00:00
|
|
|
* Windows: [Microsoft Store](https://go.microsoft.com/fwlink?linkID=2082640)
|
|
|
|
* Verify it's added to `%PATH%` by typing `python` in `cmd`.
|
|
|
|
* macOS: `brew install python@3`
|
2020-04-11 07:45:45 +00:00
|
|
|
* **[Windows]** [Visual Studio 2019 Community](https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx)
|
2020-02-22 06:47:49 +00:00
|
|
|
* Select `C++ Development` and verify the following packages are included:
|
|
|
|
* `Windows 10 SDK`
|
|
|
|
* `CMake Tools`
|
|
|
|
* `C++ Clang Compiler`
|
|
|
|
* `C++ Clang-cl`
|
2021-02-28 04:05:24 +00:00
|
|
|
* **[macOS]** [Xcode 11.5+](https://developer.apple.com/xcode/download/)
|
2021-06-12 15:26:52 +00:00
|
|
|
* **[Linux]** Actively tested on Ubuntu 20.04, Arch Linux & derivatives.
|
2021-02-28 04:05:24 +00:00
|
|
|
* Ubuntu 20.04+ packages
|
|
|
|
```
|
2021-04-19 01:39:09 +00:00
|
|
|
build-essential curl git ninja-build clang lld zlib1g-dev libcurl4-openssl-dev \
|
|
|
|
libglu1-mesa-dev libdbus-1-dev libvulkan-dev libxi-dev libxrandr-dev libasound2-dev libpulse-dev \
|
2021-08-12 13:40:23 +00:00
|
|
|
libudev-dev libpng-dev libncurses5-dev cmake libx11-xcb-dev python3 python-is-python3 \
|
2022-11-23 15:07:42 +00:00
|
|
|
libclang-dev libfreetype-dev libxinerama-dev libxcursor-dev python3-markupsafe libgtk-3-dev
|
2021-02-28 04:05:24 +00:00
|
|
|
```
|
2022-06-06 16:18:23 +00:00
|
|
|
* Optional Ubuntu 22.04+ packages (currently only needed for amuse-gui, can be ignored)
|
|
|
|
```
|
2022-09-03 13:36:47 +00:00
|
|
|
libqt6svg6-dev libqt6core5compat6-dev qt6-tools-dev-tools
|
2022-06-06 16:18:23 +00:00
|
|
|
```
|
2021-06-12 15:26:52 +00:00
|
|
|
* Arch Linux packages
|
|
|
|
```
|
2022-11-23 15:07:42 +00:00
|
|
|
base-devel cmake ninja llvm vulkan-headers python python-markupsafe clang lld alsa-lib libpulse libxrandr freetype2
|
2021-06-12 15:26:52 +00:00
|
|
|
```
|
2021-08-05 19:14:40 +00:00
|
|
|
* Fedora packages
|
|
|
|
```
|
2022-11-23 15:07:42 +00:00
|
|
|
cmake vulkan-headers ninja-build clang-devel llvm-devel libpng-devel
|
2021-08-05 19:14:40 +00:00
|
|
|
```
|
2021-08-06 05:28:06 +00:00
|
|
|
* It's also important that you install the developer tools and libraries
|
2021-08-05 19:14:40 +00:00
|
|
|
```
|
|
|
|
sudo dnf groupinstall "Development Tools" "Development Libraries"
|
|
|
|
```
|
2016-03-13 07:13:47 +00:00
|
|
|
### Prep Directions
|
2016-03-05 04:48:14 +00:00
|
|
|
|
|
|
|
```sh
|
2021-04-06 22:58:11 +00:00
|
|
|
git clone --recursive https://github.com/AxioDL/metaforce.git
|
2021-06-12 15:26:52 +00:00
|
|
|
cd metaforce
|
2016-03-13 07:13:47 +00:00
|
|
|
```
|
|
|
|
|
2020-06-26 00:57:21 +00:00
|
|
|
### Update Directions
|
|
|
|
|
|
|
|
```sh
|
2021-04-06 22:58:11 +00:00
|
|
|
cd metaforce
|
2020-06-26 00:57:21 +00:00
|
|
|
git pull
|
|
|
|
git submodule update --recursive
|
|
|
|
```
|
|
|
|
|
2020-02-22 06:47:49 +00:00
|
|
|
### Build Directions
|
2016-03-13 07:13:47 +00:00
|
|
|
|
2020-06-26 00:57:21 +00:00
|
|
|
For Windows, it's recommended to use Visual Studio. See below.
|
|
|
|
|
|
|
|
#### ninja (Windows/macOS/Linux)
|
2016-03-13 07:13:47 +00:00
|
|
|
|
2021-06-12 01:19:33 +00:00
|
|
|
Builds using `RelWithDebInfo` by default.
|
|
|
|
|
2016-03-13 07:13:47 +00:00
|
|
|
```sh
|
2021-06-12 15:26:52 +00:00
|
|
|
cmake -B out -G Ninja # add extra options here
|
|
|
|
cmake --build out --target metaforce hecl visigen
|
2016-03-05 04:48:14 +00:00
|
|
|
```
|
|
|
|
|
2021-06-12 15:26:52 +00:00
|
|
|
#### CMake configure options
|
2021-06-12 01:19:33 +00:00
|
|
|
- Build in debug mode (slower runtime speed, better backtraces): `-DCMAKE_BUILD_TYPE=Debug`
|
2020-04-11 07:45:45 +00:00
|
|
|
- Use clang+lld (faster linking): `-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++`
|
2021-04-09 12:27:56 +00:00
|
|
|
- Optimize for current CPU (resulting binaries are not portable): `-DMETAFORCE_VECTOR_ISA=native`
|
2019-12-01 04:37:47 +00:00
|
|
|
|
2020-06-26 00:57:21 +00:00
|
|
|
#### CLion (Windows/macOS/Linux)
|
2016-03-27 06:41:02 +00:00
|
|
|
*(main development / debugging IDE)*
|
2016-03-13 07:13:47 +00:00
|
|
|
|
2020-02-22 06:47:49 +00:00
|
|
|
Open the repository's `CMakeLists.txt`.
|
|
|
|
|
2020-06-26 00:57:21 +00:00
|
|
|
Optionally configure CMake options via `File` > `Settings` > `Build, Execution, Deployment` > `CMake`.
|
2020-02-22 06:47:49 +00:00
|
|
|
|
2020-06-26 00:57:21 +00:00
|
|
|
#### Qt Creator (Windows/macOS/Linux)
|
2020-02-22 06:47:49 +00:00
|
|
|
|
2016-03-13 07:19:12 +00:00
|
|
|
Open the repository's `CMakeLists.txt` via File > Open File or Project.
|
2016-03-13 07:13:47 +00:00
|
|
|
|
|
|
|
Configure the desired CMake targets to build in the *Projects* area of the IDE.
|
|
|
|
|
2020-06-26 00:57:21 +00:00
|
|
|
#### Visual Studio (Windows)
|
2016-03-05 04:48:14 +00:00
|
|
|
|
2020-02-22 06:47:49 +00:00
|
|
|
Verify all required VS packages are installed from the above **Build Prerequisites** section.
|
|
|
|
|
2021-04-06 22:58:11 +00:00
|
|
|
Open the `metaforce` directory in Visual Studio (imports CMake configuration).
|
2016-03-05 05:11:00 +00:00
|
|
|
|
2020-06-26 00:57:21 +00:00
|
|
|
MSVC and clang-cl configurations should import automatically.
|
2016-03-05 05:11:00 +00:00
|
|
|
|
2020-06-26 00:57:21 +00:00
|
|
|
#### Xcode (macOS)
|
2016-03-05 05:11:00 +00:00
|
|
|
|
|
|
|
```sh
|
2021-04-06 22:58:11 +00:00
|
|
|
cmake -G Xcode ../metaforce
|
2016-03-05 05:11:00 +00:00
|
|
|
```
|
|
|
|
|
2021-04-06 22:58:11 +00:00
|
|
|
Then open `metaforce.xcodeproj`
|