TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

108 pointsby filipedeschampsover 6 years ago

8 comments

fabiensanglardover 6 years ago
The original reverse-engineering done by Samuel Villarreal was already using javascript. I assume by "plain" you mean you removed easeljs library for canvas management and added buttons?
评论 #18834856 未加载
ricardobeatover 6 years ago
Maybe it wasn&#x27;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:<p><a href="https:&#x2F;&#x2F;codepen.io&#x2F;svkaiser&#x2F;pen&#x2F;xXmOvY" rel="nofollow">https:&#x2F;&#x2F;codepen.io&#x2F;svkaiser&#x2F;pen&#x2F;xXmOvY</a><p>[1] <a href="http:&#x2F;&#x2F;fabiensanglard.net&#x2F;doom_fire_psx&#x2F;" rel="nofollow">http:&#x2F;&#x2F;fabiensanglard.net&#x2F;doom_fire_psx&#x2F;</a>
评论 #18834170 未加载
评论 #18834593 未加载
mrspeakerover 6 years ago
I first learned to do this effect in 1999 thanks to the incredible Denthor&#x2F;Asphexia tutorials. I looked forward to new releases of these that my friend would (somehow) get and give to me on a floppy disk.<p>Most of them were in Pascal, but the fire one was in asm (<a href="http:&#x2F;&#x2F;archive.gamedev.net&#x2F;archive&#x2F;reference&#x2F;articles&#x2F;article364.html" rel="nofollow">http:&#x2F;&#x2F;archive.gamedev.net&#x2F;archive&#x2F;reference&#x2F;articles&#x2F;articl...</a>) - it was the first time that assembler really clicked for me!
评论 #18834069 未加载
评论 #18834538 未加载
评论 #18834431 未加载
z3t4over 6 years ago
It&#x27;s a bit slow. I suggest 1) Use existing table instead of creating a new table at each frame&#x2F;interval. 2) Or use Canvas because DOM is so slow 3) requestAnimationFrame instead of setInterval
评论 #18834043 未加载
评论 #18834154 未加载
mmphosisover 6 years ago
Apple ][ Fire Demo -- 64 Bytes <a href="http:&#x2F;&#x2F;deater.net&#x2F;weave&#x2F;vmwprod&#x2F;apple2_fire&#x2F;" rel="nofollow">http:&#x2F;&#x2F;deater.net&#x2F;weave&#x2F;vmwprod&#x2F;apple2_fire&#x2F;</a>
21over 6 years ago
But can you implement JavaScript in Doom?
评论 #18834544 未加载
评论 #18834168 未加载
berkutover 6 years ago
Didn&#x27;t MS VC++ 4 to 6 ship with an example which emulated this effect as well via a custom control?<p>There were different tabs for things like &quot;wood&quot;, &quot;gas&quot;, &quot;cryptonite&quot; which changed the overall colour of the effect.
Ayraaover 6 years ago
It would be really cool if you could paste the url to an image, have a generator overlay the fire effect on top, and you can save that as a gif.