• Cap@kbin.melroy.org
    link
    fedilink
    arrow-up
    27
    ·
    3 months ago

    Can someone ELI5? I mean, I understand what is being said, but how is it a whole game is less storage than a modern image of that game?

    • Hawke@lemmy.world
      link
      fedilink
      arrow-up
      58
      ·
      3 months ago

      Because the instructions, “draw a brick here, a pipe there, here are the rules for how jumping works, etc.” are smaller than “these pixels are blue, that one is orange, that one is white, etc.”

      • Tyfud@lemmy.world
        link
        fedilink
        arrow-up
        31
        ·
        edit-2
        3 months ago

        Also, the jpeg is going to store each pixel as a 8bit x3, Rgb (255 *3), color pallette for the color code, whereas the nes was limited to only 56 colors.

        • gramathy@lemmy.ml
          link
          fedilink
          arrow-up
          2
          ·
          3 months ago

          More: that palette was hard coded and the actual in use palettes were even smaller subsets of the system palette to reduce memory demand

    • Refurbished Refurbisher@lemmy.sdf.org
      link
      fedilink
      arrow-up
      38
      ·
      edit-2
      3 months ago

      The NES has a picture processor (PPU) that has special things made for 2D, cell (tile)-based graphics with hardware sprites. Being able to reuse tiles and express each tile with a few bytes really helps keep things small, as storage was very expensive back then. Also, without bank switching (which SMB1 did not have), the 6502 could only address up to 64kb of memory (including ROM and RAM).

      The music was also kept small, as it was generated in real time by the audio processor that was embedded in the CPU.

      I’m sure there’s a disassembly out there along with some YouTube videos if you want to understand a bit more. IMO programming for these old systems is more fun compared to modern systems, which in comparison, have no limitations. It is a boon to creativity.

      https://www.youtube.com/watch?v=Tfh0ytz8S0k Here is one good video explaining the basics of graphics on old systems.

    • Dudewitbow
      link
      fedilink
      arrow-up
      19
      ·
      3 months ago

      the biggest reason is that draw commands of the same color can be space efficient. another is that the NES had to deal with 56 colors while modern images use 8 bits per color channel (RGB) meannig it has to store a lot more data it doesnt necessarily need.

    • cadekat@pawb.social
      link
      fedilink
      arrow-up
      12
      ·
      3 months ago

      Because the person creating the image didn’t take the time to optimize the image. It’s probably just a PNG or a JPEG, which is way overkill for representing a NES frame.

      Other commenters have mentioned that the NES has 56 colors and uses tiles to draw the frame. If you took the same approach (maybe embedding a GIF tile in an SVG), you could cut down the size of the modern image significantly.

      • Floey@lemm.ee
        link
        fedilink
        arrow-up
        1
        ·
        3 months ago

        PNG is fine for this. A palletized PNG on max compression would be smaller than the game and totally lossless unlike this. First you gotta take this image and map/quantize it to the original palette though to destroy the JPEG artifacts, which produce colors in between ones that would have existed in the game’s output.

    • Cap@kbin.melroy.org
      link
      fedilink
      arrow-up
      1
      ·
      3 months ago

      I’m back after 3 days of going down the rabbit hole you all set before me having a much better understanding of the question and a much bigger appreciation of the NES coders.