Star Trek Website
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Gemini24601@lemmy.world to 196@lemmy.blahaj.zone · 2 years ago

40 Kilobyte Rule

lemmy.world

message-square
36
link
fedilink
641

40 Kilobyte Rule

lemmy.world

Gemini24601@lemmy.world to 196@lemmy.blahaj.zone · 2 years ago
message-square
36
link
fedilink
alert-triangle
You must log in or register to comment.
  • JohnDClay@sh.itjust.works
    link
    fedilink
    arrow-up
    138
    ·
    2 years ago

    I wonder how many times this needs to be reposted and downscaled to no longer be true. It looks like this is already not the original resolution of the picture.

    • Sorse@discuss.tchncs.de
      link
      fedilink
      arrow-up
      81
      ·
      2 years ago

      It’s already not true.

      The image is 33 kilobytes

      picture of the meme in iOS photos showing that the image is 33 kilobytes in size

      • saigot@lemmy.ca
        link
        fedilink
        arrow-up
        11
        ·
        2 years ago

        The og super mario bros was 32kb.

        • spujb@lemmy.cafe
          link
          fedilink
          English
          arrow-up
          13
          ·
          2 years ago

          @JohnDClay@sh.itjust.works @Sorse@discuss.tchncs.de here’s a webp that’s 16kb :)

          • Psythik@lemmy.world
            link
            fedilink
            arrow-up
            10
            ·
            2 years ago

            Yeah well here’s here’s a jpeg that’s 5kb! ;)

            • spujb@lemmy.cafe
              link
              fedilink
              English
              arrow-up
              4
              ·
              2 years ago

              too many pixels i can still read this :/

              • pewgar_seemsimandroid@lemmy.blahaj.zone
                link
                fedilink
                arrow-up
                1
                ·
                2 years ago

                whats some really weird image format?

  • morganth@discuss.tchncs.de
    link
    fedilink
    arrow-up
    60
    ·
    2 years ago

    This is true, and I’m genuinely angry about that.

    • Kushan@lemmy.world
      link
      fedilink
      English
      arrow-up
      12
      ·
      2 years ago

      Why does it make you angry?

      • Skullgrid@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        2 years ago

        because he doesn’t understand how data generation works.

        I can probably write a program with an output that will reach infinite size if allowed to run forever. that program is probably less than 50 lines of code, which shouldn’t be more than a few kb, if that.

  • ch00f@lemmy.world
    link
    fedilink
    arrow-up
    58
    ·
    edit-2
    2 years ago

    Yeah, but the same is true for .kkrieger which is more impressive imo.

    • ArmokGoB@lemmy.dbzer0.comdeleted by creator
      link
      fedilink
      arrow-up
      21
      ·
      2 years ago

      That game is a marvel of programming.

    • Zwiebel@feddit.orgBanned from community
      link
      fedilink
      English
      arrow-up
      5
      ·
      2 years ago

      You swapped the ie

      • ch00f@lemmy.world
        link
        fedilink
        arrow-up
        5
        ·
        2 years ago

        Thx

  • morrowind@lemmy.ml
    link
    fedilink
    arrow-up
    38
    ·
    2 years ago

    Does it though? This is a very compressable image. It’s around 30kb on my system, and that’s with the extra text on top

    • Redjard@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      40
      ·
      2 years ago

      https://xkcd.com/1683/

      • ZombiFrancis@sh.itjust.works
        link
        fedilink
        arrow-up
        2
        ·
        2 years ago

        I love how mouseover text doesn’t quite display correctly on my mobile browser, especially with that one.

    • GenosseFlosse@lemmy.nz
      link
      fedilink
      arrow-up
      10
      ·
      2 years ago

      The game only had 16 colors (4bit) and a resolution of 256x240. If you store it in the original dimensions and apply loseless compression it could be much smaller.

      • Matriks404@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        2 years ago

        I wander what it will be in some modern format like WEBP or JPEG XL.

    • petrol_sniff_king@lemmy.blahaj.zoneBanned
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      2 years ago

      This isn’t a fair comparison.

      The game should get to go through the same compression algorithms first.

      • smonkeysnilas@feddit.de
        link
        fedilink
        arrow-up
        3
        ·
        2 years ago

        That’s just not possible, game data is not image data. For example image compression is lossy and based on quadtree representations etc., how would you apply this to code and sprites?

        • petrol_sniff_king@lemmy.blahaj.zoneBanned
          link
          fedilink
          arrow-up
          4
          ·
          2 years ago

          So you think running a video game through a jpeg compressor would be a bad idea?

          I’m ready to roll up my sleeves, man. A little elbow grease can work miracles.

    • enleeten@discuss.online
      link
      fedilink
      arrow-up
      2
      ·
      2 years ago

      We use BMP in this house, mister! As the Lord defined in the Bible

  • Cap@kbin.melroy.org
    link
    fedilink
    arrow-up
    26
    ·
    2 years 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
      55
      ·
      2 years 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.”

      • jackeryjoo@lemmy.world
        link
        fedilink
        arrow-up
        29
        ·
        edit-2
        1 year ago

        deleted by creator

        • ferret@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          16
          ·
          2 years ago

          Also, this jpeg has multiple pixels where there would only be one pixel on the nes

        • gramathy@lemmy.ml
          link
          fedilink
          arrow-up
          2
          ·
          2 years 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

    • Captain Aggravated@sh.itjust.worksBannedBanned from community
      link
      fedilink
      English
      arrow-up
      50
      ·
      edit-2
      4 months ago

      Removed by mod

      • 1rre@discuss.tchncs.de
        link
        fedilink
        arrow-up
        8
        ·
        2 years ago

        it’s also worth mentioning that JPEG was designed for photographs, where there’s a very high likelihood that each pixel of an image will be a different colour to those immediately next to it. Because of this, JPEG not only has higher file sizes for text and 2d graphics/pixel art than PNG and especially a compressed SVG (which would far and away be the best method of representing the mario image - it’s close to the same “tile” thing but transferrable and well supported), but it also results in artifacts and lower quality of the image.

    • Refurbished Refurbisher@lemmy.sdf.org
      link
      fedilink
      arrow-up
      36
      ·
      2 years 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@lemmy.zip
      link
      fedilink
      arrow-up
      18
      ·
      2 years 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.

      • Refurbished Refurbisher@lemmy.sdf.org
        link
        fedilink
        arrow-up
        5
        ·
        2 years ago

        Kind of. The NES also used cell-based graphics and reusable tilemaps, which I think the 8 bit guy made a video about.

        https://www.youtube.com/watch?v=Tfh0ytz8S0k

    • cadekat@pawb.social
      link
      fedilink
      arrow-up
      12
      ·
      2 years 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
        ·
        2 years 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.

    • jabathekek@sopuli.xyz
      link
      fedilink
      arrow-up
      7
      ·
      2 years ago

      https://www.freecodecamp.org/news/where-do-all-the-bytes-come-from-f51586690fd0/

      https://www.truthorfiction.com/was-the-original-super-mario-bros-only-40-kb-while-modern-screenshots-of-one-frame-are-283-kb/

      • God@infosec.pub
        link
        fedilink
        arrow-up
        1
        ·
        2 years ago

        Saved me the TinEye!

    • Cap@kbin.melroy.org
      link
      fedilink
      arrow-up
      1
      ·
      2 years 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.

