Please create an account or Login! Have fun!

Wraparound Glitch

Revision as of 03:19, 26 March 2020 by MilkyWayWishes (talk | contribs) (Created page with "The '''Wraparound Glitch''' is a glitch in Microsoft's version of Chip's Challenge where under specific conditions monsters or blocks can exit the edge of the...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The Wraparound Glitch is a glitch in Microsoft's version of Chip's Challenge where under specific conditions monsters or blocks can exit the edge of the grid and appear from the other side shifted one row up or down.

Setup[edit]

In order for the glitch to occur the level designer has to place a monster or clone machine directly against, and facing the left edge of the level and create an entry on the monster list or clone connection for that monster/clone machine at (32, y-1) where y is the y-position of the monster/machine in the editor. When the monster moves or a clone is created the object will move/clone off the left edge and reappear on the right edge shifted one row up.

It's also possible to have a monster clone off the right edge and appear on the left shifted one row down, for this a clone machine has to be placed against the right edge with the monster or block facing said edge, and button wired to (-1, y+1). However, this will only work with a clone machine and not a monster added to the monster list.

Of note is that if Chip starts the level with a creature that is going to wrap visible, the creature will move. However, visually it will not change until the tile is redrawn.

Cause[edit]

Whenever a monster or block moves the game checks to make sure its destination is within the level grid (0 to 31 on both the x and y axis), and since something trying to move from tile 32 to 31 (or -1 to 0) is within those bounds the move succeeds.

Whenever an object moves the tile it left and the tile it entered needs to be updated. MSCC does this by editing the memory layout of the grid, however when changing the memory MSCC doesn't check that the tile its supposed to be editing is within the range of 0 to 31. Since memory is all in one big chunk (32, y-1) is the exact same as (0, y) according to the coordinate to memory formula: (32*y + x). As such when the game goes to change the tile it thinks the object just left it will end up changing (0, y) (or (31, y-1)) as a result. This is then followed up by the game changing the tile it thinks was just entered by the object: the other edge of the map shifted one by one row. Because of all this it seems like an object travels through one edge of the grid and wraps around to the other edge.

See also[edit]

  • Data resetting, a specific subset of the wraparound glitch where an buried object on the first row can wrap to the last row on the top layer and in the process can create tiles out of thin air and change game variables such as Chip's location.