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.

How much of a genius-level move was binary space partitioning in Doom? (2019)

223 pointsby davikr11 months ago

14 comments

gumby11 months ago
&gt; So Carmack ... started reading research papers.<p>This in itself is a superpower, especially in computer science where history is considered a waste of time.<p>This is commonly even true in actual research computer science, where you&#x27;d think papers were crucial. Nowadays with the flood of &quot;PR&quot; preprints particularly in machine learning, it would be impossible to keep up and so nobody tries -- most of those papers write-once-read-never.<p>When I moved out of computing into biochemistry and medicine, and now into climate, I found people take papers seriously, which is a pleasure.
评论 #40653448 未加载
评论 #40655519 未加载
评论 #40656791 未加载
评论 #40653806 未加载
评论 #40653516 未加载
评论 #40654223 未加载
评论 #40653767 未加载
评论 #40653996 未加载
评论 #40655943 未加载
评论 #40655391 未加载
评论 #40656324 未加载
评论 #40653515 未加载
评论 #40658933 未加载
评论 #40660735 未加载
评论 #40654022 未加载
Nition11 months ago
For Crash Bandicoot (1996), Naughty Dog sidestepped the entire VSD performance problem. Since the camera is on rails and only moves forward and back, they pre-calculated the visibility for every position and stored it in the game&#x27;s data. That meant no visibility calculation needed in real time at all, and they could do it per-pixel. As a result of that and some other brilliant tricks, they were able achieve probably the best graphics on Playstation.
评论 #40653659 未加载
评论 #40654252 未加载
a_e_k11 months ago
IIRC, both the Jedi engine (1995, <i>Dark Forces</i>) [1] and the Build engine (1995, <i>Duke Nukem 3D</i>) [2] which were of the same era used &quot;sectors&quot; rather than BSP trees for resolving visibility. Basically, it would traverse a graph as rays exited one sector and entered a neighboring sector. The approach is very much akin to walks through tet meshes in modern science apps.<p>In ray tracing, there are three commonly used spatial acceleration structures these days: grids, binary space partitions, and bounding volume hierarchies. Any one of those might have worked for Doom.<p>Though this post mentions marching through grids (as in Wolfenstein 3D) as not working for the arbitrarily positioned and angled walls, the usual way of using grids for ray tracing is to have each grid cell hold a list of the primitives that overlap it (many-to-many). Then you march the ray through the grid and test the ray against the list of primitives for each cell. You&#x27;d often use &quot;mailboxing&quot; (i.e., tiny LRU) to prevent retesting the same primitives over and over, since adjacent grid cells would often share primitives.<p>So basically extending the Wolfenstein 3D grid approach to Doom would have mean voxelizing the map to get lists of candidate walls for each cell, but testing the rays against the walls themselves (rather than say, the voxels themselves like in Minecraft).<p>I&#x27;m not sure what the tradeoffs for memory or performance on the 386s of the time would have been, however. But I think it&#x27;s clear that while BSPs were a clever solution, they weren&#x27;t the only possible choice.<p>[1] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Jedi_(game_engine)" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Jedi_(game_engine)</a><p>[2] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Build_(game_engine)" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Build_(game_engine)</a>
评论 #40654904 未加载
评论 #40655064 未加载
weinzierl11 months ago
From my memory: In the 90, if you had anything to do with computer graphics[1] you knew about binary space partitioning trees.<p>Off the top of my head I remember two different articles from local German computer magazines (that are still in my basement) discussing and implementing them.<p>But so were many, many other ideas and approaches.<p>Not taking away from Carmack&#x27;s genius, in my opinion it was not in inventing a horse and neither in finding one, but in betting on the right one.<p>[1] If you were a programmer in the 90s - any kind of programmer - you most certainly had.
评论 #40655535 未加载
评论 #40666306 未加载
评论 #40671304 未加载
评论 #40671303 未加载
评论 #40657266 未加载
wheels11 months ago
&gt; <i>In the early ’90s, when id Software first began publishing games, the games had to be programmed to run efficiently on computers not designed to run them, computers meant for word processing, spreadsheet applications, and little else.</i><p>That isn&#x27;t really true. Games were there pretty much for all of the PC era. I was using a computer at the time Doom came out, and there were a bajillion (obviously less graphically sophisticated) games in common circulation, and gaming was a significant and widely accepted part of home computer sales.
评论 #40653458 未加载
评论 #40653527 未加载
评论 #40653463 未加载
评论 #40653426 未加载
评论 #40653415 未加载
richrichie11 months ago
I take pleasure in reminding my colleagues that ML is approximation theory and the concepts are 70-100 years old. All we have now is new hardware.
评论 #40656165 未加载
keeptrying11 months ago
I implemented a BSP based renderer too in around 1998- 2000.<p>Probably from that same paper.<p>It was&#x2F;is such a cool fun little algorithm to implement.<p>We were building virtual reality worlds 24 years ago and people are still not using it.
评论 #40654858 未加载
daft_pink11 months ago
They also created wolfenstein, which I feel was more incredible given the limited hardware it ran on.
评论 #40653390 未加载
评论 #40654700 未加载
dang11 months ago
Related:<p><i>The genius of binary space partitioning in Doom (2019)</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=33692947">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=33692947</a> - Nov 2022 (159 comments)<p><i>Using Binary Space Partitioning in Doom</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=21906051">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=21906051</a> - Dec 2019 (8 comments)<p><i>How Much of a Genius-Level Move Was Using Binary Space Partitioning in Doom?</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=21467817">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=21467817</a> - Nov 2019 (6 comments)
DFHippie11 months ago
Tangentially related: a sort of whimsical ASCII art Doom using ray casting:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;TurkeyMcMac&#x2F;ts3d">https:&#x2F;&#x2F;github.com&#x2F;TurkeyMcMac&#x2F;ts3d</a><p>Full disclosure: TurkeyMcMac was my son. He wasn&#x27;t much of a gamer, but he was a pretty good programmer. He wrote this in high school.
评论 #40653794 未加载
评论 #40655520 未加载
评论 #40655033 未加载
phkahler11 months ago
My preferred structure is the octtree over the BSP. or I guess for Doom it could have been a quad-tree. No surface splitting, and delete&#x2F;re-insert for moving objects is possible. But I can claim to have known that until several years after Doom came along.
评论 #40655128 未加载
hnthrowaway032811 months ago
Reading the development history of the graphics engine of DOOM and especially QUAKE, it&#x27;s a demonstration of John Carmack&#x27;s perseverance.<p>He would try a lot of algorithms until he hits something genius enough to solve the problem. I have a feeling this is the situation when you dig in something so hard that solution eventually comes to you.
评论 #40655505 未加载
rasz11 months ago
Carmack:<p>- develops Wolf 3D<p>- develops Doom, realizes there is more optimal algorithm for Wolf 3D, implements it for SNES port<p>- develops Quake, realizes there is optimal algorithm for Doom allowing for zero overdraw. Sadly never implemented or documented further than a footnote in Abrash book, maybe portals like in Duke 3D?
brcmthrowaway11 months ago
Weird article. Everyone stands on the shoulders of someone else. Even North Korean Linux