3 ms·
A modified Doom codebase can run on a Gameboy Advance with an acceptable framerate. Doom's rendering trick wasn't dependent on CPU power as much as it was cach
by sneakernets 8y ago
A modified Doom codebase can run on a Gameboy Advance with an acceptable framerate.
Doom's rendering trick wasn't dependent on CPU power as much as it was cache manipulation, memory access speed, and VGA card speed. Everything was already pre-computed, so the rendering engine only needed to look up a binary tree and spit out to the screen exactly what it was told. Even the game logic reused some of the renderer's LUTs when the code could get away with it, which was a lot.
- Sohcahtoa82 8y ago320x200 is 64,000 pixels. Assuming 20 fps, that's 1,280,000 pixels per second that need to be rendered. It ran at least 20 fps on a 66 Mhz CPU, meaning that each pixel had at most 52 clock cycles to render, and that's not even handling game logic. Certainly some optimizations involving not re-rendering pixels on the HUD come into play, but still I'm blown away that that they figured out such crazy optimizations. I feel like if I were to try to write Doom's engine that I would struggle to reach 60 fps on my i7 CPU, even rendering in Doom's original 320x200 resolution.
- usefulcat 8y agoActually I'm pretty sure it was 320 x 240 (mode X, which had the advantage of providing square pixels), so slightly more impressive.
- tom_ 8y agoIt was 320x200, apparently: https://doom.fandom.com/wiki/Aspect_ratio https://doom.fandom.com/wiki/Aspect_ratio
- sneakernets 8y agoNot to be that guy but the doom wiki moved over to its own domain at https://doomwiki.org https://doomwiki.org due to Wikia hijacking the wiki. Anyway, Doom used a special version of Mode X dubbed "Mode Y", which is Abrash's ModeX with fewer pixels to worry about.
- tom_ 8y agoThe correction is very welcome. Fixed link: https://doomwiki.org/wiki/Aspect_ratio https://doomwiki.org/wiki/Aspect_ratio (I found the link with google on my iPad, so my search was not as exhaustive as it might have otherwise been.)
- int_19h 8y agoIt was 320x200 - which is why many modern Doom ports have a switch to stretch pixels vertically to properly emulate the original aspect ratio. It did use Mode X, but that was because it could do page flipping, and allowed for certain other rendering optimizations enabled by its more complicated video memory layout. IIRC Quake was the first id game that fully exposed various X-modes (i.e. not just 320x240, but anything your video card supported, and your CPU could handle...).
- Sohcahtoa82 8y agoSide note: How's this for serendipity? A comment about Doom brought me to 666 karma.