3 ms·
> Rather, the game uses commands like "from now on, use this ground fill pattern" That's RLE, isn't it? https://en.wikipedia.org/wiki/Run-length_encoding https
by dragontamer 7y ago
> Rather, the game uses commands like "from now on, use this ground fill pattern"
That's RLE, isn't it? https://en.wikipedia.org/wiki/Run-length_encoding https://en.wikipedia.org/wiki/Run-length_encoding
Or are you saying that they didn't even include the "count" for the ground fill?
----------
I'm confused about the thesis of the article. It seems like the article's purpose isn't to describe NES graphics, but instead to talk about PNG vs JPG files?
The article starts as "Great question Dion!", but it never actually says what the original question was. (Or if the question was "Where do all the pixels come from", then that's an inadequate question and doesn't seem to serve as a thesis for the article)
EDIT 2: It seems like the HN title "Super Mario Bros. game was just 31 Kilobytes. How's that possible?" is misrepresentative.
- greggman2 7y agoIIRC Mario 1 works by drawing "sprites" of tiles. The level data says "pipe at 73,30" where pipe is a 2x3 array of the tile ids that make a pipe or "cloud at 34,3" where cloud is a 3x2 array of tile ids. I don't know what percentage of NES games used a technique like that. AFAIK the majority of NES games with scrolling levels used a simple 2D tile map but Mario 1 does not. I shipped a NES game, ours had an MMC3 chip which if I recall gave us +8k ram for a total of 10k. We decompressed the current level's tile map into a portion of that. https://en.wikipedia.org/wiki/Memory_management_controller https://en.wikipedia.org/wiki/Memory_management_controller
- coldpie 7y ago> I shipped a NES game One of my favorite games of all time. You signed a copy of it via mail for me around 2006/2007 ;) Cheers. > We decompressed the current level's tile map into a portion of that. I reverse engineered it to dump PNG format maps of both it and the leaked prototype. Pretty straightforward RLE but it was fun learning about 6502, NES programming, and bank switching. Level dumper source: https://gitlab.com/mcmapper/mcmapper/blob/master/main.c https://gitlab.com/mcmapper/mcmapper/blob/master/main.c Generated images: https://tcrf.net/Proto:M.C._Kids https://tcrf.net/Proto:M.C._Kids Very different from how SMB1's level construction works. Like the OP comment said, it basically has a modal command structure. Something like "start drawing the ground two tiles up from the bottom. At x=18, draw a pipe." etc. This is why the level scrolls infinitely after the flagpole, it's just running the default "draw ground" command forever. M.C. Kids on the other hand actually stored the whole level tile grid, using RLE for compression.
- dahart 7y ago“From now on, use this ground fill pattern” is a type of run length encoding scheme, but implemented as a tile-drawing command in the game engine, not as an image file format. I’d speculate that the use of this run-length tiling command predates the RLE image format, since the Mario Bros arcade game that predates SMB1 (with some of the same programmers) and the RLE format patent both happened at the same time (1983) and run-length encoding schemes were already common before that.