Live data from Hacker News

Show HN: I've re-implemented the Doom fire effect in plain JavaScript

github.com

1–10 of 24 posts

Re: Show HN: I've re-implemented the Doom fire effect in plain JavaScript

#4
Maybe it wasn't clear in the original article [1], but what you see inline are javascript implementations of the effect - there is a link to the source code at the end:

https://codepen.io/svkaiser/pen/xXmOvY

[1] http://fabiensanglard.net/doom_fire_psx/

Re: Show HN: I've re-implemented the Doom fire effect in plain JavaScript

#5
I first learned to do this effect in 1999 thanks to the incredible Denthor/Asphexia tutorials. I looked forward to new releases of these that my friend would (somehow) get and give to me on a floppy disk.

Most of them were in Pascal, but the fire one was in asm (http://archive.gamedev.net/archive/reference/articles/articl...) - it was the first time that assembler really clicked for me!

Re: Show HN: I've re-implemented the Doom fire effect in plain JavaScript

#6
post #3

It's a bit slow. I suggest 1) Use existing table instead of creating a new table at each frame/interval. 2) Or use Canvas because DOM is so slow 3) requestAnimationFrame instead of setInterval

Open Source community is awesome, someone already made a Pull Request about this: https://github.com/filipedeschamps/doom-fire-algorithm/pull/...

Re: Show HN: I've re-implemented the Doom fire effect in plain JavaScript

#7

I first learned to do this effect in 1999 thanks to the incredible Denthor/Asphexia tutorials. I looked forward to new releases of these that my friend would (somehow) get and give to me on a floppy disk. Most of them were in Pascal, but the fire one was in asm ( http://archive.gamedev.net/archive/reference/articles/articl... ) - it was the first time that assembler really clicked for me!

Oh wow. Denthor's tutorials were very good. Brings lots of good memories. Too bad this culture was overrun by internet.

Re: Show HN: I've re-implemented the Doom fire effect in plain JavaScript

#8
post #3

It's a bit slow. I suggest 1) Use existing table instead of creating a new table at each frame/interval. 2) Or use Canvas because DOM is so slow 3) requestAnimationFrame instead of setInterval

For canvas I’d be curious which would be faster: grabbing an ImageData and continually update then set or use fillRect.
Post reply on HN