TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Parallelizing the Naughty Dog Engine Using Fibers [video]

55 点作者 rgawdzik大约 10 年前

5 条评论

NathanKP大约 10 年前
It is interesting to see that the techniques they used were in many cases quite similar to techniques that were in use decades ago by game devs who had to struggle with much worse hardware.<p>For example they discussed how they achieved 60 FPS with a pipeline that essentially works on 3 frames in parallel: 1 frame of logic, the next frame of graphics, and the the next frame in GPU rendering phase.<p>I remember reading a really interesting book by a dev who had worked on RTS games like Total Annihilation, and Age of Empires and this was a technique that he talked at length about as essential to the performance of those games on the hardware of that time. I learned a lot from that book, including how to make efficient path finding, AI, etc.<p>It&#x27;s nice to see that fundamental techniques like that are still useful to this day.
评论 #9315748 未加载
评论 #9313166 未加载
nimish大约 10 年前
Very similar to how GHC parallelizes work items&#x2F;sparks&#x2F;threads onto native threads.
dragonfax大约 10 年前
I&#x27;ve been working with golang for too long. Everytime I watch stuff like this it just looks like they&#x27;re re-inventing goroutines, channels, and the go scheduler.
评论 #9313908 未加载
frik大约 10 年前
<i>Fibers</i> is a kind of lightweight thread, also known as <i>coroutine</i>.<p>It&#x27;s available in WinAPI since Win16 days and heavily used in MS Word. It&#x27;s also heavily used in many AAA games that use Lua 5.1&#x2F;LuaJIT, known as coroutine. And in the Go language its named Goroutine.<p><a href="http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Fiber_(computer_science)" rel="nofollow">http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Fiber_(computer_science)</a> , Lua Coroutines <a href="http:&#x2F;&#x2F;www.lua.org&#x2F;pil&#x2F;9.html" rel="nofollow">http:&#x2F;&#x2F;www.lua.org&#x2F;pil&#x2F;9.html</a> , Lua in video games <a href="http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Category:Lua-scripted_video_games" rel="nofollow">http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Category:Lua-scripted_video_gam...</a>, Go Goroutines <a href="http:&#x2F;&#x2F;www.golang-book.com&#x2F;10&#x2F;index.htm" rel="nofollow">http:&#x2F;&#x2F;www.golang-book.com&#x2F;10&#x2F;index.htm</a><p>Triva: Naughty Dog uses a Lisp&#x2F;Scheme dialect for their scripting language: <a href="http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Game_Oriented_Assembly_Lisp" rel="nofollow">http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Game_Oriented_Assembly_Lisp</a>, <a href="http:&#x2F;&#x2F;www.quora.com&#x2F;Does-Naughty-Dog-still-use-lisp-for-making-games" rel="nofollow">http:&#x2F;&#x2F;www.quora.com&#x2F;Does-Naughty-Dog-still-use-lisp-for-mak...</a>
评论 #9312850 未加载
评论 #9313010 未加载
angersock大约 10 年前
The talk about the tagged allocators and fibers kinda reminds me of Erlang. :)<p>EDIT: The use of atoms and per-process stacks which are rapidly returned to the operating environment is kinda similar to how this presentation handles the allocation of the data for jobs&#x2F;&quot;frames&quot;.