Skip to main content
7 of 22
deleted 519 characters in body
knol
  • 12.8k
  • 1
  • 47
  • 80

Yes, John Carmack almost certainly the first to use the hardware scrolling capabilities of the EGA specifically, together with efficient tile and sprite drawing and erasing algorithms to create a slick, full-screen scrolling 16-colour console-like game engine on the IBM PC.

Though note that Mega Man (1990) for DOS came out very close (I believe 4 colour CGA), and other earlier DOS games like License to Kill (1989) and Spy Hunter (1984) had scrolling as well - this wasn't in all directions and probably a full-screen redraw. I've also found a Quora post attributed to the developer of the DOS port of Golden Axe that says that game predates Keen.

No, he wasn't the first person ever to implement a system where tiles upon a moving background are redrawn row-by-row, or to devise algorithms efficiently erasing and drawing blocks of tiles or sprites based on their motion.

As you stated in your question, drawing only incoming tiles would be a well-known technique for arcades or consoles where hardware scrolling was available, regardless of whether they used a bitmapped/bitplaned display or a tilemap. The Sega Master System and Intellivision (see Advanced Dungeons & Dragons) both have tilemap layers that are exactly the width of the displayed screen, so the programmer has to set a flag to mask away one column of tiles so it can be used as a hidden zone to draw the new column into as the screen moves around.

The ZX Spectrum has no hardware scrolling or sprites, only a 1-bit unscrollable display, chunked up in to 8x8 regions coloured by 'attribute' values. Less-experienced ZX Spectrum programmers writing arcade ports such as Space Invaders-clones would clear the entire screen and draw the sprites, but more-experienced programmers would erase and redraw any moving elements or even redraw only their edges, or use XOR to draw-undraw elements if the resulting visual garbage when sprites overlapped other sprites or the background was acceptable. (XOR was known - mentioned in this 1976/8 patent, ZX Spectrum BASIC's drawing primitives expose XOR drawing mode as the statement OVER n.)

Keen's 'Adaptive tile refresh' is described as consisting of tile drawing and sprite handling algorithms very similar to the above. From what I can tell, the sprite handling is a form of dirty rectangles with a tile-based granularity: If a baddie stays in the same place and doesn't change to their next animation frame, leave him alone. If he moves, erase him with the background tiles he obscured, then draw him fully again.

The innovation Carmack achieved would be to implement these algorithms -quickly- in real mode DOS on a 286 and having it be -stable- across multiple cards. :) EGA programming is obtuse: bitplane selection, etc. It was the new EGA card with its scrolling abilities (likely configurable address base offset for coarse motion and very limited per-pixel panning for motion within a memory byte/word) that made Keen's scrolling possible, but to get there would need lots of experimentation and iteration.

I'm guessing the OP was an Amiga owner (like me) familiar with Ballistix and Shadow of the Beast (1989, both before Keen). Both these games have full-colour 50Hz gameplay with scrolling and (apparent) sprites. From the perspective of the 'home micros' (ZX Spectrum, C64, Amiga, Atari ST, etc.) as opposed to the business-focused IBM PC, the confusion as to what the fuss is about is understandable. In the PC world in 1989, EGA scrolling was 'cutting edge' stuff, though Apogee's claim that Keen "Makes an IBM outshine an Amiga" with its chunky world, beepy sounds and gaudy colours is a little bit ambitious. :)

knol
  • 12.8k
  • 1
  • 47
  • 80