3 ms·
Karateka is a poor example of Parallax on C64, as it apparently does (slow) bitmap scrolling in front of a static background. Parallax on the C64 tends to rely
by vidarh 4y ago
Karateka is a poor example of Parallax on C64, as it apparently does (slow) bitmap scrolling in front of a static background.
Parallax on the C64 tends to rely on the ability to redefine the character set and effectively use it as a tile set. You can smooth scroll characters using the graphics chip, so you only need to move them every 8 pixels.
Combine that with multiple character sets and you get a variation of the Duke Nukem II approach for "free" - you scroll the characters for the background with the foreground, but you flip to a partially scrolled definition of the tiles.
Another approach often used when the background is limited in complexity, is sprites.
A third option is banding. E.g. if the background you want to parallax scroll is above the normal play area, you can use the raster interrupt to control the scrolling independently for each band.
A fourth option is a bitmap scroll of the tile data. This is "easy" if your parallax bands are limited patterns. E.g. you might fill one band of the background with 0123012301230123 over and over, and then just scroll that as a 32 bit pattern in the character definition.
In any case, the key to all of these is that few c64 games use the bitmap mode (a few do), and so you get to offset the slow CPU with moving far less data around. Tack on the hardware sprites and raster interrupt and you can do a lot of interesting stuff.
Here's a great page on Parallax in C64 games with some video:
https://www.c64-wiki.com/wiki/Parallax_Scrolling https://www.c64-wiki.com/wiki/Parallax_Scrolling