metaforce/README.md

144 lines
5.0 KiB
Markdown
Raw Normal View History

2021-04-06 15:58:11 -07:00
## Metaforce
#### Formerly known as URDE
2020-09-17 17:10:01 -07:00
**Status:** Metroid Prime 1 In-Game (all retail GC & Wii versions)
2019-08-22 18:42:47 -07:00
**Official Discord Channel:** https://discord.gg/AMBVFuf
2016-12-21 17:42:10 -08:00
![Metaforce screenshot](assets/metaforce-screen1.png)
2020-04-14 13:14:02 -07:00
2016-01-05 11:17:34 -08:00
### Download
2020-04-11 00:45:45 -07:00
Precompiled builds of the command-line extraction utility (`hecl`) with embedded dataspec libraries are available at https://releases.axiodl.com. This will give you intermediate dumps of original formats as *blender* and *yaml* representations.
2016-03-08 00:23:22 -08:00
Everything else is much too experimental to make portable/stable release builds (for now)
2016-01-05 11:17:34 -08:00
2015-09-12 14:47:31 -07:00
### Platform Support
2020-06-25 17:57:21 -07:00
* Windows 10 (64-bit, D3D11 / Vulkan)
* macOS 10.15+ (Metal)
* Linux (Vulkan)
2021-02-27 20:23:06 -08:00
* Follow [this guide](https://github.com/lutris/docs/blob/master/InstallingDrivers.md) to set up Vulkan & appropriate drivers for your distro.
2020-09-17 17:10:01 -07:00
### Usage (GC versions)
2020-04-11 00:45:45 -07:00
* Extract ISO: `hecl extract [path].iso -o mp1`
* `mp1` can be substituted with the directory name of your choice
2021-04-06 15:58:11 -07:00
* Repackage game for Metaforce: `cd mp1; hecl package`
2021-04-10 01:42:06 -07:00
* Run Metaforce: `metaforce mp1/out`
2020-09-17 17:10:01 -07:00
### Usage (Wii versions)
**IMPORTANT**: Trilogy main menu currently doesn't work, and requires the `--warp 1 0` command line arguments to get in-game.
2020-09-17 17:10:01 -07:00
NFS files dumped from Metroid Prime Trilogy on Wii U VC can be used directly without converting to ISO.
* Extract ISO or NFS: `hecl extract [path].[iso/nfs] -o mpt`
* `mpt` can be substituted with the directory name of your choice
2021-04-06 15:58:11 -07:00
* Repackage game for Metaforce: `cd mpt; hecl package MP1`
2020-09-17 17:10:01 -07:00
* The `MP1` parameter is important here.
* Run Metaforce: `metaforce mpt/out --warp 1 0`
2020-09-17 17:10:01 -07:00
2021-04-06 15:58:11 -07:00
#### Metaforce options (non-exhaustive)
* `-l`: Enable console logging
* `--warp [worldid] [areaid]`: Warp to a specific world/area. Example: `--warp 2 2`
* `+developer=1`: Enable developer console
2015-10-11 17:04:11 -07:00
### Build Prerequisites:
* [CMake 3.13+](https://cmake.org)
2020-05-24 09:03:33 -07:00
* Windows: Install `CMake Tools` in Visual Studio
* macOS: `brew install cmake`
2015-10-11 17:04:11 -07:00
* [Python 3+](https://python.org)
2020-05-24 09:03:33 -07: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 00:45:45 -07:00
* **[Windows]** [Visual Studio 2019 Community](https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx)
* Select `C++ Development` and verify the following packages are included:
* `Windows 10 SDK`
* `CMake Tools`
* `C++ Clang Compiler`
* `C++ Clang-cl`
2021-02-27 20:05:24 -08:00
* **[macOS]** [Xcode 11.5+](https://developer.apple.com/xcode/download/)
2017-11-13 19:36:36 -08:00
* **[Linux]** recent development packages of `udev`, `x11`, `xcb`, `xinput`, `glx`, `asound`
2021-02-27 20:05:24 -08:00
* Ubuntu 20.04+ packages
```
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-02-27 20:05:24 -08:00
libudev-dev libpng-dev libncurses5-dev cmake libx11-xcb-dev python3 python-is-python3 qt5-default
```
* Arch packages
```
base-devel cmake ninja llvm vulkan-headers python3 qt6 clang lld alsa-lib libpulse libxrandr
```
2016-03-04 20:48:14 -08:00
2016-03-12 23:13:47 -08:00
### Prep Directions
2016-03-04 20:48:14 -08:00
```sh
2021-04-06 15:58:11 -07:00
git clone --recursive https://github.com/AxioDL/metaforce.git
mkdir metaforce-build
cd metaforce-build
2016-03-12 23:13:47 -08:00
```
2020-06-25 17:57:21 -07:00
### Update Directions
```sh
2021-04-06 15:58:11 -07:00
cd metaforce
2020-06-25 17:57:21 -07:00
git pull
git submodule update --recursive
```
### Build Directions
2016-03-12 23:13:47 -08:00
2020-06-25 17:57:21 -07:00
For Windows, it's recommended to use Visual Studio. See below.
#### ninja (Windows/macOS/Linux)
2016-03-12 23:13:47 -08:00
```sh
2021-04-06 15:58:11 -07:00
cd metaforce-build
cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja ../metaforce
ninja
2016-03-04 20:48:14 -08:00
```
#### CMake options
- Build release optimized (better runtime performance): `-DCMAKE_BUILD_TYPE=Release`
2020-04-11 00:45:45 -07:00
- Use clang+lld (faster linking): `-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++`
- Optimize for current CPU (resulting binaries are not portable): `-DMETAFORCE_VECTOR_ISA=native`
2020-06-25 17:57:21 -07:00
#### CLion (Windows/macOS/Linux)
2016-03-26 23:41:02 -07:00
*(main development / debugging IDE)*
2016-03-12 23:13:47 -08:00
Open the repository's `CMakeLists.txt`.
2020-06-25 17:57:21 -07:00
Optionally configure CMake options via `File` > `Settings` > `Build, Execution, Deployment` > `CMake`.
2020-06-25 17:57:21 -07:00
#### Qt Creator (Windows/macOS/Linux)
2016-03-12 23:19:12 -08:00
Open the repository's `CMakeLists.txt` via File > Open File or Project.
2016-03-12 23:13:47 -08:00
Configure the desired CMake targets to build in the *Projects* area of the IDE.
2020-06-25 17:57:21 -07:00
#### Visual Studio (Windows)
2016-03-04 20:48:14 -08:00
Verify all required VS packages are installed from the above **Build Prerequisites** section.
2021-04-06 15:58:11 -07:00
Open the `metaforce` directory in Visual Studio (imports CMake configuration).
2016-03-04 21:11:00 -08:00
2020-06-25 17:57:21 -07:00
MSVC and clang-cl configurations should import automatically.
2016-03-04 21:11:00 -08:00
2020-06-25 17:57:21 -07:00
#### Xcode (macOS)
2016-03-04 21:11:00 -08:00
```sh
2021-04-06 15:58:11 -07:00
cmake -G Xcode ../metaforce
2016-03-04 21:11:00 -08:00
```
2021-04-06 15:58:11 -07:00
Then open `metaforce.xcodeproj`
#### Optional Debug Models
We provide custom debug models for use to visualize certain aspects of the game such as lighting, in order to use
these models you may download them from https://axiodl.com/files/debug_models.zip and extract to `MP1/URDE` in an
existing HECL project (assuming paths are relative), then run the the following command:
```sh
hecl package MP1/URDE
```
2021-04-06 15:58:11 -07:00
This will cook and package the debug models and will automatically enable rendering of lights in a debug build of Metaforce.