Doom holds a special place as one of the biggest games of the 1990s, as well as being one of the foundational blocks of the FPS genre. Long before 3D accelerators hit the market, iD Software’s hit was being played on computers worldwide, and later spread to all manner of other platforms. [David Ruiz] decided to build a cutdown version for everyone’s favourite, the ATmega328.
Due to the limited resources available, it’s not a direct port of Doom. [David] instead took some sprites and map data from the original game, and built a raycasting engine similar to that of Wolfenstein 3D. Despite the limited memory and CPU cycles, the basic game can run at between 8-11 FPS. There are fancy dithering tricks to help improve the sense of depth, a simplified enemy AI, and even a custom text library for generating the UI.
It’s a great example of what can be done with a seemingly underpowered part. We’ve seen similar work before, with Star Fox replicated on the Arduboy. A hacker’s ingenuity truly knows no bounds.
11 thoughts on “A Doom-esque Port To The ATmega328”
It’s disturbing all that could fit on there. Makes me wonder what else could fit onto that chip, in addition to input firmware… like monitoring software, for instance.
With a 1280 or Atmega8515 with external ram, or memory mapped graphics, thjis is perfectly feasible. Doom ran without problems in a 68000/68020. Both with less IPC than any Atmega.
Get to developing!
What’s your source ? I always thought that running Doom on a Mac SE/30 (68030 based, up to 128MB of RAM) was impossible
Well, 68000 could divide…
Doom certainly didn’t run well on a 68000. Maybe a few FPS on a 28MHz 68000 as a few A500 accelerators had.
The Amiga certainly had some Doom clones (Gloom, AB3D, etc) that were limited/optimised by/for the architecture, but even they ran poorly on a base A1200, which was a 68020. ISTR a 50MHz 68030 was the minimum for a good experience, maybe a 28MHz 68020 for a low-detail small-screen DoomAttack run.
Now there was that RPG with a 3D ‘Wolf3D’ style viewpoint, but even that was quite jerky on the base A500.
OTOH there are some really optimised ports of Quake/Descent/etc for AGA Amiga nowadays that can run on a 50MHz 68060 without looking rubbish.
That’s really awesome. On a breadboard, no less. This seems ripe to see exactly how much performance can be squeezed out of it as well.
So who wants to port this to Arduboy?
Please get in touch.
I would like to make keyring sized PCB’s for your doom game.
And yes, the ATmega can do textured walls.
This is super cool. If anyone is interested to look into incorporating angled walls, etc., I made a little Arduino wall-rendering engine using binary space partitioning like the original Doom engine:
Please be kind and respectful to help make the comments section excellent. (Comment Policy)