Forum Overview
::
Motherfucking News
::
Re: Hell
[quote name="Zebco Fuckface"][quote name="Senor Barborito"][quote name="Zebco Fuckface"][quote name="Senor Barborito"][quote name="Zebco Fuckface"]Oh yeah, what's this commander keen clock independence thing?[/quote] From <a href="http://www.spectrum.ieee.org/WEBONLY/publicfeature/aug02/id.html">here</a>: [quote name="some goddamn article"]After a few nights of experimentation, Carmack figured out how to emulate the side-scrolling action on a PC. In the game, the screen image was drawn, or rendered, by assembling an array of 16-by-16-pixel tiles. Usually the on-screen background took over 200 of these square tiles, a blue sky tile here, a cloud tile there, and so on. Graphics for active elements, such as Mario, were then drawn on top of the background. Any attempt to redraw the entire background every frame resulted in a game that ran too slowly, so Carmack figured out how to have to redraw only a handful of tiles every frame, speeding the game up immensely. His technique relied on a new type of graphics card that had become available, and the observation that the player's movement occurred incrementally, so most of the next frame's scenery had already been drawn. The new graphics cards were known as Enhanced Graphics Adapter (EGA) cards. They had more on-board video memory than the earlier Color Graphics Adapter (CGA) cards and could display 16 colors at once, instead of four. For Carmack, the extra memory had two important consequences. First, while intended for a single relatively high-resolution screen image, the card's memory could hold several video screens' worth of low-resolution images, typically 300 by 200 pixels, simultaneously, good enough for video games. By pointing to different video memory addresses, the card could switch which image was being sent to the screen at around 60 times a second, allowing smooth animation without annoying flicker. Second, the card could move data around in its video memory much faster than image data could be copied from the PC's main memory to the card, eliminating a major graphics performance bottleneck. Carmack wrote a so-called graphics display engine that exploited both properties to the full by using a technique that had been originally developed in the 1970s for scrolling over large images, such as satellite photographs. First, he assembled a complete screen in video memory, tile by tile?plus a border one tile wide [see illustration]. If the player moved one pixel in any direction, the display engine moved the origin of the image it sent to the screen by one pixel in the corresponding direction. No new tiles had to be drawn. When the player's movements finally pushed the screen image to the outer edge of a border, the engine still did not redraw most of the screen. Instead, it copied most of the existing image?the part that would remain constant?into another portion of video memory. Then it added the new tiles and moved the origin of the screen display so that it pointed to the new image . In short, rather than having the PC redraw tens of thousands of pixels every time the player moved, the engine usually had to change only a single memory address?the one that indicated the origin of the screen image?or, at worst, draw a relatively thin strip of pixels for the new tiles. So the PC's CPU was left with plenty of time for other tasks, such as drawing and animating the game's moving platforms, hostile characters, and the other active elements with which the player interacted. Hall and Carmack knocked up a Mario clone for the PC, which they dubbed Dangerous Dave in Copyright Infringement. But Softdisk, their employer, had no interest in publishing what were then high-end EGA games, preferring to stick with the market for CGA applications. So the nascent Id Software company went into moonlight overdrive, using the technology to create its own side-scrolling PC game called Commander Keen. When it came time to release the game, they hooked up with game publisher Scott Miller, who urged them to go with a distribution plan that was as novel as their technology: shareware.[/quote] As far as I know, this one was a clean bolt out of the blue that caught a lot of people by surprise - I can't remember if it was Sweeney or Abrash (or someone else of similar stature and relatively close relationship to Carmack) but I do know that people who would know <i>far better than anyone here</i> cite this as the most interesting and truly innovative thing Carmack did (the interview I read was circa Quake 2 release and Quake 3 is in many ways the least interesting thing he's done technologically speaking). Prior to this side-scrollers on the PC were insanely clunky to the point of unplayability - boom, problem solved for everyone. --SB[/quote] Double buffering? You're giving him credit for *double buffering?*[/quote] This isn't double-buffering, but something entirely different. Double-buffering essentially creates a second frame buffer and writes to one while reading from the other. --SB[/quote] Excuse me: he used double buffering + updated the mirror at a quanta of the smallest drawable object. I'm not following the genius here.[/quote]