Idle Deload

From JakSpeedruns Wiki
Revision as of 20:06, 13 February 2024 by Ruh (talk | contribs) (→‎Discovery)
Jump to navigation Jump to search

An idle deload is a bug in the game's level loading system that can be used to load in fail-safe/stored checkpoints and levels. If performed correctly you will generally see your current level deload to a black void and as the pause menu opens your location should change to the next checkpoint the game has available.

Idle deloading is used for Klaww Skip, Lava Tube Skip, and for Citadel Skip only in All Orbs and All Flies categories.

Technical

On a technical level, an idle deload is when the game's backup load state sequence is interrupted and only the restore function is executed.

During cutscenes, certain objects or characters need to be moved around or deloaded as the cutscene plays out. After the cutscene is over, the game needs to be able to return all the characters and objects to their original positions before the cutscene was started. In order to do this, the game creates a backup load state right before the cutscene begins. It then refers to the data within the backup load state after the cutscene is finished to properly return everything to how it was before the cutscene started. This backup load state process is controlled by the game's animation system, which is also used by 3 other events: Jak dying, Jak using the warp gate, and Jak performing an idle animation after 30 seconds of standing still. This means that these 3 other events can trigger the backup load state sequence.

There are two sets of functions that control this process:

Function Set 1

ja-play-spooled-anim
This function loads sounds and animations needed for the event. It also calls the function "backup-load-state-and-set-cmds".
backup-load-state-and-set-cmds
This function creates and stores a backup of Jak's current load state (level buffer state, level visibility data, and object names and statuses).

Function Set 2

ja-abort-spooled-anim
This ends the sounds and animations for the event. It also calls the function "restore-load-state-and-cleanup".
restore-loads-state-and-cleanup
Loads in the stored backup load state.

Discovery

Snugggles posts about the Button Hold method in Discord.

The idle deload was discovered by headstrong1290 on accident in February 2016. Blahpy figured out how to reproduce it a few days later. On August 22, 2021, Snugggles would discover the "button holding" method of the idle deload, which is the most commonly used method today.

Idle deload's first useful application for speedrunning was discovered by Boomer and yankee027 while accidentally doing Klaww Skip.