Portal64/README.md

296 lines
7.8 KiB
Markdown
Raw Normal View History

2022-03-05 16:49:34 -05:00
# Portal64
![](./assets/images/portal64_readme_logo.gif)
2022-02-27 18:41:51 -05:00
2023-10-18 12:50:12 -04:00
A demake *(remake for an older platform)* of Portal for the Nintendo 64.
![](./assets/images/readme_slideshow.gif)
Latest current progress video on Youtube:
2023-11-16 18:25:31 -05:00
[![How I optimized Portal to run on the Nintendo 64](https://img.youtube.com/vi/r4KGm7ixcqI/0.jpg)](https://www.youtube.com/watch?v=r4KGm7ixcqI)
2022-04-07 23:41:58 -04:00
## Overview
2023-11-16 17:36:04 -05:00
This project aims to reproduce Valve's original Portal, playable on the N64.
[Releases](https://github.com/lambertjamesd/portal64/releases) of this game are fully playable N64 ROM's that can either be played through an emulator or on a physical N64 game cartridge.
Please follow specific release instructions to get ROM running on your target hardware.
Because this demake has been in development for many years, it has made significant progress in both gameplay systems and fidelity including:
- Twelve+ test chambers completed
- Fully functioning portals, and gun
- Fully functioning physics engine
- Lighting system
- Main/pause menus
- Sound effects/dialogue
- Cutscenes
2023-10-18 12:57:19 -04:00
- Multi-language subtitles and audio dialogue
- Eye-Candy (Reflections, ...)
- Much more!
2023-10-18 12:50:12 -04:00
This is a community driven project that welcomes any and all game testers and or [Contributors](./CONTRIBUTING.md).
Updates are constantly being made to the game, so we recommend checking out the author's [YouTube Channel](https://www.youtube.com/@james.lambert) for the latest updates.
2022-04-07 23:41:58 -04:00
## How to build
2022-11-29 00:16:13 -05:00
First, you will need to setup [Modern SDK](https://crashoveride95.github.io/n64hbrew/modernsdk/startoff.html).
2022-04-07 23:41:58 -04:00
2023-03-04 00:10:50 -05:00
After installing modern sdk you will want to also install
```sh
2023-03-04 00:10:50 -05:00
sudo apt install libnustd
```
Next, you will need to install the latest version of Blender 3.6 LTS (please don't use e.g. 4.x, only 3.6.x will work correctly). Then set the environment variable `BLENDER_3_6` to be the absolute path where the Blender 3.6 executable is located on your system.
2022-04-07 23:41:58 -04:00
```sh
sudo snap install blender --channel=3.6lts/stable --classic
2023-04-19 17:18:12 -04:00
```
e.g. add this to your ~/.bashrc if you used snap (or you can use `which blender` to find the path of Blender 3.6)
2023-04-19 17:18:12 -04:00
```bash
export BLENDER_3_6="/snap/bin/blender"
2023-04-19 17:18:12 -04:00
```
<br />
2022-04-30 23:51:08 -04:00
You will need to install Python `vpk`:
```sh
sudo apt install pipx
pipx ensurepath
pipx install vpk
```
<br />
Clone the Portal64 repo or download the zip.
```sh
sudo apt install git
git clone https://github.com/lambertjamesd/portal64.git
cd portal64
```
2023-10-20 05:56:31 -04:00
Setup and install dependencies for `skeletool64`
```sh
echo "deb [trusted=yes] https://lambertjamesd.github.io/apt/ ./" \
2023-03-04 00:10:50 -05:00
| sudo tee /etc/apt/sources.list.d/lambertjamesd.list
sudo apt update
2023-10-20 00:52:58 -04:00
sudo apt install vtf2png sfz2n64 mpg123 sox imagemagick unzip ffmpeg
2023-03-04 00:10:50 -05:00
```
<br />
Install lua5.4 (You may need to remove other installed versions first, skelatool64 needs to be built with luac 5.4!)
2023-04-19 17:18:12 -04:00
```sh
2023-04-19 17:18:12 -04:00
sudo apt install lua5.4 liblua5.4-dev liblua5.4-0
```
<br />
Setup and build skelatool64 (the version included in this portal64 repo!)
```sh
2023-03-04 00:10:50 -05:00
cd skelatool64
./setup_dependencies.sh
make
```
2022-04-30 23:51:08 -04:00
<br />
2022-04-30 23:51:08 -04:00
2023-03-04 00:10:50 -05:00
You will need to install nodejs. You can use apt for this
```sh
2023-03-04 00:10:50 -05:00
sudo apt install nodejs
```
<br />
2023-11-04 06:00:27 -04:00
You then need to add the following files from where Portal is installed to the folder `vpk/` OR create a symbolic link to the `Portal` folder there (see [vpk/add_vpk_here.md](./vpk/add_vpk_here.md) for more details!).
You can add multiple languages if desired.
2023-10-20 05:56:31 -04:00
```
2023-10-20 05:56:31 -04:00
Portal/portal/portal_pak_000.vpk
Portal/portal/portal_pak_001.vpk
Portal/portal/portal_pak_002.vpk
Portal/portal/portal_pak_003.vpk
Portal/portal/portal_pak_004.vpk
Portal/portal/portal_pak_005.vpk
Portal/portal/portal_pak_dir.vpk
Portal/hl2/hl2_sound_misc_000.vpk
Portal/hl2/hl2_sound_misc_001.vpk
Portal/hl2/hl2_sound_misc_002.vpk
Portal/hl2/hl2_sound_misc_dir.vpk
2023-04-19 17:18:12 -04:00
2023-10-20 05:56:31 -04:00
Portal/hl2/hl2_misc_000.vpk
Portal/hl2/hl2_misc_001.vpk
Portal/hl2/hl2_misc_002.vpk
Portal/hl2/hl2_misc_003.vpk
Portal/hl2/hl2_misc_dir.vpk
2023-10-08 06:22:32 -04:00
2023-10-20 05:56:31 -04:00
Portal/hl2/media/valve.bik
2023-11-04 06:00:27 -04:00
Portal/hl2/resource/gameui_english.txt
Portal/hl2/resource/gameui_<your desired language 1>.txt
Portal/hl2/resource/gameui_<your desired language 2>.txt
2023-11-10 04:44:17 -05:00
Portal/hl2/resource/valve_english.txt
Portal/hl2/resource/valve_<your desired language 1>.txt
Portal/hl2/resource/valve_<your desired language 2>.txt
2023-11-04 06:00:27 -04:00
Portal/portal/resource/closecaption_english.txt
Portal/portal/resource/closecaption_<your desired language 1>.txt
Portal/portal/resource/closecaption_<your desired language 2>.txt
Portal/portal/resource/portal_english.txt
Portal/portal/resource/portal_<your desired language 1>.txt
Portal/portal/resource/portal_<your desired language 2>.txt
2022-04-30 23:51:08 -04:00
```
2022-11-29 00:28:49 -05:00
Finally, run `make` to build the project.
2023-10-20 05:56:31 -04:00
```sh
# Clean out any previous build files
make clean
2023-10-15 08:16:40 -04:00
# Build (default build with english audio)
make
# In case you have any trouble with the ROM running on hardware try padding the ROM.
make fix-nowine
# You can also try the old way of paddinng the ROM
# wine install required to run properly, you don't need both.
sudo apt install wine
make fix
```
2023-10-15 08:16:40 -04:00
Alternatively, you can also prepare to build with additional audio languages, like this (multiple commands per build possible):
2023-10-20 05:56:31 -04:00
2023-10-07 16:31:51 -04:00
```
2023-10-08 07:05:24 -04:00
make french_audio
2023-10-15 08:16:40 -04:00
make german_audio
2023-10-08 07:05:24 -04:00
make russian_audio
make spanish_audio
2023-10-07 16:31:51 -04:00
```
2023-10-15 08:16:40 -04:00
You still have run `make` after this.
Also you can build with all audio languages integrated with this shortcut:
2023-10-20 05:56:31 -04:00
2023-10-15 08:16:40 -04:00
```
make all_languages
```
2023-10-07 16:31:51 -04:00
This requires additional *.vpk files copied to the root of folder `vpk/` (since the original Portal keeps only one language at the same time, you have to copy these files!):
2023-10-07 16:31:51 -04:00
- German:
```
portal/portal_sound_vo_german_000.vpk
portal/portal_sound_vo_german_dir.vpk
```
2023-10-08 07:05:24 -04:00
- French:
```
portal/portal_sound_vo_french_000.vpk
portal/portal_sound_vo_french_dir.vpk
```
- Russian:
```
portal/portal_sound_vo_russian_000.vpk
portal/portal_sound_vo_russian_dir.vpk
```
- Spanish:
```
portal/portal_sound_vo_spanish_000.vpk
portal/portal_sound_vo_spanish_dir.vpk
```
2023-10-07 16:31:51 -04:00
<br/>
## Build with Docker
Clone the Portal64 repo or download the zip.
```sh
sudo apt install git
git clone https://github.com/lambertjamesd/portal64.git
cd portal64
```
You need to populate the vpk folder - you need to COPY all needed *.vpk files, a symlink does not work for Docker builds!
2023-11-20 06:08:36 -05:00
After that you can build the docker image using
2022-11-29 00:16:13 -05:00
Build the Docker image.
2023-10-20 05:56:31 -04:00
```sh
2023-09-02 10:52:31 -04:00
make -f Makefile.docker image
```
<br />
2023-09-02 10:52:31 -04:00
Then build the rom using
2023-10-20 05:56:31 -04:00
```sh
2023-05-16 14:48:36 -04:00
make -f Makefile.docker
```
You can also use the language options, e.g.:
```sh
make -f Makefile.docker spanish_audio
make -f Makefile.docker german_audio
make -f Makefile.docker
```
2023-09-02 10:52:31 -04:00
That will generate the rom at `/build/portal64.z64`
<br />
## Current New Feature TODO List
2023-11-02 21:03:51 -04:00
- [ ] check if display list is long enough
2023-07-11 10:18:03 -04:00
- [ ] pausing while glados is speaking can end her speech early
2023-12-01 22:55:00 -05:00
- [x] test chamber 10 without jumping
- [x] check collider flags when filtering contacts
2023-11-28 22:50:23 -05:00
- [x] gun flicker between levels
- [x] fizzler player sound effect
- [x] clear z buffer instead of partitioning it
- [X] add translations to menus
2023-11-02 20:13:55 -04:00
- [x] jump animation
- [x] optimize static culling
2023-11-02 20:22:41 -04:00
- [x] figure out why portals sometimes are in front of window
- [x] portal hole cutting problems
- [x] crashed when dying in test chamber 05 when hit by pellet in mid air while touching a portal
- [x] rumble pak support
- [x] valve intro
- [x] polish up subtitles
- [x] more sound settings
- [x] add desk chairs and monitors
- [x] Add auto save checkpoints
- [x] Correct elevator timing
## Current New Sounds TODO List
- [ ] Box collision sounds
2023-10-25 15:20:57 -04:00
- [x] Ambient background loop
- [x] Unstationary scaffolding moving sound
## Current Bug TODO List (Hardware Verified) (High->Low priority)
----------------------- v8
- [ ] Two wall portals next to eachother can be used to clip any object out of any level by pushing it into corner, then dropping.
2023-12-01 23:21:09 -05:00
- [x] Passing into a ceiling portal can sometimes mess with the player rotation
- [x] player can clip through back of elevator by jumping and strafeing at the back corners while inside.