A demake of Portal for the Nintendo 64
Go to file
2023-12-11 16:36:22 -05:00
.github/ISSUE_TEMPLATE Update bug_report.md 2023-11-24 19:11:32 -06:00
asm Use universal region in header 2023-12-11 16:36:22 -05:00
assets Show 01:59:50:00 on the clock in the main menu 2023-12-10 21:00:28 -07:00
documentation Document how to use the debugger with the evedrive 2023-03-23 22:44:35 -06:00
skelatool64 skelatool64: fix "pessimizing-move" warnings + clean build with main Makefile. Fix typo. 2023-12-11 19:19:50 +01:00
src Fix build when debugger is turned off 2023-12-11 07:45:51 -07:00
tools work on rsp profiler 2023-12-10 21:34:46 -07:00
vpk fix Makefile and update docs 2023-10-20 11:56:31 +02:00
.dockerignore Update docker image 2023-09-02 08:52:31 -06:00
.editorconfig Start work on font rendering 2023-04-20 08:32:40 -06:00
.gitignore Get profiler working 2023-12-10 20:19:01 -07:00
CONTRIBUTING.md Fixes CONTRIBUTING.md 2023-10-10 19:15:55 -05:00
Dockerfile fix path of vpk for language builds 2023-11-28 10:44:10 +01:00
LICENSE Adding a License 2023-04-02 13:58:26 -05:00
Makefile skelatool64: fix "pessimizing-move" warnings + clean build with main Makefile. Fix typo. 2023-12-11 19:19:50 +01:00
Makefile.docker add missing build options to Makefile.docker 2023-11-28 10:45:19 +01:00
portal.ld Build translations into separate files 2023-10-26 22:00:02 -06:00
README.md Update README.md 2023-12-03 14:54:05 -05:00

Portal64

A demake (remake for an older platform) of Portal for the Nintendo 64.

Latest current progress video on Youtube:

How I optimized Portal to run on the Nintendo 64

Overview

This project aims to reproduce Valve's original Portal, playable on the N64.

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
  • Multi-language subtitles and audio dialogue
  • Eye-Candy (Reflections, ...)
  • Much more!

This is a community driven project that welcomes any and all game testers and or Contributors.

Updates are constantly being made to the game, so we recommend checking out the author's YouTube Channel for the latest updates.

How to build

First, you will need to setup Modern SDK.

After installing modern sdk you will want to also install

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.

sudo snap install blender --channel=3.6lts/stable --classic

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)

export BLENDER_3_6="/snap/bin/blender"

You will need to install Python vpk:

sudo apt install pipx
pipx ensurepath
pipx install vpk

Clone the Portal64 repo or download the zip.

sudo apt install git
git clone https://github.com/lambertjamesd/portal64.git
cd portal64

Setup and install dependencies for skeletool64

echo "deb [trusted=yes] https://lambertjamesd.github.io/apt/ ./" \
    | sudo tee /etc/apt/sources.list.d/lambertjamesd.list
sudo apt update
sudo apt install vtf2png sfz2n64 mpg123 sox imagemagick unzip ffmpeg

Install lua5.4 (You may need to remove other installed versions first, skelatool64 needs to be built with luac 5.4!)

sudo apt install lua5.4 liblua5.4-dev liblua5.4-0

Setup and build skelatool64 (the version included in this portal64 repo!)

cd skelatool64
./setup_dependencies.sh
make

You will need to install nodejs. You can use apt for this

sudo apt install nodejs

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 for more details!). You can add multiple languages if desired.

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

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

Portal/hl2/media/valve.bik

Portal/hl2/resource/gameui_english.txt
Portal/hl2/resource/gameui_<your desired language 1>.txt
Portal/hl2/resource/gameui_<your desired language 2>.txt

Portal/hl2/resource/valve_english.txt
Portal/hl2/resource/valve_<your desired language 1>.txt
Portal/hl2/resource/valve_<your desired language 2>.txt

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

Finally, run make to build the project.

# Clean out any previous build files
make clean

# Build (default build with english audio)
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

Alternatively, you can also prepare to build with additional audio languages, like this (multiple commands per build possible):

make french_audio
make german_audio
make russian_audio
make spanish_audio

You still have run make after this.

Also you can build with all audio languages integrated with this shortcut:

make all_languages

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!):

  • German:
portal/portal_sound_vo_german_000.vpk
portal/portal_sound_vo_german_dir.vpk
  • 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

Build with Docker

Using the docker image the only setup step you need is to populating the vpk folder - you need to COPY all needed *.vpk files, a symlink does not work for Docker builds!

After that you can build the docker image using

Build the Docker image.

make -f Makefile.docker image

Then build the rom using

make -f Makefile.docker

You can also use the language options, e.g.:

make -f Makefile.docker spanish_audio
make -f Makefile.docker german_audio
make -f Makefile.docker

That will generate the rom at /build/portal64.z64


Current New Feature TODO List

  • check if display list is long enough
  • pausing while glados is speaking can end her speech early
  • test chamber 10 without jumping
  • check collider flags when filtering contacts
  • gun flicker between levels
  • fizzler player sound effect
  • clear z buffer instead of partitioning it
  • add translations to menus
  • jump animation
  • optimize static culling
  • figure out why portals sometimes are in front of window
  • portal hole cutting problems
  • crashed when dying in test chamber 05 when hit by pellet in mid air while touching a portal
  • rumble pak support
  • valve intro
  • polish up subtitles
  • more sound settings
  • add desk chairs and monitors
  • Add auto save checkpoints
  • Correct elevator timing

Current New Sounds TODO List

  • Box collision sounds
  • Ambient background loop
  • 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
  • player can clip through back of elevator by jumping and strafeing at the back corners while inside.