Portal64/README.md

210 lines
5.4 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
2022-11-29 00:28:49 -05:00
A demake of Portal for the Nintendo 64.
2022-04-07 23:41:58 -04:00
## Overview
2023-10-08 04:37:49 -04: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
- Much more!
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/@happycoder1989) for the latest updates.
![](./assets/images/readme_slideshow.gif)
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
```
2022-11-29 00:16:13 -05:00
Next, you will need to download Blender 3.0 or higher. Then set the environment variable `BLENDER_3_0` to be the absolute path where the Blender executable is located on your system.
2022-04-07 23:41:58 -04:00
```sh
2023-04-19 17:18:12 -04:00
sudo apt install blender
```
e.g. add this to your ~/.bashrc
```bash
2023-04-19 17:18:12 -04:00
export BLENDER_3_0="/usr/bin/blender"
```
<br />
2022-04-30 23:51:08 -04:00
2022-11-29 00:16:13 -05:00
You will need to install Python `vpk`.
```sh
2022-04-30 23:51:08 -04:00
pip install vpk
```
<br />
2023-03-04 00:10:50 -05:00
Install `vtf2png`, `sfz2n64`, and setup `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
sudo apt install vtf2png sfz2n64 mpg123 sox imagemagick unzip
2023-03-04 00:10:50 -05:00
```
<br />
2023-04-19 17:18:12 -04:00
Install lua5.4 (remove other perhaps installed versions first, skelatool64 needs to be build with luac 5.4!)
```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 />
You will need to add at least one of the following files from where Portal is installed to the folder `resource/`. You can add multiple languages if desired.
Dynamic Captions Building and Enhancements - python file added and invoked at make that produces a subtitles.c and subtitles.h synamically based on the closed captions files present inside of the resource/ folder - added an in-game slider to choose from the languages which were dynamically loaded at time of building. - if no closecaption files are present at the time of building, the script will still make the subtitles.c/.h but it just wont have any data. This will also result in the two menu items relating to closed captions being removed. - the names of subtitles in the .yaml files are the upercase versions of the names of subtitles in each subtitle file, so that they are easy to find. - fixed margins on sides of subtitles - fixed color of subtitles to be more visible - sped up the fade in and out animations. - automated new-line breaks. Issues I have seen: - if you load more than like 6 closed caption languages into the resource/ folder the game doesnt seem to want to start up once built. I think this is due to the sheer size of the subtitles.c file that is generated. I would love some feedback on how to make this work a little better/be more memory efficient, as it would be nice to have every closed caption language available on every build. - languages with very unique characters (chinese, japanese, korean, greek, etc.) do not work because the python codec that is used to decode/encode the files doesnt support them. for now that logic is in a try/except so it wont fail, it will simply skip a language that is not supported.
2023-10-09 22:09:22 -04:00
```
2023-10-11 05:02:38 -04:00
portal/resource/closecaption_english.txt
Dynamic Captions Building and Enhancements - python file added and invoked at make that produces a subtitles.c and subtitles.h synamically based on the closed captions files present inside of the resource/ folder - added an in-game slider to choose from the languages which were dynamically loaded at time of building. - if no closecaption files are present at the time of building, the script will still make the subtitles.c/.h but it just wont have any data. This will also result in the two menu items relating to closed captions being removed. - the names of subtitles in the .yaml files are the upercase versions of the names of subtitles in each subtitle file, so that they are easy to find. - fixed margins on sides of subtitles - fixed color of subtitles to be more visible - sped up the fade in and out animations. - automated new-line breaks. Issues I have seen: - if you load more than like 6 closed caption languages into the resource/ folder the game doesnt seem to want to start up once built. I think this is due to the sheer size of the subtitles.c file that is generated. I would love some feedback on how to make this work a little better/be more memory efficient, as it would be nice to have every closed caption language available on every build. - languages with very unique characters (chinese, japanese, korean, greek, etc.) do not work because the python codec that is used to decode/encode the files doesnt support them. for now that logic is in a try/except so it wont fail, it will simply skip a language that is not supported.
2023-10-09 22:09:22 -04:00
portal/resource/closecaption_<your desired language 1>.txt
portal/resource/closecaption_<your desired language 2>.txt
```
2023-04-19 17:18:12 -04:00
You then need to add the following files from where Portal is installed to the folder `vpk`. (see vpk/add_vpk_here.md for more details!)
```
2023-04-19 17:18:12 -04:00
portal/portal_pak_000.vpk
portal/portal_pak_001.vpk
portal/portal_pak_002.vpk
portal/portal_pak_003.vpk
portal/portal_pak_004.vpk
portal/portal_pak_005.vpk
portal/portal_pak_dir.vpk
hl2/hl2_sound_misc_000.vpk
hl2/hl2_sound_misc_001.vpk
hl2/hl2_sound_misc_002.vpk
hl2/hl2_sound_misc_dir.vpk
2023-10-08 06:22:32 -04:00
hl/hl2_misc_000.vpk
hl/hl2_misc_001.vpk
hl/hl2_misc_002.vpk
hl/hl2_misc_003.vpk
hl/hl2_misc_dir.vpk
2022-04-30 23:51:08 -04:00
```
2022-11-29 00:28:49 -05:00
Finally, run `make` to build the project.
```sh
# Clean out any previous build files
make clean
2023-10-07 16:31:51 -04:00
# Build (default english audio build)
make
# In case you have any trouble with ROM running on hardware try
# wine install required to run properly
sudo apt install wine
make fix
```
2023-10-08 07:05:24 -04:00
Alternatively, you can also build with different audio languages, like this:
2023-10-07 16:31:51 -04:00
```
make german_audio
2023-10-08 07:05:24 -04:00
make french_audio
make russian_audio
make spanish_audio
2023-10-07 16:31:51 -04:00
```
This requires additional *.vpk files:
- 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
2023-09-02 10:52:31 -04:00
Using the docker image the only setup step you need is to populating the vpk folder. After that you can build the docker image using
2022-11-29 00:16:13 -05:00
Build the Docker image.
```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
```sh
2023-05-16 14:48:36 -04:00
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
- [ ] polish up subtitles
- [ ] more sound settings
- [ ] add desk chairs and monitors
- [ ] rumble pak support
2023-07-11 10:18:03 -04:00
- [ ] pausing while glados is speaking can end her speech early
- [x] Add auto save checkpoints
- [x] Correct elevator timing
## Current New Sounds TODO List
- [ ] Box collision sounds
- [ ] 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.
- [ ] Passing into a ceiling portal can sometimes mess with the player rotation
- [ ] various visual glitches when running NTSC on PAL console #65
- [ ] various visual glitches when running PAL on NTSC console #65
- [x] player can clip through back of elevator by jumping and strafeing at the back corners while inside.