Skip to main content

Progress Report - April 2023

· 7 min read

Bug fixing for Jak 2 continues and several people are working to improve their areas of interest.

Release Info

This month's OpenGOAL Tooling (jak-project repo) release is 0.1.35

danger

NOTE - You must be on the latest version of the launcher (2.0.10 or above) to be able to successfully launch version 0.1.35 or above.

General Changes

Fix Jak 1 Alpha Issues

This fixed some graphical regressions:

  • The sculptor's face shield lacking transparency
  • Final boss' red ring attack

Fix Debug Booting

If you used the Reboot in Debug imgui menu option on the last release, it may have required multiple attempts to work properly. This has been fixed.

Jak 1

Codebase Cleanup

One of the caveats of decompilation in our case is that method names are unfortunately lost during compilation, so we have to resort to using placeholder names for them until we can figure out their behavior and give them proper names. In the early days of Jak 1, we named our placeholder methods dummy-[method-id] or TODO-RENAME-[method-id]. In hindsight, this was not a good naming scheme for every single type in the game as it made it incredibly difficult to tell at a glance what type a method call belongs to.

For Jak 2, we rectified this by naming our placeholders after the type, i.e. type-method-[method-id], so we went ahead and did a full pass through the Jak 1 codebase to either give methods proper names where possible or to apply the same naming scheme, making it a lot easier to tell at a glance what type is being used.

A nice bonus of this cleanup work was that a lot of the decompiler improvements that we've added over time also got in, making a good portion of the codebase easier to read and understand.

Jak 2 Fixes

Bigmap

One of the last significant features that wasn't working was the map in the progress menu. While neither the map nor any icons in the progress menu will render, the underlying file that was decompiled has made the menu fully functional including the save and load screens.

Disappearing Guards

See the github description for a more comprehensive write-up. This was one of those annoying and intermittent bugs, and it would cause guards to flicker/disappear as you travelled throughout the city. This has hopefully been solved, but by the nature of these kind of bugs it's hard to know for sure this early on.

Permamently Disappearing Citizens

If a citizen was pushed into the border of the nav-mesh, they would permanently disappear.

Overkilling Enemies

For the longest time, it was possible to continue to hit enemies after they died. Turned out to be a decompilation mistake.

Some Text Fixes

Fixed some issues around the text handling for every language except Korean, fixing many text strings that were being rendered incorrectly.

Miscellaneous Renderer Fixes

Some various rendering issues were fixed, including the infamous green ring in the Lost Precursor City.

Generic and Warp Renderers

This resolved many feature gaps in Jak 2 graphics-wise. Generic was needed for a variety of things, while warp is used for distortions such as the warp-gates or the mirror in the Hip Hog.

This video showcases a small chunk of uses of this effect throughout the game:

Shadow Renderer

Still a work in progress, the shadow renderer is slowly starting to take shape, albeit with its fair share of bugs.

Version Diffs

Jak 2's various versions have been compared and initial support has been added to the tooling. Unlike with Jak 1, Jak 2's versions hardly have any practical difference between them with the only significant bug fix being related to the Defend Stadium mission.

The Japanese release does have a bunch of regional changes though, such as removing Jak's goatee and not allowing you to kill civilans in the city, although currently the game's region is hardcoded to NTSC-U.

Memory Card Support

Memory card support has been added for Jak 2, meaning you can now save and load your game.

Faster Elevators and Airlocks

Optional hacks have been added which make the airlocks and elevators move / open 50% faster.

Drawing of 3D HUD Elements

With the generic renderer being added, the orb and skull gem in the HUD can now be drawn properly. The skull gem requires texture animations which we have not started work on yet, which is why it looks rather static.

Fixes some crashes that also occurred on the PS3 release. These happen because when you have access to the city-krew-collection-introduction, city-port-run and city-save-lurkers missions, their mission borrow levels lsack, lportrun and lmeetbrt respectively will be loaded no matter where you are in the city. Starting a side mission will temporarily replace that borrow level with lbbush, which contains assets and code for side missions including the specific HUD types and graphics, which will be discarded/replaced when the mission is over. However, the side missions involving collecting pickups were being classified as over before their respective HUD elements could be despawned, meaning lbbush was being replaced by those other borrow levels, overwriting code for the still-active HUD process and causing the crashes.

TLDR - OpenGOAL and the PS3 releases are too fast!

Bad Bone Data Issues

This may not be fixed in the most optimal way yet, but there was an issue in Drill Platform where the excitement (which affects the music) would always be maxed. The root cause of this issue was also related to various cutscenes starting from way too far away which was also causing various softlocks and bugs which are now also fixed.

Overlord

The PlayStation 2's IOP (Input Output Processor), which was just the PS1's main processor, was cleverly reused on the console to handle most I/O operations.

"Overlord" was Naughty Dog's C library for the IOP and communicated with the Jak games via remote procedure calls in order to load and play audio files such as voice lines and cutscene audio, as well as animation data for cutscenes and other special animations streamed via DVD.

For the longest time, we have been missing the Jak 2 version of the driver which has been the cause of dozens of bugs, but thanks to Ziemas' and water111's hard work at reverse engineering Jak 2's Overlord, we finally have full cutscene audio and voice lines in OpenGOAL! This change alone resolved between 30-40 issues we've been tracking.

The minimap would be inappropriately stretched based on the aspect ratio. Also happened in the original game when aspect ratio was set to 16x9!

Other Changes

REPL Fixes

Two fixes involving the REPL were merged.

The first is that if you are using a non-NTSC-v1 version, you can now specify this via the repl-config.json file, instead of manually adding conditions to the underlying project definition.

The second is that using relative project-path overrides, typically via the --proj-path flag, should now function properly.

CLI shim has been removed from gk

gk must now be called with the new CLI format. This is not a concern for anyone other than launcher developers.

New defpart syntax

This still has some issues that need to be worked out, namely:

  • The compilation speed is slower in comparison, but trying to be improved.
  • Documentation for the new format needs to be written.

But this should hopefully lead to a better understanding of the particle definitions and make them easy to use in the future.

More efficient divisions

Some slight modifications to floating-point division were done to make them more efficient.