5591 Commits

Author SHA1 Message Date
xen-42
d12ef2ac97
Slide reel streaming (#1040)
## Minor features
- Can set `displaySlides` on a slide reel now to define which slide
indices should be displayed on the physical reel model. Fixes #888.

## Improvements

- Slide reels are now streamed (Fixes #898). Other projectors (auto,
torch) are not streamed yet.
- Empty slide reel slots are now transparent on the slide reel model.
Requires existing slide reel caches to be cleared.

## Bug fixes

- Fixed a 3 frame hitch when changing tools


So the strategy is:
If the cache does not exist, do nothing different. It will take like 5
minutes and all your memory but that doesn't matter that's on the dev to
make sure that they pre-gen the caches (the sequential pre-caching
option should stop you running out of memory when making the cache
probably). Users won't experience any of that

Then we just do not ever load the inverted cached images when loading
slides from the cache. Only do it right as the player is about to see a
slide, by patching any base game method that tries to get a streamed
slide. We currently do not change how auto-projectors and vision torches
work.

TODO:
- [x] Track who is requesting to load what image so that an unsocketed
slide reel doesnt unload all slides
- [x] Investigate why load times are longer
- [x] Make loading the images async (on an SSD doing it sync is
unnoticeable but might be on older hardware)
- [x] I need somebody to test this on an HDD and see that the slide
reels are actually loading async without hitching
- [x] When slotting slide reels in on EOTP you get a ~3 frame drop. Does
not affect NH Examples (smaller images). Need to figure out why (since
this is meant to be async it shouldnt matter the image size)

In EOTP I save 6 seconds of load time and 3.5gb of memory (6.5gb vs
10gb)
2025-02-14 13:22:19 -05:00
Ben C
ff445e0cb5 Updated Schemas 2025-02-14 09:33:59 +00:00
Will Corby
bd125c0182
Update PlanetConfig.cs 2025-02-14 01:31:46 -08:00
JohnCorby
bd32be3cc7 Merge remote-tracking branch 'origin/profiler' into profiler 2025-02-13 22:36:55 -08:00
JohnCorby
a51e87f002 manual sample markers for streaming 2025-02-13 22:34:47 -08:00
JohnCorby
ed011f1732 use SpriteMeshType.FullRect for all sprites cuz that makes it faster apparently 2025-02-13 21:49:37 -08:00
Ben C
c9d6335a6b Updated Schemas 2025-02-14 05:35:02 +00:00
JohnCorby
b8d7af90f1 field to not check for existing body 2025-02-13 21:31:03 -08:00
JohnCorby
5beb803835 Revert "revert load prefab cache cuz i think it already happens"
This reverts commit d0a61ba88d7077fb6b9427fb04e0a1f1b8a21aa9.
2025-02-13 21:24:25 -08:00
JohnCorby
ece07be2d6 oops 2025-02-13 20:32:21 -08:00
JohnCorby
89a58c2a93 Merge branch 'slide-reel-streaming' into profiler 2025-02-13 19:59:10 -08:00
JohnCorby
d1ceaaaf71 cache ship cockpit controller 2025-02-13 19:57:12 -08:00
JohnCorby
6d2739f931 broaden profile filter 2025-02-13 19:13:42 -08:00
JohnCorby
d0a61ba88d revert load prefab cache cuz i think it already happens 2025-02-13 19:11:09 -08:00
JohnCorby
511ffda580 evil patch 2025-02-13 18:19:32 -08:00
JohnCorby
98c86fa63c Merge branch 'slide-reel-streaming' into profiler 2025-02-13 16:55:51 -08:00
xen-42
c93ed5fc14 Fix caching the ship log slide projector 2025-02-13 18:37:01 -05:00
JohnCorby
05a1596493 i get it now 2025-02-13 14:32:10 -08:00
JohnCorby
a2d3822d84 Merge remote-tracking branch 'origin/slide-reel-streaming' into slide-reel-streaming 2025-02-13 14:26:53 -08:00
Ben C
d10d79719d Updated Schemas 2025-02-13 22:23:29 +00:00
JohnCorby
8b4989fbee document 2025-02-13 14:23:12 -08:00
JohnCorby
ebb1871a3a Merge remote-tracking branch 'origin/slide-reel-streaming' into slide-reel-streaming 2025-02-13 14:21:51 -08:00
xen-42
5a9b9c56ce Merge branch 'slide-reel-streaming' of https://github.com/Outer-Wilds-New-Horizons/new-horizons into slide-reel-streaming 2025-02-13 17:21:02 -05:00
xen-42
8c3649bb40 Can set which slides to display, make empty slide reels transparent (#888) 2025-02-13 17:21:00 -05:00
JohnCorby
a6c20cb231 document 2025-02-13 14:20:39 -08:00
JohnCorby
b1e64c1491 dont need to check CacheExists 2025-02-13 13:54:03 -08:00
JohnCorby
1d69fd063e Merge remote-tracking branch 'origin/slide-reel-streaming' into slide-reel-streaming 2025-02-13 13:44:03 -08:00
JohnCorby
e825882fd1 use direct cast so exception is cast exception instead of nre 2025-02-13 13:40:43 -08:00
xen-42
af98395686 Also do not doAsyncLoading on auto projector 2025-02-13 16:38:03 -05:00
xen-42
691cd8b096 Fix some checks, unload all when shiplogslideprojector says to, maybe fix vision torches 2025-02-13 16:31:04 -05:00
JohnCorby
a3f2f9fd8c document StartAsyncLoader 2025-02-13 13:08:09 -08:00
JohnCorby
28bf75d09a comment 2025-02-13 12:58:37 -08:00
JohnCorby
3e9ff8c616 comment 2025-02-13 12:55:50 -08:00
xen-42
a322c72f9f Merge branch 'slide-reel-streaming' of https://github.com/Outer-Wilds-New-Horizons/new-horizons into slide-reel-streaming 2025-02-13 15:48:34 -05:00
xen-42
daef166a39 Make slide reels work on ship log projector 2025-02-13 15:48:28 -05:00
Noah Pilarski
c483a8331c Set playWithShipLogFacts for auto projectors 2025-02-13 15:45:57 -05:00
xen-42
25fd6cd761 Make it async 2025-02-13 15:05:02 -05:00
xen-42
853e03cc99 Only unload textures once nobody is using them anymore 2025-02-13 14:54:14 -05:00
xen-42
407980f2d7 Actually always have to load raw if no cache 2025-02-13 14:36:03 -05:00
xen-42
1191cbaef8 Fix that it was always loaded the raw slides 2025-02-13 14:35:30 -05:00
xen-42
064f9ffef1 I can't tell if this works or not 2025-02-13 14:00:31 -05:00
xen-42
9f5257d087 Only correct spawn velocity when NH is handling spawn (fix archipelago incompat) 2025-02-13 08:52:40 -05:00
JohnCorby
1f02e7fe88 Merge branch 'dev' into profiler 2025-02-11 22:26:45 -08:00
xen-42
cb64f79c5d Fix the EOTP ending bug (that pikpik will probably fix in EOTP) 2025-02-11 23:26:23 -05:00
xen-42
fa4e95b9b3 Update PlayerImpactAudioPatches.cs 2025-02-10 16:50:53 -05:00
xen-42
8a1fa3de97 Bring back patch to impact audio 2025-02-10 16:12:02 -05:00
xen-42
d5d9200331 Don't use patch, use invincible field on player resources 2025-02-10 16:07:02 -05:00
xen-42
d1c8d132ae Revert changes to InvulnerabilityHandler 2025-02-10 10:09:02 -05:00
xen-42
90cf5880ed Address review - use _invinicible in its own file, comment orbitlines 2025-02-10 10:01:51 -05:00
xen-42
52f164a458 Merge branch 'dev' of https://github.com/Outer-Wilds-New-Horizons/new-horizons into dev 2025-02-09 23:28:37 -05:00