Tweaking: Difference between revisions

117 bytes added ,  12 July 2019
Line 5: Line 5:


==Cause==
==Cause==
[[File:Tweaking glitch chunk error.png|thumb|right|An example of a tweak where a visibly incorrect chunk is loaded.]]
[[File:Tweaking glitch chunk error.png|thumb|right|An example of a tweak where a visibly incorrect chunk is loaded. Note that no Pokémon will be encountered here]]
All maps in [[Generation IV]] are broken up into square "sections" or "chunks" 32 tiles by 32 tiles across. At any given time, only four sections are loaded and visible: the section the player is currently in as well as two sections orthogonally away and one diagonally away, depending on which {{wp|Quadrant (plane geometry)|quadrant}} of the current section the player is in. (For example, if the player is standing in the northwest quadrant of their current section, the sections to the north, west, and northwest will be loaded.) "Load lines" exist halfway across each section at the boundaries between quadrants, so named because when the player crosses over one, the sections in that direction are loaded into memory, while the sections behind the player are unloaded. Through this, the overworld appears seamless.
All maps in [[Generation IV]] are broken up into square "sections" or "chunks" 32 tiles by 32 tiles across. At any given time, only four sections are loaded and visible: the section the player is currently in as well as two sections orthogonally away and one diagonally away, depending on which {{wp|Quadrant (plane geometry)|quadrant}} of the current section the player is in. (For example, if the player is standing in the northwest quadrant of their current section, the sections to the north, west, and northwest will be loaded.) "Load lines" exist halfway across each section at the boundaries between quadrants, so named because when the player crosses over one, the sections in that direction are loaded into memory, while the sections behind the player are unloaded. Each quadrant is 32 by 32 tiles and only 8 can be loaded at one time. Through this, the overworld appears seamless.


Using the [[Bicycle]] in the fourth gear, however, can cause the player to move too fast for the game to load the areas properly, especially if one changes direction several times while near the intersection of two load lines, thus loading and unloading multiple sections over and over nearly simultaneously. Doing so triggers a {{wp|race condition}} bug, causing sections to load improperly. The effects can vary from a [[game freeze]], invisible walls, a completely black area, a completely white area, a change in the {{wp|Z-axis}} location, or even a completely different section fully loading in the wrong place.
Using the [[Bicycle]] in the fourth gear, however, can cause the player to move too fast for the game to load the areas properly, especially if one changes direction several times while near the intersection of two load lines, thus loading and unloading multiple sections over and over nearly simultaneously. Doing so triggers a {{wp|race condition}} bug, causing sections to load improperly. The effects can vary from a [[game freeze]], invisible walls, a completely black area, a completely white area, a change in the {{wp|Z-axis}} location, or even a completely different section fully loading in the wrong place.