I came across this Quora post about creative solutions to graphic limitations in old school games, and it’s fascinating so I decided to share it with you guys.
Typical home computers in the early 1980s only has 16KB or 32KB RAM. This poses a challenge for video games developers, as the video chip back then didn’t have its own memory bank and had to share with the CPU. Because the screen resolution is 320 x 200 pixels, which is equivalent to 64,000 pixels, if would take up 8KB of memory just for 1 bit color (black and white). If you want to display image with 16 colors, or 4 bits, that would take up 32K, leaving no RAM space for the actual game code. Such high-complexity system of 8-bit (256 colors) or 24-bit as of now is of course out of the question.
So what kinds of innovative solutions did engineers came up with to circumvent this issue, and get more colors without using up a lot of RAM? One of the popular approach is color cells.
Engineers broke the screen down into smaller sections (8-pixel squares) called cells, so that you can change the color of each specific cells. Each color cell has a 1-bit system, so it can display only one foreground and one background colors, requiring only 1 byte of memory for the colors. Although this method reduces the memory consumed by graphics, it makes the artwork much more challenging. You can have 16 colors on screen but can’t put the colors exactly where you want them to go. For example, we can’t draw that white line in between those two cells, because that would be a third color.
Dealing with this problem requires meticulous attention to details and strenuous efforts from artists. Look at this picture. Really colorful and complex, isn’t it?
But if you zoom into the picture, what you would find is this. Note that each cell has strictly 2 colors.
Another picture to help you understand the effects of this 1-bit color cell better:
Yet, because this approach has many limitations, engineers came up with some other improved options. Multi-color mode (used by Commodore 64 home computer) made the pixels twice as wide which cut the screen resolution by half, and only consumed 9K RAM. Some games developers were happy with trading off half of the resolution for having up to 4 colors per cell, because they considered colors more important in their products than resolution.
Another option is hardware sprite, which is a graphic image that is incorporated into a larger scene as if it’s part of the scene, while in fact it can move indepedently. Sprites are a popular way to create large, complex scenes as you can manipulate each sprite separately from the rest of the scene. “The Commodore 64 had 8 different sprites, the Nintendo had 64 different sprites. The Mario character alone was made of 4 sprites.”
It’s amazing how far we have gone in terms of graphics that sometimes we might take it for granted. These simple but elegant coding solutions are why I love computer science - it's an art of problem solving that is difficult to master but highly rewarding!
Works Cited:
https://www.youtube.com/watch?v=Tfh0ytz8S0k
http://www.gadgetexplained.com/2015/11/retro-video-game-old-computer-graphics.html
https://www.quora.com/What-is-the-smartest-weirdest-most-elegant-coding-solution-to-a-problem-youve-ever-come-across





Hey Tracy!
ReplyDeleteSeeing a Mario figure honestly makes me so nostalgic! If you used to play Donkey Kong and could never seem to get past level 22 on that game, then you should read my blog on integer overflow. You'll come to know why.
I especially like the last line of your blog. Have to agree with that.
Heh Aaqil,
DeleteThanks for your comment! I didn't play Donkey Kong, but I read your article and it was really interesting!
P/s: Also, just to let you know, this post is actually from last week so you might have to comment on another post to get credits for this week :) Sorry, I haven't posted the one for this week yet.