12 ms·
Why fastDOOM is fast
- ge96 2y ago> I always wanted as a teenager but could never afford Funny how that is, for me it was a Sony Alpha camera (~~flagship at the time~~) and 10 years later I finally buy it for $50.
- fabiensanglard 2y agoIt looks gorgeous and compact (https://m.media-amazon.com/images/I/61kHENeCK8L._AC_SL1000_.jpg https://m.media-amazon.com/images/I/61kHENeCK8L._AC_SL1000_....).
- ge96 2y agoYeah I was not exposed to camera gear at that time but seeing the NEX series with the tiny body and massive lens, I wanted it. I know there are better cameras in the Alpha line but yeah, I had an R3 at one point which was wasted on me as an amateur.
- Arainach 2y agoYou don't need to use every capability of a device to make it beneficial for you. Let's stick with photography. Can someone who knows what they're doing get great results with cheap equipment? Yes, in many situations. Is it WAY easier with the right gear? Absolutely. Finding the right balance is tricky - no, you don't need a flagship body and lens to get started, but having a flagship or pro-grade body/lens from 1-3 generations ago can be huge. I shoot Nikon, not Sony, but going from a consumer D50 body to a Pro D300 body was huge just in terms of ergonomics - more buttons to allow me to quickly adjust things without having to pull the camera from my eye and fumble through menus. In the current generation, I finally moved to Mirrorless with a Z6ii which blew my mind and enabled so many more things - no, I wasn't "getting the full use" out of it and yes, I got some great shots with my old DSLR gear, but it made so many things so much easier that it made shooting fun and got me to carry the camera and take photos every day, which has been the biggest factor in improving my skills. Within the last few months I splurged and upgraded to a current-gen flagship (Z8) which amazed me once again - the Z6ii was more camera than I could fully exploit, but the Z8's ergonomics are just incredible - so many buttons, most of them remappable, allowing me to truly develop an instinctive way of shooting and allowing the equipment to get out of my way. It's important to try to avoid loving gear more than loving the activity, but that doesn't mean that higher-end gear is "wasted on" amateurs.
- ge96 2y agoYeah I just could not afford this stuff (debt) and I bought it used, $2K for a body, $2K for a G lens ... Then you get the urge to start buying all the primes... I'm back to the basics now trying to produce videos with an Nex-5n it's not 4K but very cheap. I get what you're saying though
- ndegruchy 2y agoThe linked GitHub thread with Ken Silverman is gold. Watching the FastDOOM author and Ken work through the finer points of arcane 486 register and clock cycle efficiencies is amazing. Glad to see someone making sure that Doom still gets performance improvements :D
- kridsdale1 2y agoI haven’t thought of KenS in ages but back in the 90s I was super active in the Duke3D modding scene. Scripting it was literally my first “coding”. So in a way, I owe my whole career and fortune to KenS. Cool.
- nurettin 2y agoHis blog was the first page I "surfed". Talking about duke3d map editor and his big project using voxels.
- vunderba 2y agoI feel like Duke 3D was probably the first mainstream accessible moddable FPS. Doom of course had plenty of level editors, but Duke Nukem brought the ability to alter and script AI as editable plaintext CON files, and of course any skills you learned on the BUILD engine were transferrable to any number of other games (Shadow Warrior, Blood, etc.) Also shout out to anyone who remembers "wackplayer" - Duke's equivalent of the BEEP keyword.
- hypercube33 2y agoCommand and Conquer with Rules.ini was similar and had many fond memories of mine
- Zardoz84 2y agoC&C Red Alert. C&C 1 wasn't too easy to mod. Also, Dune 2000 (derivatives from Red Alert engine), was pretty easy to mod .
- 2y ago
- prox 2y agoIs there a recommended place where I can play Doom in the browser? If such a thing exists!
- tasn 2y agohttps://archive.org/details/doom-play https://archive.org/details/doom-play or any of the other ones linked at the bottom of that page.
- yjftsjthsd-h 2y agoI dunno about "recommended", but a quick search turns up several options, the most interesting of which (IMHO) is https://js-dos.com/DOOM/ https://js-dos.com/DOOM/ (mostly because it looks like a generic "dosbox in web technologies" and that's sweet)
- pastage 2y agoThere are many variants of DOOM in the browser vanilla DOOM is easy but these are cooler https://news.ycombinator.com/item?id=42607794 https://news.ycombinator.com/item?id=42607794 https://news.ycombinator.com/item?id=42566112 https://news.ycombinator.com/item?id=42566112
- paulryanrogers 2y agoTechnically "Doom, the Gallery Experience" isn't running on any idTech. It's just reusing some of the art and sound.
- ge96 2y agotangent: after playing Eternal, damn all other Doom is just slow... Dark Ages is coming out I'm pumped Also reading Masters of Doom, Carmack and I have something in common ha (went to a form of jail)
- ChrisArchitect 2y agohttps://silentspacemarine.com/ https://silentspacemarine.com/
- 2y ago
- yjftsjthsd-h 2y ago> To get the big picture of performance evolution over time, I downloaded all 52 releases of fastDOOM, PCDOOMv2, and the original DOOM.EXE, wrote a go program to generate a RUN.BAT running -timedemo demo1 on all of them, and mounted it all with mTCP's NETDRIVE. I'm probably not the real target audience here, but that looked interesting; I didn't think there were good storage-over-network options that far back. A little searching turns up https://www.brutman.com/mTCP/mTCP_NetDrive.html https://www.brutman.com/mTCP/mTCP_NetDrive.html - that's really cool:) > NetDrive is a DOS device driver that allows you to access a remote disk image hosted by another machine as though it was a local device with an assigned drive letter. The remote disk image can be a floppy disk image or a hard drive image.
- tetrisgm 2y agoI’m curious: were there NAS’ or WebDAV mount in the DOS era? Obviously there was FTP and telnet and such. Just curious if remote mounts was a thing, or if the low bandwidth made it impossible
- sedatk 2y agoYes, there was Novell Netware that let you mount remote drives, and there were even file locking APIs in DOS to organize simultaneous access to files. In fact, DOOM's multiplayer code relied on part of Novell Netware stack (IPXODI and LSL). The remote mounts were mainly used on LANs though, not over Internet.
- bombcar 2y agoYes, it's basically what Netware was, and Novell was a HUGE company. SMB (samba) is also from the DOS era. Most people only know of it from Windows, though. There were various other ways to make network "drives" as the DOS drive interface was very simplistic and easy to grab onto. It was rare to find this stuff until Win95 make network connections "free" (before then, you had to buy the networking hardware and often the software, separately!).
- roywashere 2y ago
- kingds 2y ago> I was resigned to playing under Ibuprofen until I heard of fastDOOM i don't get the ibuprofen reference ?
- kencausey 2y agoGuess: headache from low frame rate?
- fabiensanglard 2y agoIndeed.
- apetresc 2y agoI legitimately thought it was some DOS compatibility layer or something. Like, you’d have to run Doom that way because of the low framerate natively.
- Cthulhu_ 2y agoWith every interesting word in the dictionary having been used to name products by now, the confusion is understandable. edit: although ibuprofen is a brand name.
- fredoralive 2y agoIbuprofen is the generic name for the drug. There are branded variants like Nurofen if you want to spend more money for no real reason.
- deleted 2y ago[deleted]
- hinkley 2y agoSo what does one do with a faster Doom, besides bragging, larger maps and more simultaneous players?
- kridsdale1 2y agoRun it on more obscure hardware?
- dvhh 2y agoConsidering that the code is mostly x86 assembly, the gains from such optimization are quite unlikely.
- pixelpoet 2y agoDoes it always have to be for practical benefit? What about pure learning and intellectual enjoyment? Where are the true limits? In the end absolutely nothing we do matters :) These dudes are living their best lives, and having done Quake-style asm texture mapping loops in the 90s (Mike Abrash, fastmap, Chris Hecker, PC Game Programming Encyclopedia, ...), I can definitely appreciate it <3
- fabiensanglard 2y agoYou can play on vintage hardware with a decent refresh rate. It makes it more enjoyable.
- pixelpoet 2y agoThanks for your awesome articles, esp the path tracing postcard[0] :) I've had the pleasure of hanging out with Andrew Kensler at a conference dinner (EGSR 2019?), amazing guy! He scribbled a bunch of great quasi Monte Carlo notes into my notebook and even signed it on request :") [0] https://fabiensanglard.net/revisiting_the_pathtracer/index.html https://fabiensanglard.net/revisiting_the_pathtracer/index.h...
- fabiensanglard 2y ago
- sedatk 2y agoIf the author reads this: John Carmack's last name was mistyped as "Carnmack" throughout the document.
- fabiensanglard 2y agoThank you for taking the time to report it. It has now been fixed.
- mkl 2y agoAnother typo s/game/gave/: "Another reason John game me".
- CamperBob2 2y agoSpeaking of Carmack, can you (or someone) elaborate on this quote? >DOOM cycles between three display pages. If only two were used, it would have to sync to the VBL to avoid possible display flicker. How does triple buffering eliminate VBL waits, exactly? There was no VBL interrupt on a standard VGA, was there?
- fabiensanglard 2y agoTriple buffering mean you can render at any speed, there will always be a valid target where to render and you never need to wait or vsync. This is not the case with double buffering. There can be a case, if the CPU renders fast enough, where it just finished rendering to the current target, but the previous target is still being sent to the CRT. In that case the CPU need to block on VBL.
- CamperBob2 2y agoSure, that part is well understood. But triple buffering doesn't avoid the need for vsync. If the VBL interrupt isn't reliably available on all the VGA cards out there, you are still going to have flip pages from the foreground at some point, and you would rather not do that outside the blanking interval. I suppose you could poll the CRTC every so often during the game loop or rendering process, though. That must have been how it worked.
- gwern 2y ago> The MPV patch of v0.1 is without a doubt build 36 (e16bab8). The "Cripy optimization" turns status bar percentage rendering into a noop if they have not changed. This prevents rendering to a scrap buffer and blitting to the screen for a total of 2 fps boost. At first I could not believe it. I assume my toolchain had a bug. But cherry-picking this patch on PCDOOMv2 confirmed the tremendous speed gain. Good example of how the bottlenecks are often not where you think they are, and why you have to profile & measure (which I assume Viti95 did in order to find that speedup so early on). The status bar percentage?! Maybe there's something about the Doom arch which makes that relatively obvious to experts, but I certainly would've never guessed that was a bottleneck a priori.
- robocat 2y agoExample: "Our app was mysteriously using 60% CPU and 25% GPU. It turned out this was due to a tiny CSS animation [of an equaliser icon]" https://www.granola.ai/blog/dont-animate-height https://www.granola.ai/blog/dont-animate-height
- pinoy420 2y ago[dead]
- ericmcer 2y agoWhy was the solution to optimize the animation instead of... using a static asset?
- moffkalast 2y agoWe paid for the whole CSS spec and we're gonna use the whole CSS spec.
- joquarky 2y agoThis, but for everything wevdev-related in the past ten years.
- 2y ago
- klaussilveira 2y agoGlad to see another post on Fabien's blog!
- unleaded 2y agoOne feature of FastDOOM I haven't seen mentioned here are all the weird video modes, some interesting examples: - IBM MDA text mode: https://www.youtube.com/watch?v=Op2tr2lGK6Y https://www.youtube.com/watch?v=Op2tr2lGK6Y - EGA & Plantronics ColorPlus: https://www.youtube.com/watch?v=gxx6lJvrITk https://www.youtube.com/watch?v=gxx6lJvrITk - Classic blue & pink CGA: https://youtu.be/rD0UteHi2qM https://youtu.be/rD0UteHi2qM - CGA, 320x200x16 with 'ANSI from Hell' hack: https://www.youtube.com/watch?v=ut0V1nGcTf8 https://www.youtube.com/watch?v=ut0V1nGcTf8 - Hercules: https://www.youtube.com/watch?v=EEumutuyBBo https://www.youtube.com/watch?v=EEumutuyBBo Most of these run worse than with VGA, presumably because of all the color remapping etc
- tecleandor 2y agoThe IBM MDA text mode is terrible... Love it!
- toast0 2y ago> - EGA & Plantronics ColorPlus: https://www.youtube.com/watch?v=gxx6lJvrITk https://www.youtube.com/watch?v=gxx6lJvrITk Any love for Tandy Graphics Adapter? I'd hate to have to run in CGA :( would need a 286 build for my Tandy 1000 TL/2, if it was still alive.
- Cthulhu_ 2y agoThat's awesome, just a great demonstration why these aspects of the game should be separated. It reminds me of the "modern" Clean Architecture for back-end applications.
- fitsumbelay 2y agovery nice website design
- aquova 2y agoI wanted to comment on that as well. It dawned on me near the end of the article that all lines end exactly at a word boundary. You can tell there's some subtle kerning going on, as different lines don't line up, even though it's a monospaced font, but it's very subtle and well done.
- kristianp 2y agoThat's called text justification. Spaces are added between words to line up the words to end at the right margin.
- syncsynchalt 2y agoIt's as easy as CSS: text-align: justify; try it in your browser console: document.body.style="text-align: justify";
- dabeeeenster 2y ago> I was resigned to playing under Ibuprofen until I heard of fastDOOM WTH is Ibuprofen?!
- fabiensanglard 2y agoThe US equivalent of Aspirin.
- IMTDb 2y agoIbuprofen and aspirin share some similarities but are different molecules. Both ibuprofen and aspirin are available in the US, both are also available in Europe. It's not the same as - for example - Tylenol which is called Doliprane or Dafalgan in Europe. In that case the active molecule is the exact same, just the name is changing; but you will have a hard time finding a box with Tylenol written on it in France.
- account42 2y ago> Tylenol which is called Doliprane or Dafalgan in Europe I have never seen it called Doliprane or Dafalgan here only ever Paracetamol which is the generic name.
- cbzbc 2y agoIt's an NSAID made under a variety of names. You might be familiar with Advil?
- ahartmetz 2y agoUS: Advil? A fairly close relative to Aspirin that's easier on the stomach and has less of an anticoagulant effect.
- samplatt 2y agoTo add to the list of drugs, the biggest brand for ibuprofen here in Australia is Nurofen, with Advil being the biggest "cheap brand" version of it. ibuprofen is an anti-inflammatory and anti-coagulant, sold under many different names.
- alanh 2y agoFor readability: html { font-family: system-ui; } Consider https://alanhogan.com/bookmarklets#add_css https://alanhogan.com/bookmarklets#add_css to add this to the page. Code blocks are still shown in monospaced font. BTW, monospaced font for prose is an anti-pattern that you hackers need to relinquish, but whatever!
- kccqzy 2y agoIt's clear that here using monospaced font is an artistic decision here. Furthermore, using system-ui for anything that's prose and not a UI is an anti-pattern that UI designers love to make. It also makes the font dependent on system language, which makes things worse if the system language doesn't match the language of the page. https://infinnie.github.io/images/blog/bootstrap.png https://infinnie.github.io/images/blog/bootstrap.png Even hardcoding it to something classic like Verdana (remember web safe fonts?) is much better.
- robertlagrant 2y ago> monospaced font for prose is an anti-pattern Why?
- ChrisRR 2y agoBecause they say so
- deleted 2y ago[deleted]
- manoweb 2y agoUnlike the author, back in the day I would have preferred a 486DX50 to the DX2-66. 50MHz bus interface (including to the graphics card) instead of 33MHz
- antod 2y agoMy first job was AutoCAD drafting on a DX50 with 16MB. Quite high specced in the early 90s. Not sure I would've noticed the difference compared with a DX2 though.
- fabiensanglard 2y agoCan you elaborate why? I understand the bus speed difference but the benchmark I remember always gave the 66Mhz winning over the 50Mhz.
- Narishma 2y agoWere those benchmarks with the DX-50 or the DX2-50?
- fabiensanglard 2y agoDX2-66 vs DX-50. A DX2-50 obviously lose to a DX-50.
- cantrecallmypwd 2y agoIn the "486" class of desktop processors, there were also: - Intel FC80486DX4WB-100 (50 x 2 @100) - Am5x86-P75+ (50 x 3 @150) - Am5x86-P100 (40 x 4 @160)
- bluedino 2y agoIt's complicated https://brassicgamer.blogspot.com/2023/04/the-almost-definitive-486dx50-and-dx266.html https://brassicgamer.blogspot.com/2023/04/the-almost-definit...
- jakedata 2y ago"IBM PS/1 486-DX2 66Mhz, "Mini-Tower", model 2168. It was the computer I always wanted as a teenager but could never afford" Wow - by 1992 I was on my fourth homebuilt PC. The KCS computer shows in Marlborough MA were an amazing resource for tinkerers. Buy parts, build PC and use for a while, sell PC, buy more parts - repeat. By the end of 1992 I was running a 486-DX3 100 with a ULSI 487 math coprocessor. For a short period of time I arguably had the fastest PC - and maybe computer on campus. It outran several models of Pentium and didn't make math mistakes. I justified the last build because I was simulating a gas/diesel thermal-electric co-generation plant in a 21 page Excel spreadsheet for my honors thesis. The recalculation times were killing me. Degree was in environmental science. Career is all computers.
- antod 2y agoA 486DX and a 487? I thought the 487 was only useful for the SX chips? ...looked it up, apparently the standard 487 was a full 486DX that disabled and replaced the original 486SX. Was this some sort of other unusually awesome coprocessor I hadn't heard of?
- 486sx33 2y agoDoubled throughput of certain calculations in certain tasks if motherboard supported it Possibly something software like maple could take advantage of
- jakedata 2y agoThe 486sx had a 16 bit external bus interface so it could work with 386 chipsets. The DX processors had a full 32 bit bus and correspondingly better throughput. The 486 never included an integrated FPU, you had to add a separate co-processor for that. I could go on about clock multipliers and base frequencies but I'll spare you.
- bluedino 2y agoI think you're thinking of the 486SLC The 486SX was fully 32-bit (unlike the SLC and 386SX) and the 486DX had the integrated FPU, and the 487 was a drop in 486DX which disabled the 486SX
- acoolguy48 2y agoThis is cool
- bee_rider 2y agoFrom a quote in the article > One of my goals for FastDoom is to switch the compiler from OpenWatcom v2 to DJGPP (GCC), which has been shown to produce faster code with the same source. Alternatively, it would be great if someone could improve OpenWatcom v2 to close the performance gap. > - Conversation with Viti95 Out of curiosity, how hard is it to port from OpenWatcom to GCC? Clearly the solution here is to write a Watcom llvm front end…
- fabiensanglard 2y ago> how hard is it to port from OpenWatcom to GCC? I don't think it is that hard but likely very time consuming. In theory it should only be about writing a new build script (not based on `wmake` but on a real `make`). And then workout the tiny flag/preprocessor/C compiler discrepancies.
- turol 2y ago> In theory it should only be about writing a new build script (not based on `wmake` but on a real `make`). And then workout the tiny flag/preprocessor/C compiler discrepancies. For mostly C code like the original Doom source, yes. But it looks like FastDoom people have added quite a bit of assembly. That needs to be ported to AT&T syntax. Or you need to find out if Intel syntax works in your version of DJGPP's gas. While this should work nowadays I have not tried it. Then there's other differences like Watcom mapping low memory by default into the low part of the address space but DJGPP needing explicit mapping or access.
- mmphosis 2y agoOn top of releasing often, Viti95 displayed outstanding git discipline where one commit does one thing and each release was tagged. https://fabiensanglard.net/fastdoom/#:~:text=one%20commit%20does%20one%20thing%20and%20each%20release%20was%20tagged https://fabiensanglard.net/fastdoom/#:~:text=one%20commit%20...
- rob74 2y agoAh, that picture brings back memories - I used to have a successor of that machine in the mid nineties (PS/1000), it looked almost the same, except the handle was rounded and the power button was blue (a big blue button). And the CPU was IBM's very own "Blue Lightning" 486SX clone (75 MHz, but no FPU). It ran Doom great, but had to pass on Quake, which required an FPU for its polygon-based 3D graphics.
- hyperman1 2y agoI see the acronyms MVP and MPV in the post. Does someone know what they mean?
- timendum 2y agoMVP is Most Valuable Player, ie best commits in terms of improvements on fps I think MPV it's a typo for MVP
- Out_of_Characte 2y agoIn the context of the article, We could assume it means "Most valuable Pull request" Just dont let corporations use MVPR as a metric or it will cease to be a fun challenge
- ant6n 2y agoTried to find with google and ChatGPT, no luck. Maximum performance value, perhaps?
- riddley 2y agoPretty sure it's Minimum Viable Product. This is a common term for a product with enough features to prove the value of the endeavor.
- rasz 2y ago>Optimize R_DrawColumn for Mode Y Seeing this made a difference makes it clear Fabien ran fastdoom in Mode Y >One optimization that did not work on my machine was to use video mode 13h instead of mode Y. 13h should work on anything, its the VBD that requires specific VESA 2.0 feature enabled (LFB * ). VBR should also work no problem on this IBM Both 13h and VBR modes would probably deliver another ~10 fps on 486/66 with VESA CL5428. * LFB = linear frame buffer, not available on most ISA cards. Somewhat problematic as it required less than 16MB ram or "15-16MB memory hole" enabled in bios. On ISA Cirrus Logic support depended on how the chip was wired to the bus, some vendors supported it while others used lazy copy and paste of reference design and didnt. With VESA Cirrus Logic lazy vendors continued to use same basic reference design wiring disabling LFB. No idea about https://theretroweb.com/motherboards/s/ibm-ps-1-type-2133a,-2155a,-2168a-type-1 https://theretroweb.com/motherboards/s/ibm-ps-1-type-2133a,-... motherbaord
- fabiensanglard 2y ago> VBR should also work no problem on this IBM I think this statement is incorrect. These modes requires support for VESA 2.0 which this IBM does not have. > Somewhat problematic as it required less than 16MB ram or "15-16MB memory hole" enabled in bios. Could be the issue. Do you have any documentation about this?
- rasz 2y agoLoad Univbe.exe. "15-16 hole" is only required for ISA cards to work in VBD mode.
- Trixter 2y ago>13h should work on anything You misinterpreted what he wrote. He wasn't saying that mode 13h didn't work; he meant that the optimizations in the mode 13h path of the executable weren't as good as the Mode Y path. It's the optimization that didn't work, not mode 13h itself.
- z3t4 2y agoIt's not trivial to go back in versions to check for improvements or regressions, because some optimizations can introduce bugs that is later discovered, or you introduce a vital feature that degrades performance... So you can make your life easier by having automatic performance tests that are run before each release, and if you discovered a performance issue you write a regression test as usual... What I'm trying to say is: Do performance testing!
- cantrecallmypwd 2y agoIn high school, the fastest computer in the computer lab was an IBM-donated PS/1 486SX 25 all-in-one that also was used to play DOOM.
- zombot 2y agoHow does git fit into 4 MiB of RAM?
- ChrisRR 2y agoI think the more appropriate question is how do modern apps not fit into 4MB of RAM? How is it that simple tools like text editors work the same as they did 20 ago but take orders of magnitude more RAM?
- miohtama 2y agoThe higher resolution of rendering explains some of it. Advanced completion, syntax highlighting and other productivity features take their share. Some goes to faster to develop programming languages, used to develop these editors, with run-time penalties, coming with this productivity boost. One can still use Notepad if you want to, but be much less productive with it.
- deleted 2y ago[deleted]
- anilgulecha 2y agoOne non-cynical take on why modern software is slow, and not containing optimizations such as these: The standardization/optimization hypothesis. If something is/has become a standard, then optimization takes over. You want to be fastest and meet all of the standard's tests. Doom is similarly now a standard game to port to any new CPU, toaster, whatever. Similarly email protocol, or a browser standard (WebRTC, Quic, etc). The reason your latest web app/ electron app is not fast is that it is exploratory. It's updated everyday to meet new user needs, and fast-enough-to-not-get-in-the-way is all that's needed performance wise. Hence we see very fast IRC apps, but slack and teams will always be slow.
- deleted 2y ago[deleted]