One year of progress.
This month's OpenGOAL Tooling (jak-project repo) release is
Support for Exporting Wind Models
The model extractor now exports models using the TIE wind effect, used for swaying background objects. This includes things like trees and the magma rocks in Fire Canyon.
Paths and Volumes in Entity Debugger
An option has been added to toggle displaying path and volume metadata for entities in the entity debugger. This information was previously hidden by default as it bloats the entity metadata list.
Dumping Entities to JSON, Speeding Up Custom Level Builds
The decompiler will now dump all of the entity metadata for every level in a JSON format similar to custom levels. This is very handy for checking out an actor's metadata without having to open the game and find the actor in the entity debugger.
Previously, the only way to see the expanded form of a macro was by getting a compiler error with the macro in it.
A Bunch of Massive Code Refactors
The main brunt of this month's work was in all of these refactors.
As we are pretty much done with the decompilation part of Jak 2 and Jak 3 may be on the horizon, this is the ideal time to go through the entire codebase to find any areas that could use some cleanup/improvement which all three games can benefit from, vastly reducing the amount of work in the future.
Among these PRs, one of the more important changes was the addition of an extra linting step in our CI that will check for any regression we may have made during a big refactor. This works by detecting the deletion of an
og:preserve-this comment in the diff, so we started adding these to any manually patched sections of code, sitting at ~680 usages so far.
Aside from this, the changes in these PRs include:
- Fixing some bad decomp in a few files.
- Vastly improving decompilation of event and state handlers.
- Better handling of usages of
- Detection for the following macros:
static-attack-infoin Jak 2
Fix Ancient Compiler Bug
Amidst all these refactors, an ancient minor compiler bug was unearthed!
This bug would cause compilation of conditions to output verbose code if the condition was a macro, due to not attempting macro expansion which was increasing code object file size and making the assembly less readable.
All of the UI and subtitles have been translated to Polish.
High Resolution Clouds Toggle
An alternative texture for the sky clouds has been added. The final cloud texture is generated by blending a series of randomly generated noise textures. Each noise texture is a different size which gets upscaled to the final texture size and has some weight applied to it. The different weights and sizes are used so that, for example, a small noise texture (16x16) with a large weight (e.g. 50%) determines where the majority of the clouds will be, as a single texel in an 8x8 texture will occupy a much larger space in the final texture size.
This alternative clouds texture is larger (512x512 vs. 128x128), has more noise steps (6 vs. 4) and different weight patterns. The final result is a higher resolution look (less noticeable "squares") with slightly less noticeable noise, and smaller minimum sizes for clouds.
SQL Editor Improvements
The SQL database for the in-game editor is now being seeded with the light and region data from each level.
VAG File Dumping
The decompiler now supports extraction of Jak 2's VAG files (streaming audio) into
Experimental Support for Higher Frame Rates
Unlike Jak 1, Jak 2 has much better support for variable frame rates out of the box as the game has a harder time reaching 60 FPS in certain areas. This meant that adding support for arbitrary frame rates beyond 60 was quite simple, so we added a menu option that allows you to select your frame rate from a bunch of common refresh rates.
This frame rate setting is experimental and while the game can be fully completed with it, there is a high chance you will encounter a few bugs that may impact your experience.
Also, if your computer is not powerful enough to consistently run at your target frame rate, you may experience lag that will cause slowdowns.
PC Specific Settings in Progress Menu
Many of the PC menu options from Jak 1 have been brought over into Jak 2's progress menu.
Exporting the Collision Mesh and Adding Collision Renderer
The decompiler will now export a level's collision meshes and the collision renderer that was written for Jak 1 has been brought over to Jak 2 to display them.
Speedrunner Mode has been added to Jak 2, along with a new popup menu for quickly resetting the game.
Implement Missing Kernel Functions
Some functions in Jak 2's C kernel were stubbed out that prevented the game from being able to load and link object files at runtime, these have now been properly implemented.
Controller LED Support
Controllers will now have their LEDs light up in a specific color in certain circumstances.
- Appropriate color when having a gun out
- Flickering depending on health
- Orange while you're playing as Daxter
- Yellow while in the Titan Suit
- Blue while on the JET-Board
- Purple when you're Dark Jak
- Flashing red while wanted
- Copying the colors of the platforms in the tomb Simon Says puzzles
Integrate Speedrun.com Leaderboards in High Score Menu
When the game is in Speedrunner Mode, the high score menu will have new entries for Jak 2's various speedrun categories that will pull data directly from Speedrun.com via their API.