![]() ![]() This is just displaying a single full-screen image, on a really good CPU for the time, and we’re already down to a very low framerate. Two EGA cards are first, and their performance is really really bad. Paradise Autoswitch EGA2 (EGA, 8-bit ISA) Here are the results for drawing a single full-screen image to the framebuffer, in the (to the best of my knowledge) most optimal way possible: CPU But what does this mean in practice? In order to get some concrete numbers, I wrote a benchmark and ran it on a few DOS-era machines. How bad was it, exactly? The theoretical maximum bandwidth of the ISA bus is 8 MB/s, which is more than enough to push a 320×200 image with 4 bits per pixel (16 colors) at 70 Hz – that only requires about 2.2 MB/s. There was also a way to copy from video memory to video memory (latch copy – more on that later), but it still required the CPU to manually drive the process. So the CPU had to “get its hands dirty” and manually copy all the pixels from main memory to video memory. But EGA/VGA graphics cards didn’t support that. Sound cards, hard drive controllers, and other devices at least had DMA support, which meant data could be transferred between system RAM and the hardware device without the CPU’s involvement. PCs had faster CPUs compared to gaming consoles, but that speed didn’t help much when all the pixels had to be squeezed through the slow ISA bus. PCs were primarily designed for office work and business applications, where fast & smooth graphics weren’t a priority (once graphical user interfaces and higher resolutions became popular though, the need for faster graphics increased, leading to the creation of the VLB bus). The first problem is that early PCs were not quite fast enough to redraw the entire screen each frame while maintaining full framerate (i.e. There’s two issues with that when targeting EGA cards. ![]() The simplest way of doing that is to simply draw the background first, and then draw everything else on top, overwriting the parts of the background that are obscured. creating the combined image in the graphics card’s framebuffer. Without hardware support, the compositing has to be done entirely in software, i.e. On consoles and arcades, this was typically achieved via hardware acceleration, where the programmer can set up multiple image layers and the hardware takes care of compositing these together into the final output (unlike the SNES, the NES didn’t have hardware layers, but it still had some hardware features that made parallax scrolling a bit easier to implement). What does parallax scrolling require, on a technical level? Conceptually, it’s quite simple: We need to draw the background separately from the foreground, and use different scroll offsets for each. But the rendering engine itself is still fundamentally EGA-based, and the game does in fact run on EGA cards – just with incorrect colors.īefore we dive into Duke Nukem’s implementation of the effect, let’s take a look at why parallax scrolling was generally hard to do in EGA games. It requires a VGA card and features some 256-color scenes, but all the gameplay itself is using a 16-color EGA mode, just using the VGA palette to achieve custom colors that aren’t possible on EGA. Early DOS games featuring parallax scrolling were typically VGA games, and that’s for good reasons, as we’ll see.ĭuke Nukem is kind of a hybrid. It’s worth noting that the vast majority of early Apogee games targeted EGA, to make the games accessible for people with older hardware (VGA is backwards compatible with EGA). Duke Nukem II’s parallax scrolling in action So by having this feature, Duke Nukem II stands out among Apogee’s catalog of platformers, along with its predecessor Duke Nukem from 1991 and the 1992 game Cosmo’s Cosmic Adventure (which shares a lot of code and file formats with Duke 2). There are also some very early examples, like the PC port of the aforementioned Moon Patrol from 1983, but it features only an outline of a background, not a graphical image. Among the side-scrolling DOS games released from 1990 to 1993, very few have parallax scrolling (by 1993, it becomes a little more frequent, but still rare). Popularized by the arcade game Moon Patrol in 1982, the effect was already quite common on arcades and home consoles by the early 90s. ![]() Parallax scrolling – creating an illusion of depth in a 2D scene by having the background and foreground move at different speeds – is pretty much a staple of platformers and other 2D games nowadays. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |