Flash Plays Doom
July 20th, 2007
Update 3: Visit the home of Doomed Online here.
Update 2: There’s a bigger, badder, version up now.
Yes, that’s THE Doom. This uses the original Doom shareware wad file and gets all content from it at runtime. There’s no preloader, so be patient, it’s 1.7 MB. Use the arrow keys to move.
You’ll need to view this in a browser with Javascript and Flash 9 in order to see it.
There’s no sprites yet (enemies, barrels, that sort of thing) and you can walk through walls too. There’s also a mysterious bug that erects unnecessary walls in the outer areas of the map, but altogether it’s still pretty fast and stable right now. There’s some rudimentary sound support too, although for some reason it sounds scratchy at the end of a sound right now. Press the spacebar to hear.
It took some trial and error to get this far, since making a fast rendering system is so important. I tried using the same method for drawing bitmaps as Papervision at first, and while it was very fast, it also looked terrible. Papervision’s technique doesn’t seem to work well in an FPS environment because the wall textures skewed as you walk along them. I tried again with another method that used Flash’s draw method heavily, but it was far too slow and hard to work with. I was about to trash the whole thing, but I tried a more basic system, roughly resembling how environments were drawn in the original Doom where each pixel is drawn one-by-one. It seemed like it was still too slow, but after a few key optimizations to the drawing routine it ended up being very fast. I honestly wasn’t expecting that, but it’s actually playable now on a decent computer.
I don’t know exactly where I’m going with this, but I’m pretty sure it’s worth it. The only thing I can’t do is the music, the format is roughly the same as midi, and as far as I can’t tell it can’t be preloaded. Everything else Doom is capable of is possible. This whole thing was developed entirely using Flex 2 and the Flex 3 beta with Eclipse on Ubuntu Linux. In other words, with only free tools, right down to the OS.
Update: Apparently nobody knows my name. I think that’s kinda cool, but it’s actually Max.
July 21st, 2007 at 4:11 am
Brilliant. Absolutely brilliant. Very good work.
July 21st, 2007 at 6:15 am
TU
July 21st, 2007 at 8:26 am
[…] the original Doom? I used to play hours on my PC at the time. Well some dude (couldn’t find his name!) spends his time reading the original WAD file from Doom and is […]
July 21st, 2007 at 8:30 am
Cool stuff. Keep us posted!
July 21st, 2007 at 9:24 am
Damn!
Check http://www.suite75.net/lab/doom/
Seems you outrun me :)
Cool work!
July 21st, 2007 at 5:45 pm
this is awesome. keep it up.
Can we expect more? :D
July 22nd, 2007 at 7:11 am
about the sound: something like a http://en.wikipedia.org/wiki/ADSR_envelope will fix the nasty static noise.
July 22nd, 2007 at 12:36 pm
Nice!
July 22nd, 2007 at 12:52 pm
Btw, is it just a proof of concept? Or are you planing to finish it?
July 22nd, 2007 at 7:07 pm
That is cool. I will admit I have your site bookmarked before :)
[link removed]
Best
July 23rd, 2007 at 3:06 pm
regarding the noisy sound, it sounds like you are playing back too much data, thereby playing back what is located in memory/wad right after the actual sound data end…
July 25th, 2007 at 5:33 pm
Tim K: Cool! I thought I was the first to attempt this.
mike: Probably, how much I don’t know.
Mr.doob: Time will tell.
flashnine: What was up with that link? Looks like blogspam to me. I removed it.
hoover: You’re probably right, but sound is low on the to-do list right now.
July 27th, 2007 at 3:25 am
Nice work :D I wanna have your skills.
July 27th, 2007 at 9:00 am
Did you actually get Flex Builder running on linux!?! If so, what did you do to get it working? Or, are you just using eclipse with Flex SDK & xml-based code hinting for Flex/actionscript? Very nice work by the way. I have spent entirely too much time playing Doom. :)
July 27th, 2007 at 12:39 pm
Awesome. Now what about doing Dark Forces?
July 27th, 2007 at 1:16 pm
Andrew Trice: I wrote an article on how I did it, it’s bit outdated at right now, but still works fine.
How to develop for Flash on any OS, for free
July 28th, 2007 at 9:26 am
[…] http://blog.brokenfunction.com/2007/07/20/flash-plays-doom/ COMPARE PREÇOS DE: MP3, IPOD, CELULARES, NOTEBOOKS, CâMERAS, MONITORES, IMPRESSORAS, LIVROS NO […]
July 30th, 2007 at 10:12 am
[…] Para mais informações, confira no blog do desenvolvedor. […]
July 30th, 2007 at 2:31 pm
Max :) Great work, let me point out there is a Doom music remake project at http://doom.ocremix.org/, you can also find on the web some MIDI files that are awesomely close to the original songs. Hope you make wall collision and doors next.
July 30th, 2007 at 10:00 pm
Thanks Fernando, I actually have that on my computer already but I never really considered it.
The Doom music format and MIDI are pretty similar. The problem isn’t making it (which would be hard enough) it’s the fact that it would slow things down too much.
July 31st, 2007 at 4:23 pm
[…] BrokenBlog » Blog Archive » Flash Plays Doom Jogue doom no flash (tags: flash doom as3 3d inspiration game) […]
August 1st, 2007 at 5:25 am
[…] BrokenBlog » Blog Archive » Flash Plays Doom Jogue doom no flash (tags: flash doom as3 3d inspiration game) […]
August 1st, 2007 at 8:58 am
Hey Max,
If you want to go further with this, maybe we could join forces? Ping me if that sounds cool :)
August 1st, 2007 at 10:38 am
[…] Todo gamer que se preze conhece esse clássico da violência digital. Quem não se lembra de andar naquele labirinto de texturas pixeladas e idênticas enquanto era perseguido por monstros radioativos emitindo urros com uma qualidade de som duvidosa? Ficou nostálgico? Não se preocupe! Esse game, que é um modelo de jogo FPS (First Person Shooter) até os dias atuais, está sendo refeito em flash e estará disponível para ser jogado no seu browser em pouco tempo. O desenvolvedor está encontrando vários problemas com a implementação, o que deixa a certeza que o término do projeto ainda não está próximo, mas do pouco que ele divulgou, dá pra perceber que a versão em flash não perde em nada para a original. Confira o projeto no blog do desenvolvedor. […]
August 2nd, 2007 at 2:40 pm
[…] Max from BrokenBlog has coded a proof of concept of Flash implementing Doom. It actually uses the WAD file from the Doom shareware. He has implement sprites, but the enemies are just standing and staring at the player. The map does work though, but it’s still possible to walk through walls. The Doom clone features rudimentary sound, but sounds end in noise. The whole thing was developed entirely using Flex 2 and the Flex 3 beta with Eclipse on Ubuntu Linux. In other words, with only free tools, right down to the OS. You can play the game right here. […]
August 2nd, 2007 at 10:58 pm
this was literally breath taking… i got flashbacks from when i was 10 sitting there playing doom, finding out all the passages and shit, man, and its amazing flash can run it
August 4th, 2007 at 6:35 am
[…] See it here: Flash Doom game […]
August 5th, 2007 at 2:50 am
that’s amazingly fast!
considering drawing pixel by pixel
August 5th, 2007 at 7:57 pm
Esta Bien, solo que no se estan respetando las paredes, parece que estuviera con el cheat IDCLIP
Saludos…
August 6th, 2007 at 2:41 am
wow…the feel is just right, just like good ol’ doom!
I can’t wait to see a playable version? Max, tell me you have plans to make this into a full-fledged version !! I’d love to be be hunting these monsters again…or be hunted ;)
August 6th, 2007 at 4:05 am
nice one……………
August 7th, 2007 at 10:01 pm
Very good, how’s it done?
August 12th, 2007 at 12:30 pm
The question is, will you be sharing the source code with the world?
August 12th, 2007 at 6:07 pm
Hugo: I’m making this purely for my own amusement at this point, I don’t really know where this will end up.
Sam: Much in the same way Doom is done really I suppose, using a BSP tree.
David: Yeah, probably. Right now I need to complete more of it.
August 13th, 2007 at 12:34 am
I saw this on http://www.SubliminalMessages.com and loved Doom. Good luck with the music and the sprites. Yowza.
August 13th, 2007 at 2:51 am
Big Deal. Step 1 Finish the project THEN post it! This is like saying “eat bread” and then presenting your guests with wheat. C’mon!
August 14th, 2007 at 3:59 pm
come on finish it man!!!
August 14th, 2007 at 10:26 pm
awesome - just awesome!
August 16th, 2007 at 2:16 am
[…] Quiero probarlo. […]
August 16th, 2007 at 8:03 pm
Very nice. A Friend and I have a nice competition as to who can do Quake 2 in Flash first without using Papervision 3d ^^
Its proving to be fun :D
August 18th, 2007 at 8:50 am
Wow. That’s incredible!
I am very impressed.. great job!
August 18th, 2007 at 12:47 pm
Great work mate! any idea when the final version will be out?
August 24th, 2007 at 4:28 pm
[…] straight through the walls and all that good stuff. He’s got it in a post on his blog called Flash Plays Doom. Nostalgic PC gaming […]
August 26th, 2007 at 1:04 pm
Wow, this “Uncle Sean” blog is classic. He thinks this blog is called “Flash Plays Doom” and gets a nostalgia kick from this proof-of-concept because it reminds him of his days “blowing shit up” in Doom. Good to know you don’t have to add weapons or sprites to please people.
August 29th, 2007 at 11:19 am
Very nice
August 31st, 2007 at 6:05 pm
Wow…thats great.
To all the people who say Flash is a weak development environment…I give you this.
(gotta say, as a 14 year old game designer, that inspired me)
Simply wondering:
I’m not certain exactly how the data in doom is presented, but could you create a bitmap data object and project the top down view onto it?
Since the data in Doom is rendered pixel by pixel, I’d assume that each pixel has an X,Y, and Z coordinate. If you rendered only the X and Z data to the bitmap when the flash loaded, then kept track of the player position relative to this object, couldn’t you have a rough sort of collision detection?
Using the player position and testing it against the Not sure if I explained it clearly…
But you’ve probably considered that anyway.
September 1st, 2007 at 10:29 am
Noah: Yeah, I could do that, but that doesn’t provide enough detail, I’m using real mathematical line segments provided by Doom for collisions. The data in Doom has line segments for each section of a wall, not pixels, although you could say Wolfenstein had something like that.
September 8th, 2007 at 12:27 pm
How did you program this Doom in Flash? Did you use actual BSP calculations or sector-based calculations? I assume the walls are line segments….but are the line segments done for each tile-width of the wall?
ALso, is the ground tile-based? HOw does program overall differ from conventional raycasting in WolfenStein/Rise of the Triad?
September 20th, 2007 at 1:07 am
[…] BrokenBlog » Blog Archive » Flash Plays Doom Yes, that’s THE Doom. This uses the original Doom shareware wad file and gets all content from it at runtime. There’s no preloader, so be patient, it’s 1.7 MB. Use the arrow keys to move. […]
October 19th, 2007 at 2:23 pm
[…] Check it out! […]
November 2nd, 2007 at 1:11 am
i wont doom 3 to play realy much.
December 18th, 2007 at 7:36 pm
Hmm, so how do you actually draw the pixels, with which flash function? I know that doom is just an bps-accelerated ray tracer …
January 18th, 2008 at 12:30 pm
this is incredible! with some collision detection can become terrific! :D good work!
March 29th, 2008 at 12:23 am
Nice freakin work. This is amazing. I too was a doom head.
May 15th, 2008 at 6:30 pm
[…] ago I did some research into using the Adobe Flex framework to create Flash games. I found an amazing port of Doom using the Flex SDK, but at that stage, there was no source code on offer, so I couldn’t learn much from it […]
May 18th, 2008 at 5:43 pm
[…] is an excelent library. Flash has been becoming a 3d boom town. There are numerous code examples of importing .wad files and quake maps just look around. I will go into more detail when I get a chance at […]
May 21st, 2008 at 10:18 am
This is awesome. Just need the monsters and items. The only problem I forsee is the loading. It may have to stream constantly to get all the data. However, with faster internet, it shouldn’t be a problem. Other then that, it is a brilliant idea.
May 22nd, 2008 at 7:47 am
hi……
excellent work dear. waiting for it buddy… finish it off before quake zero….
and provide us with multi player version …..
:).
May 24th, 2008 at 6:44 pm
Very good indeed - very fast - please keep with it.
June 1st, 2008 at 9:53 pm
I just wanted to thank #35 for mentioning http://www.subliminalmessages.com
Very cool optical illusions, impossible figures and other weirdness - even though my eyes have been screaming at me all day!
June 7th, 2008 at 10:43 am
I’m after the toolkit. U mention all free stuff. What are the eclipse plugins u use. And the setup method (I use Win but Ubuntu can be a choice).