• Feyter@programming.dev
    cake
    M
    link
    fedilink
    arrow-up
    12
    ·
    9 hours ago

    I try to add something to the understand.

    Especially in old games, the program code (what happens if you press a button, what happen if your health bar goes to zero…) is often handled in the same memory structure as the game data (sprites, your entered player name, you inventory…) If you glitch a function that should edit a memory block of game data (e.g. reduce the players money or rename a Pokémon) to do it’s operation on a program code block instead, you can reprogram the game while you are playing it and even make it a different game.

    A different famous example is Super Mario Land. If you glitch trough the level borders the game is displaying all kind of data (game data and program code) as level blocks that you can walk on. Some of those level blocks are distructable, which is setting this memory block to a different value. By carefully destructing the correct blocks, you can change things like how many life’s you have. But if you hit a wrong block, the game will potentially crash because you changed the program code to something that doesn’t make sense.