Commit Graph

1450 Commits

Author SHA1 Message Date
Tyler Wilding bae18cdd2f gsrc: init folder structure 2026-04-25 22:53:17 -04:00
Tyler Wilding b7b37b6e52 d/jx: generate .gd files 2026-04-22 22:53:47 -04:00
Matt Dallmeyer a63cb1d212 [jak2/jak3] Fix off by one bug in trick display (#4224)
fixes #3150 

the scoring system counts up to 16 (point-scoring) tricks, but the
opengoal-secret display system was ignoring the 16th one, causing score
discrepancies
2026-04-19 00:47:36 +02:00
water111 637990314b wip: better stack var support (#4222)
Closes #736

---------

Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2026-04-19 00:14:44 +02:00
Matt Dallmeyer 3e3542cb10 [jak3] Prevent NaN-induced infinite loop in ff-squad-control bubble sort (#4225)
This bit of ff-squad-control code is trying to sort guards based on
their distance from some shared target. In some cases the
`vector-vector-distance` returns NaN. In the bubble sort below this
change, the < operation always returns #t when NaN is involved, so the
NaN guard gets swapped back and forth endlessly, causing an infinite
loop.
2026-04-16 13:52:51 +01:00
Matt Dallmeyer 2f51e355dd [jak3] Implement trick display text secret (#4208)
ported the implementation from jak 2 into jak3 pretty much exactly.
added a new color for L2 tricks, and shrunk the text/width a bit so it
wouldn't end up covered by the minimap.

also fixed small bug in jak 2 (and 3) where dismounting jetboard
wouldn't reset the trick display, so displayed score wouldn't match the
granted score

---------

Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2026-04-14 01:40:27 -04:00
Hat Kid 7145890eee jak3: high fps fix for mech carry drop (#4223)
Closes #4205
2026-04-14 01:26:44 -04:00
Matt Dallmeyer 480fdaa282 [jak3] Fix some things relating to resetting speedruns (#4216)
addresses:
- starting new game from title screen with speedrun mode on -> shows
intro cutscene, doesn't start autosplitter, verification text not shown
- resetting run during intro cutscene leaves weird desert state across
training course (not an issue if we fix^)
- reset in hero mode after completing training course -> verification
text not shown
- resetting during tentacle grab leaves the water bubble sound playing
forever
2026-04-14 00:52:22 -04:00
Matt Dallmeyer d961e793ee [jak3] Make surround sound not the default (#4217) 2026-04-13 19:27:21 -04:00
Grateful Forest a18d74c6fd jak3: map fixes for pc port (#4199)
Three fixes for fullscreen map screens:

**1. Expand scanlines to cover whole screen**
Instead of just the 4:3 square, scales dynamically without overshooting.

**2. Fix map icon stretching**
On a real PS2, map icons squash incorrectly at 16:9, gets worse with
custom aspects. Fixed but preserves original game bug at PS2 16:9.

**3. Stop fast map scrolling at high FPS**
Same map scroll speed regardless of framerate.

Fixes #4195
2026-04-12 19:45:05 -04:00
Alex fedd27ebfd Adjust projectile focus fix to also work on semi-solid targets + fix tracking issues with dm-tentacles (#4207)
Fixes #4177 

Also additionally fixes the setting not doing anything to the
terraformer tentacles. Tentacles are no longer considered 'solid' when
dead while the setting is on.
2026-04-12 00:57:55 +01:00
Matt Dallmeyer c31662ef89 [jak3] Fix secrets option on title screen (#4194)
Fixes 2 things:
- secrets option on title screen not hidden if no secrets unlocked
(missing check, we just always drew it)
- off-by-one bug in the "skip over secrets option" logic


https://github.com/user-attachments/assets/0f94f310-ca23-4ba8-91d5-7c2c10793c33

This approach mirrors what we did in Jak 2, but feels a bit hacky... I
have another branch
[here](https://github.com/open-goal/jak-project/compare/master...dallmeyer:jak-project:b/title-secrets?expand=1)
which takes the ND approach of just switching between 2 static menus
like:
```lisp
     (if (memcard-unlocked-secrets? #f #f)
      (set! (-> this current-options) *title-secrets-pc*)
      (set! (-> this current-options) *title-pc*))
```
2026-04-09 20:14:43 -04:00
Hat Kid cfe3ec9229 decomp3: cam-debug, hover-nav-edit, pilot-recorder (#4203)
Should be the last remaining files aside from `anim-tester` which we
already have a better replacement for.
2026-04-09 06:27:00 +02:00
Matt Dallmeyer d2e9e6ea45 [jak2/jak3] Check target state != target-continue, instead of = target-stance, for speedrun post-init things (#4193)
Without this change, in hero mode speedruns you aren't given jetboard,
guns, etc if you are immediately moving when the game starts

(left side has these changes, right side does not)


https://github.com/user-attachments/assets/d581ca13-3734-4389-9986-0f815c76e906
2026-04-08 18:36:22 +02:00
Hat Kid 3f686854e6 decomp3: vivsol-edit, editable and nav mesh editor files (#4200)
- `visvol-edit`
- `editable`
- `editable-player`
- `mysql-nav-graph`
- `nav-graph-editor`
- `nav-mesh-editor-h`
- `nav-mesh-editor`

The SQL data is not filled in yet.
2026-04-08 17:42:13 +02:00
Tyler Wilding bd5bfe837b jak3: remove -debug from critical load-game logging function (#4187)
Closes #4183

Jak 2 didn't have this logging call so its fine, but jak 3 added this
which is a nice idea. TLDR - there's some settings we stopped loading
from the memcard as the source of truth, this function (`load-game...`)
skips said portions of the save file and in jak 3, includes a helpful
log message.

It constructed that log message by calling a `defun-debug` function,
which means that in retail mode, that function is gone, instead of that
being a straight forward crash, it returns garbage, which is passed to
`format`, which causes the crash. Fix is simple, make it a non-debug
function so it's always available.

Feels like something that could be improved about `goalc` but,
be-careful with debug only functions is the take away.

This would seem to impact any save file that wrote these related tags
(and thus, triggered the logging code) but it might also be semi-random
with how unlucky you get with the returned garbage addr
2026-04-06 01:10:49 -04:00
Matt Dallmeyer 147765fa23 [jak3] Update progress code to use DPROCESS_STACK_SIZE (#4186)
Mirroring [changes from
jak2](https://github.com/open-goal/jak-project/commit/ba12d804f7a6bed6e3c3dd7b6928bce5c02edb86#diff-a2dfc3363ae440ca32fdf57325fdbcd942fc0155877df70f12c447b9924d54a4),
this was actually causing crashes when opening Mission menu in modbase
2026-04-06 03:04:07 +02:00
Tyler Wilding c012005084 jak3: add unlock debug menu options (#4184)
Same as https://github.com/open-goal/jak-project/pull/3539
2026-04-05 18:18:17 -04:00
Tyler Wilding 1f1fdf834b jak3: support mirror mode (#4170)
Similar changes as have been done in the previous two games. Test the
following things:
- normal gameplay
- defend spargus turret
- satellite
- that desert mission where you shoot the gun
- that turret mission in haven forest

At a glance, i think that's everything...?

~~Didn't debug the crash yet either, hoping this is sufficient~~ (fixed,
thanks hatkid, needed to disable some blit related code)

Closes #4160
2026-04-05 17:52:15 -04:00
Hat Kid dc203502fc jak3: fix potential wascity-defend softlock, stick sens setting, fix freeze-screen regression (#4182)
There was some bad manual decomp in `wasdef-manager` that caused the
mission to sometimes softlock, preventing Jak from exiting the turret
after destroying all Makers.

Also adds stick sensitivity setting from Jak 2 and fixes a regression
with the Light Jak freeze screen overlay on PC aspect ratios.

Closes #4179 
Closes #4154
2026-04-05 16:58:19 +02:00
Tyler Wilding c3cc91c9ba jak2/3: update enemy method name related to playing sound effects (#4176)
Was investigating https://github.com/open-goal/jak-project/issues/3012
and found out it's no longer an issue, fixed at some point.

Updated the method name, it actually looks like quite a few methods were
nicely named / documented in jak 3, so i might automate backporting that
documentation (likely a bunch that can go all the way back to jak 1 as
well).

Closes #3012
2026-04-05 01:14:14 -04:00
Hat Kid c2dd821bd3 jak3: add sidekick feature to hero mode for runs (#4173) 2026-04-04 15:28:35 +02:00
Matt Dallmeyer 8aa9fb0afd Fix language settings not saving in jak 2/3, fix autosave from title screen new game in jak 3 (#4172)
fixes #4167 and #4164
2026-04-04 08:33:53 +02:00
Matt Dallmeyer fe8a664f52 [jak3] Support PC camera invert options (#4171)
Implement PC camera inversion toggles, for first/third
vertical/horizontal controls

Reuses vanilla placement of Camera Options menu (as opposed to under
Input Options like jak1/2)

fixes #4158
2026-04-04 08:26:36 +02:00
rocket 64baff9614 jak2/jak3: fix overlapping layers on non-playable Hellcats (#4161)
fix for issue #4120, along with other areas this happens in Jak II and
Jak 3

**Before**
<img width="2560" height="1440" alt="desoasis-hellcat"
src="https://github.com/user-attachments/assets/c77db831-c9c7-493d-a426-de12248312d4"
/>
**After**
<img width="2560" height="1440" alt="desoasis-hellcat-fixed"
src="https://github.com/user-attachments/assets/f75c57ec-dc76-43bb-b743-7fe659d36a15"
/>

**Before**
<img width="2560" height="1440" alt="ctywide-scenes-atoll-hellcat"
src="https://github.com/user-attachments/assets/73162526-9676-4937-96e8-78636248fbdc"
/>
**After**
<img width="2560" height="1440" alt="ctywide-scenes-atoll-hellcat-fixed"
src="https://github.com/user-attachments/assets/0f5b1e85-dd45-4933-98c1-589bc41aeafb"
/>

---------

Co-authored-by: Matt Dallmeyer <mattdallmeyer@gmail.com>
2026-04-03 20:41:47 +02:00
Matt Dallmeyer 259b74d7cc [jak3] Scale sandstorm push effect to better match PS2 (#4163)
Took @ManDude 's suggestion to make the sandstorm's push effect on Jak
slightly less aggressive, to better match the effect on PS2 where it
never hits 60fps. This was especially noticeable in finalboss. Tested at
higher FPS as well
2026-04-03 15:47:39 +02:00
Hat Kid 6de4b0e62c jak3: misc rpc and progress fixes (#4159)
- Fixed font scaling for main menu options and auto save info box
- Removed surround sound option (we probably won't be implementing this
any time soon)

Discord RPC fixes/additions:
- Now shows what gun you currently have out
- Fixed outdoor levels not showing their icons
- Added icons for vehicles and various other states
- Fixed glider mission not displaying
2026-04-03 03:27:53 +02:00
Matt Dallmeyer be18834432 [jak3] Port over R1/R2 swap and trigger effects from jak2 (#4151)
Exact same changes as jak 2, except I have the left trigger effect moved
from `target-darkjak-get-on` to `target-powerjak-get-on` (the crouching
state before he goes to dark or light jak)
2026-04-03 03:20:51 +02:00
Matt Dallmeyer c37304c2dd [jak3] Fix arena token not respawning bug (#4150)
a bit of a hack but I'm not sure what else to do besides completely
unload/reload wasstadb-obs. open to suggestions

here is the bug
https://youtu.be/C1KZlRFbjys?t=50
2026-04-03 03:15:32 +02:00
Tyler Wilding c4d34e3d0e jak3: Finish font DB implementation (support Cyrillic) (#4147)
Also add in all the other language stubs / copy over the custom text to
the correct enum ids.

Closes #4001
2026-04-02 01:10:39 -04:00
Hat Kid 0e0da376c3 jak3: remove old pal graphics menu and enable fps setting in retail (#4149) 2026-04-02 02:17:45 +02:00
Matt Dallmeyer 07a1fcacae [jak3] Give skull gems for heromode speedruns (#4148) 2026-04-02 02:02:13 +02:00
Grateful Forest 27627012dc jak1: fix memcard screen on custom aspects (#4116)
The particles for the grey memcard slots already had functions
associated with them, so scaling the grey boxes was simply a matter of
making use of those functions.

The memcard boxes expand and shrink with the aspect to resemble the PS2
behavior, where at 4:3 you get a short grey box and at 16:9 you get a
long grey box.

Although I added scaling to the grey boxes, I wasn't satisfied with the
way elements would "slip" as they would scale differently to each other.
Mainly, the collectable counts and their totals slide more and more off
from each other.

This is due to the game's use of integer offsets to decided UI
placements; they were the right numbers for 4:3, but once you start to
scale, they can slide more and more off. You can see this on a real PS2,
where at 4:3, the collectibles are centered above the totals, and at
16:9, the collectibles are more right-aligned above the totals.

To fix this, I used the same text flags on the totals as the counts, so
everything is snapped to each other.
Guards against `(-> *pc-settings* use-vis?)` ensure PS2 aspects remain
untouched, and at PS2 16:9, you still get the original game bug of more
right aligned counts.


https://github.com/user-attachments/assets/0fa00a5d-0090-4cd0-b68b-8b8f28816185
2026-03-27 19:52:40 -04:00
Matt Dallmeyer cd8252d227 [jak1] MP ILs - dont spawn the column that klaww breaks during cutscene (#4131)
Small thing I only noticed from the Gordon & Daxter mod since you skip
klaww and go through where this column spawns.

<img width="1920" height="1080" alt="image"
src="https://github.com/user-attachments/assets/2ea74b77-47db-4783-8917-d0b616dd1820"
/>
2026-03-17 22:07:56 -04:00
Matt Dallmeyer 3c985f8c3a [jak2/jak3] Unbreak split boxes debug option (#4133)
The `Split Boxes` option in jak2/3 currently crashes as soon as you
select it because of the `*debug-region-hide-empty*` code added in
openGOAL. The split boxes aren't true regions, but they reuse the
`debug-draw-region` functions, and crash trying to access `(-> this
region on-enter)`.

<img width="2160" height="1620" alt="image"
src="https://github.com/user-attachments/assets/e8753fcc-8234-40fa-9278-d2dca4dff71a"
/>
yay split boxes
2026-03-17 22:07:15 -04:00
Matt Dallmeyer a2b7fb3c15 [jak1] Restore Klaww cutscene skip for Mountain Pass IL speedruns (#4124)
Originally added in [this
PR](https://github.com/open-goal/jak-project/pull/2162/changes#diff-fcd36d04955bffd72ece8b8bf9b7a137d7b58f712660536bb6889b7850e07bea)
but I forgot to use `og:preserve-this` so it got wiped out in [a later
PR](https://github.com/open-goal/jak-project/commit/da3caf7b2850c37eb7801221461bb8ff918fa101#diff-fcd36d04955bffd72ece8b8bf9b7a137d7b58f712660536bb6889b7850e07beaL1154).

Updated a couple spots to use `og:preserve-this`.
2026-03-02 18:33:08 -05:00
Matt Dallmeyer ad3e55745a [jak2/jak3] Wait to reset autosplitter until after blackout (#4126)
Based on [similar changes we made awhile back for
jak1](https://github.com/open-goal/jak-project/pull/3902) - this way
runners don't need to figure out the -0.3s offset or whatever, and it
won't vary based on where they reset from.
2026-02-28 21:07:12 -05:00
Tyler Wilding d3cc739e43 jakx: Commit existing work from other PRs (#4112)
This attempts to get into master whatever work was done in this PR /
it's earlier PR https://github.com/open-goal/jak-project/pull/3965

I don't want this work to be lost / floating around in massive PRs.

However the changes are:
- switch to ntsc_v1 instead of PAL as the development target, as we have
done for all other games
- remove most of the copied-from-jak2/3 changes as they need to be
confirmed during the decompilation process not just assumed
- avoids committing any changes to `game/kernel/common` as it was not
clear to me if these were changes made in jak x's kernel that were not
properly broken out into it's own functions. We don't want to
accidentally introduce bugs into jak1-3's kernel code.
- in other words, if the change in the kernel only happens in jak x...it
should likely be specific to jak x's kernel, not common.

---------

Co-authored-by: VodBox <dillon@vodbox.io>
Co-authored-by: yodah <greenboyyodah@gmail.com>
2025-12-31 21:08:44 -05:00
Matt Dallmeyer a5ac2b0fcc Prevent array OOB access for traffic-height-map (#4106)
If the `arg0` vector has extreme values, `a2-0` and `a1-1` can end up
being negative, which leads to out-of-bounds access when using these
values to read from the `xz-height-map`'s `data` array, and crashes the
game (you can pretty easily reproduce this in jak 3 by overcharging the
"superfasthoverbikeglitch")

The `min` here already makes sure these values don't go too high, but
doesn't cover the case when they go negative.

As I understand it, this `data` in the `*traffic-height-map*` functions
as a 2d array, bucketing x/z coordinates into heights for the vehicle.
2025-12-28 16:26:00 -05:00
Grateful Forest 739a2ffeb6 jak1: fix balance-plats at high-fps (#4069)
Looking at the balance-plats, they showed an immediate visual clue,
which was the stuttering of Jak's feet on their surface.

This is precisely what happens when you don't include sticky on a
collision; it doesn't "pull" Jak along with it, and he repetitively
"falls" onto it's surface over and over as it moves downwards.

This is a mystery, since this actor does have sticky, in fact, it's not
even possible to detect riders without sticky, which these certainly do.
This same appears on PS2, so I knew fixing it was not an option.

I had an immediate theory of what was happening: since Jak is
continuously falling onto it as it moves downwards, he's only riding
some frames, and skipping others. A higher frame rate = more moments
he's touching.

This means that basically, the balance-plat's entire speed is determined
by when his feet happen to micro-stutter. This is the hardcoded scalar
for it's entire speed.

This means I needed to emulate the 60 FPS "falling" at different
framerates. I tried adding an fps counter to the actor so that the rider
check only ran once every 60th of a second, but I knew adding a variable
to the actor just for fps wasn't a good idea.

However, I was able to confirm that would work. Luckily, this
[comment](https://github.com/open-goal/jak-project/blob/0fa93ce7b83d1621f3fd040625bfa865eadaeef0/goal_src/jak1/engine/game/game-h.gc#L116)
gave me an idea, which meant I could use a variable of process drawable,
avoiding adding a variable.

This unique problem needs a unique solution, I gate rider checks so they
only pass if one sixtieth of a second `(seconds 0.01666666)` has passed
since the last ride. This makes it act like his feet are stuttering like
they do at 60 FPS, avoiding the extra frames where his feet are touching
at high framerates that add more speed.

I also added the same for the send-to messages, since at high frame
rates the passive return to center that runs every frame was stomping
the send-to-next velocities which run less often.

Then, I managed to refactor it down to a tiny edit, a guard in one place
that gates on 1/60th of a second, framerate already 60, or, self grow
(since you don't want to double-gate these).

```lisp
(when (or (= (-> *pc-settings* target-fps) 60)
          (time-elapsed? (-> self state-time) (seconds 0.01666666))
          (-> self got-grow))
```

It's just: this guard, `(set-state-time)` on ride, and
`(set-state-time)` on grow (limits increased-rate return to center
stomping grow).

Lastly, there was an issue with the existing multiplies by FPS RATIO,
which was a clear double scale of the acceleration (once when setting
accelerate, then again when adding the accelerate). I'm guessing since
the extra riding frames added so much speed, this double scalar helped
slow it down, however when corrected the double scalar made it too slow
since it was slowing down for framerate twice.
2025-12-28 15:43:34 -05:00
Aloqas f4512a41dd Jak 3 Finnish translation + Update Jak 1 & 2 translations (#4028)
Massive overhaul of Finnish translations

I guess it's time to finally push this out

I'll go insane if I have to proofread one more time :P
Every time I just realize my translations sucked and I keep tweaking
everything

---------

Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2025-12-28 15:12:26 -05:00
Grateful Forest 9560b08464 jak1: fix aspect settings selection (#4101)
I was changing aspect ratios when I noticed something was off, getting
different results for the same setting.
On screen positions are determined by both the aspect ratio you select
as well as the last time you selected a PS2 aspect ratio.
You get different result by choosing 4x3 (PS2), then 16:9, compared to
16:9 (PS2), then 16:9. The same is true for all aspects and Fit to
Screen.

By contrast, Jak 2 always uses the 'aspect4x3 scale factor for all
custom aspects, making the menu option you select consistent.

There is an intention to use 4x3 for custom aspects
[here](https://github.com/open-goal/jak-project/blob/abf27960f0033436b066c712c787160d2c9a5346/goal_src/jak1/pc/progress-pc.gc#L2618);
when `fit-to-screen` then `(set-aspect-ratio 'aspect4x3)`. However it
needs the extra lines to take effect.

This is helpful as the only cause of vertical misalignment on memory
cards is using PS2 16x9 on custom aspects:
<img width="1800" height="1013" alt="2"
src="https://github.com/user-attachments/assets/5a5e5ea9-00fc-439b-b3d6-dcf3419a8bd1"
/>
<img width="1800" height="1013" alt="4"
src="https://github.com/user-attachments/assets/4876d267-5a44-4074-bd63-d7a5d8ac02e5"
/>
2025-12-28 01:20:06 -05:00
Grateful Forest 27fe8d211c jak1: fix high fps menu sliders (#4105)
Menu sliders are very slippery at high FPS and make it touchy and
difficult to select precisely:


https://github.com/user-attachments/assets/3c9b9ae5-0c1f-4a3a-bb18-1bfae5396b6d
2025-12-28 01:01:25 -05:00
Matt Dallmeyer dd21b5c942 Speedrun fixes (jak 1 buzzer counts, jak 2 race intro autosplit) (#4103)
fixes https://github.com/open-goal/jak-project/issues/4021 for jak1

also fixes a small bug for jak2 where the speedrun menu wasn't properly
closed on resetting run, which would break the debug menu until you
toggled the speedrun menu again. Looks like Hatkid already caught and
fixed this in jak3

goes along with https://github.com/open-goal/speedrunning/pull/29
2025-12-27 22:55:01 -05:00
Matt Dallmeyer 04f1f93bec [jak2/3] Fix same-attack-invulnerable-timeout clock drift original game bug (#3978)
So `target` has some logic here which checks if the pending attack has
the same ID as the last attack, and if so it checks for a 2s grace
period `(-> *TARGET-bank* same-attack-invulnerable-timeout)` before the
attack will actually count:

https://github.com/open-goal/jak-project/blob/7320bfc068acfa385f929b176f61caf3b7aabbbe/goal_src/jak3/engine/target/target-util.gc#L1664-L1674

This `same-attack-invulnerable-timeout` check uses `time-elapsed?`,
which under the hood references `(current-time)` AKA `(-> PP clock
frame-counter)`, which makes sense.

However the code that actually stores the `attack-time` uses a different
clock `(-> *display* base-clock frame-counter)`:

https://github.com/open-goal/jak-project/blob/7320bfc068acfa385f929b176f61caf3b7aabbbe/goal_src/jak3/engine/target/target-util.gc#L1765-L1768

So if these two clocks get out of sync - say the `target` process clock
falls behind the `*display*` clock - then we can end up storing an
`attack-time` that's "in the future" from `target`'s perspective,
effectively increasing the `same-attack-invulnerable-timeout`.

This clock drift can happen in real gameplay - Usual today was having it
happen consistently with the route he was attempting for NoOOB. I was
able to reproduce it consistently in OpenGOAL as well:
- get "invuln 2" (i.e. you have `(target-flags disable-attacks)` but not
`(focus-status dead ignore)`)
- restart mission at the top of temple before the glider mission trigger
- immediately go into the trigger and fall off the cliff (during the
black screen)
- you'll get the glider cutscene, but should respawn back at the bottom
of temple

Somewhere in this^ cutscene/blackout, the two clocks drift apart -
presumably `target`'s clock is paused but the other is not. Later in the
speedrun, this causes the extra long invuln timeout bug, which wastes
time while trying to intentionally lower health.

https://www.youtube.com/watch?v=WD2MLj8ccfg

As far as I can tell, any other code interacting with `attack-time` also
uses `(current-time)` or one of the wrapping macros like `set-time!` or
`time-elapsed?`
2025-12-27 22:38:33 -05:00
water111 75b4af4695 [jak3] PC uploads for water textures (#4097)
This is needed for the precursor bot sword trail texture, which is in
the water tpage
2025-12-08 19:45:44 -05:00
water111 4dee142336 [jak3] Fix rigid-body threshold to account for frame time (#4095)
Very similar to https://github.com/open-goal/jak-project/pull/4068, but
adjusts the scale based on the process clock. I think this approach is a
little bit better since it shouldn't depend on frame timing at all.
2025-12-08 19:33:09 -05:00
Grateful Forest abef970f58 jak2: fix hud alignment (#4075)
There were a few things going on here.

Jak 2's menu wheel is zoomed in at 16:9 but zoomed out at 4:3. However,
the custom aspects use the scaling from the 4:3 mode, this makes sense
as you'd want the zoomed out wheel.

However I noticed HUD elements scaled correctly on PS2 16:9 but not PC
16:9, which was a hint.

The hardcoded values for every individual HUD element for 16:9 and 4:3
are in pixels, normalized across 480 being the stretch of the screen.

To fix the HUD alignment I scaled those offsets, scaling them inside
`set-hud-piece-position` meant both textures and merc models got scaled
at the same time.

Note that you can get (very tiny) snapping into different integer values
as you scale to different aspects. This is simply the result of scaling
integer offsets which is what the game uses.

<img width="1704" height="639" alt="2"
src="https://github.com/user-attachments/assets/81e75f7c-04ba-4c9a-8a50-215d13bd4089"
/>
2025-12-08 19:33:01 -05:00
Grateful Forest aed61ce70c jak1: fix opening logo on non-PS2 aspects (#4073)
There are two issues here:

1 is the "punch in" where the logo punches inwards towards the camera on
first appearance, this effect reveals the edges of village1
significantly and happens for all users even on regular 16:9.

2 is on aspect ratios wider than 16:9, you see even larger areas of
village1 on either side.

The blackout is an artgroup that breaks apart and is set to the shape of
the Jak 1 logo. It has a baked in animation and is a set size, so it
cannot simply be scaled or adjusted to be wider.

Seeing the sides of village1 before seeing the logo is not the immersive
experience this opening was going for, where the game "bursts" into the
screen.

My first thought to fix was to simply call `set-letterbox-frames` until
the right moment. This worked, however, it didn't produce an ideal
result simply because the letterbox also went on top of the light blue
"logo volumes" starburst.

Having experimented with the range of edits possible here, I decided the
best approach is actually to simply delay displaying village1 ever so
slightly. This avoids editing the very particular blackout art group,
with set sizes of chunks that break apart. This also avoids covering the
blue volumes with a side letterbox/covering.

This scales with any aspect, supports both different language logo
blackout shapes, and fixes both wide aspect issues as well as the
regular 16:9 punch in issue. This is an important edit as it's the first
thing people see.

<video controls
src="https://github.com/user-attachments/assets/9e5bfd39-4189-4c7c-bf76-e7ea0df0464f"></video>

---------

Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2025-12-08 18:32:50 -05:00
Grateful Forest 3eec4d2406 jak1: fix high fps ripples + frozen ripples (#4067)
Have done some custom ripples so thought I could fix this. At first I
scaled ripple speeds before realizing that wouldn't work if you change
FPS mid-game.

Instead I found the delta increment is there as a variable, and just
scaled that increment directly. I followed the same convention used
everywhere; just multiply by `DISPLAY_FPS_RATIO`.

That was the easy bit, the hard part was a second, unrelated issue,
whether you scale the delta or not, which is on level entry at high fps,
it shows no water movement at all.

I saw the delta was always being created at 0.0 on high FPS, and saw the
delta was computed nowhere in GOAL, only mips2c. I found inspiration
from [this
patch](https://github.com/open-goal/jak-project/blob/5ac5b6aae8f8058e76a27cd14d37db6c0b4d5821/goal_src/jak1/engine/common-obs/ropebridge.gc#L605-L611),
where the time ratio is changed to 60 FPS temporarily. However, fixing
the time ratio still created 0.0 deltas, and no matter what I did, it
always created 0.0 deltas.

I was about to give up, thinking there's no way to scale the mips2c
deltas. However, I found out why it was giving 0.0 deltas, which is on
high FPS, the video-mode is neither `pal` or `ntsc`, but `custom`, and
the misps2c code uses settings for `pal` or `ntsc`.

To include support for high FPS, I temporarily change it to `ntsc`, and
only apply this at the wave table creation when `custom`.
2025-12-08 18:32:20 -05:00