11 ms·
How DOOM fire was done
- ohiovr 8y agoThe effect looks a little like the moon fire effect in the genesis presentation from Star Trek II
- samstave 8y agoFunnily enough - I was just watching this mini-documentary on DOOM cheats this morning before getting out of bed: https://www.youtube.com/watch?v=L76uEtX4b7c https://www.youtube.com/watch?v=L76uEtX4b7c
- richm44 8y agoI remember coding this effect in C a long time ago. Back in the day we used to use the frame buffer as the data store too, not really feasible today!
- Zardoz84 8y agoThis effect was used on the original Unreal engine to generate realtime fire effects that looked awesome. I don't know if the actual Unreal engine supports this anymore.
- kakarot 8y agoHeads up everyone, the DOOM Blackbook is 50% off on Amazon right now, which puts it down to a very reasonable $25. I just purchased it along with the WOLFENSTEIN 3D Blackbook which is also 50% off.
- Impossible 8y agoSeems similar to Hugo Elias's fire effect also (https://web.archive.org/web/20160418004150/http://freespace.virgin.net/hugo.elias/models/m_fire.htm https://web.archive.org/web/20160418004150/http://freespace....).
- xabi 8y agoThis effect was first developed by @thejare in 1993. http://www.pouet.net/prod.php?which=15071 http://www.pouet.net/prod.php?which=15071 Old discussion: https://news.ycombinator.com/item?id=15828773 https://news.ycombinator.com/item?id=15828773 More info here: http://www.iguanademos.com/Jare/wp/?p=2756 http://www.iguanademos.com/Jare/wp/?p=2756 https://www.hanshq.net/fire.html https://www.hanshq.net/fire.html https://www.gamedev.net/articles/programming/graphics/simple-fire-effect-r222/ https://www.gamedev.net/articles/programming/graphics/simple...
- dahart 8y agoQuestion: is the effect in the article exactly the same as Jare’s with some parameter tweaks? The one in the article is pixelated and sharp from top to bottom, while all the pictures in the links you shared have a lot of blur in them that varies from top to bottom. I’m curious what the relationship is between the two effects, is the blur just optional?
- Jare 8y agoNo, this effect is not the same, although of course the underlying ideas are the same. The original was a more straightforward spread + cool, with IIRC a rather strange random component added for the cooling. Fabien's post describes a process with very explicitly random factors. My original was also 80x50
- wmil 8y agoGameHut put together a similar effect for the Genesis/Megadrive: https://www.youtube.com/watch?v=rnCPBcSRt7Y https://www.youtube.com/watch?v=rnCPBcSRt7Y
- djmips 8y agoWeb version of http://www.iguanademos.com/Jare/files/Fire/ http://www.iguanademos.com/Jare/files/Fire/
- gvd 8y agoIguana! omg I still remember their hearthquake demo. It inspired me to become a developer
- qha 8y agoThis is only for the PSX port of DOOM, not for the original DOOM.
- bluedino 8y agoI was very confused at first. Fire effect in doom?
- ASipos 8y agoAlso see: https://lodev.org/cgtutor/fire.html https://lodev.org/cgtutor/fire.html which is part of: https://lodev.org/cgtutor/ https://lodev.org/cgtutor/
- dublo7 8y agoMemories. Is this a lost art or do people still do this starting out? I mean now that everyone has unity to play with do people no longer have to know about the actual hardware?
- bluedino 8y agoYou can do the same thing using an HTML canvas element: http://slicker.me/javascript/fire/fire.htm http://slicker.me/javascript/fire/fire.htm (not mine) There are similar demos out there using particle effects.
- blt 8y agoThis effect doesn't require knowing anything about hardware...
- beetwenty 8y agoIn general, people will code to the API they have. For graphics that mostly means GPU hardware and shaders. The old raster tricks still come out from time to time, and there are reasons to software render certain effects, but there are many new GPU-centric effects that are equally diverse and clever. Experienced devs will often use third-party engines as cross-platform deployment tools and then work around whatever the engine provides. But indies are relatively more likely to engage with the higher-level systems which can lead to a certain defining aesthetic(e.g. in the era of Flash games, the built-in filters, masks, etc. got a thorough workout, even though by the end, everyone making optimized games was caching their results to bitmaps). With audio, on the other hand, everyone will just look for fmod or an equivalent. There's rarely much time budgeted for audio and there's much less shared experience in doing it ground-up.
- k__ 8y agoI have the feeling many game devs do their own engine, but yes, the new people start with a existing engine.
- hurricaneSlider 8y agoMost game developers do not code their own engines. In fact unless you're doing something special (e.g. claybook, Miegakure, anything with true videos, or an unusual development pipeline/platform), it is immeasurably more economical to use an engine like unity/unreal with their large communities, asset stores, support and decent tooling. Even many 'AAA' games are now starting to use these commoditised engines (possibly with their own extensions/forks)
- unixhero 8y agoI love these DooM posts on my holiday break. There is some kind of mindfulness - zen like - ie. anti-stressing - reading about something so directly fun, trivial and specific.
- htk 8y agoI ported this effect to Pascal in Delphi, and won first place on the "Set the World on Fire" contest by Borland. Good Times! http://edn.embarcadero.com/article/20487 http://edn.embarcadero.com/article/20487
- dmix 8y agoNeat, what prize did you choose? I'm guessing the Delphi Pro?
- htk 8y agoIf I remeber correctly it was Delphi 3 at the time. I loved Delphi, but I only got proficient on it thanks to Marco Cantu's "Mastering Delphi" book. I don't know what I would think of the book today, but it was a huge help at the time.
- wohoo 8y agoInteresting articles, infortunatly it has many typos: framebuffer is initiated full yellow, not black; pixel in code should be firePixel[src]; randomness should be applied symmetrically with rand+1 in [-1;1].
- cravay 8y agoI love these kinds of articles but I also think there is a slight mistake. In my opinion it should say "upper-left is at array index zero" instead of "lower-left is at array index zero". I don't think it matters if the randomness is not applied symmetrically and the fire moves slightly to the left. I also can't comprehend the part about the framebuffer being initiated yellow and not black.
- enneff 8y agoI read the Doom Black Book over the holidays and it was a real treat.
- fabiensanglard 8y ago:)
- sovietmudkipz 8y agoThe mobile view of this website is an absolute pleasure to see. I’ve not really had a reaction this powerful before. The site is gorgeous to look at and the content is unhindered by poor design. I’m impressed!
- fabiensanglard 8y agoThanks! Since I wrote the book I try to take extra-care of the overall typesetting. I have an iPad Pro that I use to benchmarks the overall "appeal" of each article. For a time I considered writing only one-pager that would entirely fit on an iPad screen without need to scroll (like an actual granite tablet). It is unpractical but keeps coming back to me every times I scroll down.
- tomxor 8y agoYes! it's amazing how ergonomic it can be when one focuses on typography and layout instead of cramming the page with complex and superfluous navigation menus and graphics.
- billfruit 8y agoI am kind of surprised, at the attention and fond rememberance Doom is still getting, compared to Descent, which though released around 2 years later, appears to me much more accomplished: levels of tunnels with complex spatial arrangements, the 6dof motion, even had a sterographic 3d mode.
- notSupplied 8y agoTechnically yes, Descent was very impressive for its time, but 1) Doom accomplished more technical feats first and 2) Doom had much wider appeal because Descent was too difficult to play. Remember this was the early days and the proper way of controlling an FPS hasn't really been figured out yet. Most players didn't even player Doom on the now standard WASD+MouseAim scheme. Descent's starting control scheme was utterly unintuitive, especially given how you had to contort your left hand around pressing A to accelerate and Z to reverse.
- JohnBooty 8y agoDoom was pure, distilled, adrenaline fueled fun. Fast and stripped down. If Descent was an SUV loaded with feature and cup holders, Doom was a sports car focused on raw performance and driving pleasure. Both impressive but Doom is just a visceral blast in ways that few games can match.
- jandrese 8y agoDescent had that very early 3D where everything is made out of like 8 gourmand shaded polygons and a lot is left up to the imagination. Doom's pixel art just plain looked better even though it was less technically accomplished. Quake 1 suffered from the same problem, it just didn't look as good as the previous generation. Worse, drawing those polygons was a lot to ask of the computers of that era so they generally limited themselves to a small number of enemies at once, you never got swarmed the way you did in Doom sometimes. Also, I personally found myself getting lost and turned around way more often in Descent than I did in Doom. That last part of the mission where you had to fly back to the exit before the reactor exploded was always the hardest part.
- 8y ago
- deleted 8y ago[deleted]
- baruchthescribe 8y agoHaha - I did an mmx version of this in assembler about twenty years ago for Konstantin Boldyshev's asmutils package. Doing things 8 bytes at a time made it ridiculously fast.
- bananaboy 8y agoNice! I did a size optimised version in assembler for MS-DOS a long time ago myself in 173 bytes: http://www.humbug.net/projects/download/demos/js-fire7.zip http://www.humbug.net/projects/download/demos/js-fire7.zip It's not the smallest fire I've seen but I thought it was the smallest that still looked nice.
- baruchthescribe 8y agoVery cool. Works like a charm in DOSBox.
- robertAngst 8y ago>Notice that by adjusting how the fire propagates up, wind can also be simulated. I will leave that as an exercise for the readers who had the courage to read up to here. This is what I cared to see. The rest was not a mystery and seems like a pretty simple math/logic problem. Although, now that I type this out, I am thinking the wind would be simple too... Can anyone explain why the interest? I imagine there are college kids who do this type of logic.
- blondin 8y agoyes, i am surprised that Fabien is doing the "leaving it as an exercise for the reader" on us. all authors have to do this at some point heh? anyways, you see that "dst = src - randIdx + 1" line? that's what the "reader" needs to play with. right now "randIdx" is 0, 1 or 2. when it's 0, "dst" is one pixel to the right of "src", when it's 1 "dst" is at "src", and 2 is to the left. also remember we are placing it "below" because we are moving up, so we do "firePixels[dst - FIRE_WIDTH] = ...". hope that helps. this article has renewed my interest in demo scene effects. canvas2d seems very friendly now. last time, i had a hard time with the animation boiler plate, manipulation of the canvas element and colors. colors manipulation seems to still be awful. i see Fabien had to write 15 lines of code for palette conversion. but that createjs library makes many things easier. hope Fabien can go through other popular effects... or maybe i should lol : )