196@lemmy.blahaj.zone

196@lemmy.blahaj.zone

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !196@lemmy.blahaj.zone

Be sure to follow the rule before you head out.


Rule: You must post before you leave.



Other rules

Behavior rules:

  • No bigotry (transphobia, racism, etc…)
  • No genocide denial
  • No support for authoritarian behaviour (incl. Tankies)
  • No namecalling
  • Accounts from lemmygrad.ml, threads.net, or hexbear.net are held to higher standards
  • Other things seen as cleary bad

Posting rules:

  • No AI generated content (DALL-E etc…)
  • No advertisements
  • No gore / violence
  • Mutual aid posts are not allowed

NSFW: NSFW content is permitted but it must be tagged and have content warnings. Anything that doesn’t adhere to this will be removed. Content warnings should be added like: [penis], [explicit description of sex]. Non-sexualized breasts of any gender are not considered inappropriate and therefore do not need to be blurred/tagged.

If you have any questions, feel free to contact us on our matrix channel or email.

Other 196’s:

  • !196@lemmy.world
  • !onehundredninetysix@lemmy.blahaj.zone
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 490 users / day
  • 779 users / week
  • 3.5K users / month
  • 6.94K users / 6 months
  • 50 local subscribers
  • 19.5K subscribers
  • 19.4K Posts
  • 223K Comments
  • Modlog
  • mods:
  • Moss@lemmy.blahaj.zone
  • greembow@lemmy.blahaj.zone
  • moss@lemmy.world
  • Queue@beehaw.org
  • funky-rodent [he/him]@lemmy.blahaj.zone
  • Peachy [they/she] @lemmy.blahaj.zone
  • threegnomes@lemmy.blahaj.zonedeleted by creator
  • greembow@lemmy.world
  • remotelove@lemmy.ca
  • Roflmasterbigpimp@feddit.de
  • A_Very_Big_Fan@lemm.ee
  • qaz@lemmy.blahaj.zone
  • A_Very_Big_Fan@lemmy.world
  • qaz@lemmy.sdf.org
  • qaz@lemmy.world
  • qaz@sh.itjust.works
  • qaz@piefed.malplena.net
  • BE: 0.19.20
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org