Yet another case of the PS2 getting insanely lucky with buggy ND code,
the eco vents send an event to Jak to make him go into the powerup
state, but do not pass any event arguments which determine what
animation to play and at what speed/start frame. For the dark eco vents,
PS2 manages to somehow get the correct value of `7`, but we are not so
lucky.
As a side effect of this fix, we also get the originally intended
behavior for the light eco vents of playing the full powerup animation
from the start at a slower speed, rather than the much shorter one you
see on PS2.
Closes#4268
Adds support for exporting animations for foreground models. It's not
perfect and doesn't handle the Jak 2/3 animations very well in some
cases (scale can often get messed up, especially for the LZO compressed
ones, I have no idea what is going on with the data in those art groups
sometimes, so that'll have to be revisited later...), but it does a
decent job on Jak 1.
Additionally, the `build-actor` tool has also been changed to support
setting the `master-art-group-name` and `master-art-group-index` fields
to allow for custom art groups to link their animations to a different
master art group, which lets you add custom animations to vanilla art
groups.
Closes#1496
This brings back the SCE splash screens. Also adds a runtime flag
`-nosplash` to skip it. Right now, it's on by default, but open to
changes on that (maybe always disable in debug to speed up start times,
etc.).
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
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.
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>
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
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
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.
- `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.
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
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
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#4179Closes#4154
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
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
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
- 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
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)
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
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
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
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.
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>
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.
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.
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>
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"
/>