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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Rustenstein 3D: Game programming like it's 1992

351 点作者 facundo_olano超过 3 年前

16 条评论

gh123man超过 3 年前
Ray casting is close to my heart as it&#x27;s easy to understand and has a very high &quot;effort to reward&quot; ratio, especially to someone who is new to graphics programming. I built a game + engine around ray casting portals [1] (think the game Portal). It was a lot of fun trying to figure out how to bounce rays around a scene and intersect with different objects in the environment and immensely satisfying to have built the whole engine from the ground up. Though I&#x27;d probably not do it again. Your top-down ray debug view is very similar to one I came up with!<p>Some of the interesting bits of the engine are open source: <a href="https:&#x2F;&#x2F;github.com&#x2F;gh123man&#x2F;Portal-Raycaster" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;gh123man&#x2F;Portal-Raycaster</a><p>1. <a href="https:&#x2F;&#x2F;blog.sb1.io&#x2F;gateescape&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.sb1.io&#x2F;gateescape&#x2F;</a>
评论 #30186547 未加载
评论 #30187449 未加载
fabiensanglard超过 3 年前
That looks great. I actually wanted to do a port of an id game in Rust for the longest time but never managed to find spare cycles.<p>I would add to the list of feature to tackle next:<p>- Convert from 320x200 aspect ratio to 320x240 aspect ratio. You can do that by converting from 320x200 to 1600x1200. This is easily done with x5&#x2F;x6 which give you the same aspect ratio as 320x240 and you get no pixel selection artifacts.
评论 #30184537 未加载
markus_zhang超过 3 年前
I&#x27;m wondering if anyone develops a spinoff exactly as back in 1992.<p>You know, it would be interesting to follow the Carmack&#x27;s route: start from Apple ][ programming for a couple of Ultima and Wizardry spinoffs, port them to PC. Then move to 80286 to make a scrolling engine for a double trilogy, and move up to 80386 to make a Wolfie clone, and continue from there. The point is to use real world machines or emulated env for development. One can probably learn a LOT programming by that way, although much if it is irrelevant in modern gamedev...
评论 #30184094 未加载
评论 #30187237 未加载
评论 #30184497 未加载
dormando超过 3 年前
Looks like the engine is missing the fish-eye correction in the ray-cast calc. I love writing these engines for fun :)
评论 #30188122 未加载
评论 #30190445 未加载
alkonaut超过 3 年前
Is there a limit when looking at retro games when the retro-ness becomes a burden rather than &quot;old games is simpler&quot;? Obviously if you move too far back in history you end up with basically game specific hardware, long-dead assembler code. In the original wolfenstein it seems there is a bunch of code relating to things that manage weirdness that we no longer care about (paging, legacy graphics handling) which obscure the actual game.<p>Was there a &quot;peak&quot; in simplicity when games were at their simplest for a reader from 2022? That is, they are modern enough to not be obscured by historical weirdness yet still simple enough to be approachable? Perhaps Doom is simpler to understand than Wolfenstein for this reason?
评论 #30189993 未加载
评论 #30227132 未加载
评论 #30190571 未加载
tyrells超过 3 年前
Saw this recently too: <a href="https:&#x2F;&#x2F;mattiasgustavsson.itch.io&#x2F;dos-like" rel="nofollow">https:&#x2F;&#x2F;mattiasgustavsson.itch.io&#x2F;dos-like</a><p>&quot;dos-like is a programming library&#x2F;framework, kind of like a tiny game engine, for writing games and programs with a similar feel to MS-DOS productions from the early 90s.&quot;
ahuth超过 3 年前
Adding my own raycasting implementation, in... what else... React&#x2F;JavaScript -&gt; <a href="https:&#x2F;&#x2F;huth.me&#x2F;raycast&#x2F;" rel="nofollow">https:&#x2F;&#x2F;huth.me&#x2F;raycast&#x2F;</a>
评论 #30184093 未加载
superfamicom超过 3 年前
There was a more recent Kickstarter that got my interest in the DOS style games restarted: <a href="https:&#x2F;&#x2F;www.kickstarter.com&#x2F;projects&#x2F;eniko&#x2F;coding-history-3d-from-mode7-to-doom" rel="nofollow">https:&#x2F;&#x2F;www.kickstarter.com&#x2F;projects&#x2F;eniko&#x2F;coding-history-3d...</a>
评论 #30227198 未加载
nyanpasu64超过 3 年前
I wonder how practical it would be to create a Wolfenstein 2D with the same level design, but played in top-down view.
评论 #30185337 未加载
评论 #30185222 未加载
评论 #30184961 未加载
abrookewood超过 3 年前
&quot;a “Carmack” compression, which is John Carmack’s variant of the LZ (Lempel-Ziv) method. According to the Black Book, without much access to the literature, Carmack would “invent” an algorithm to later find out that someone else had done it before.&quot;. Wow, he really is amazing.
filereaper超过 3 年前
I&#x27;m guessing the infamous inverse square root algorithm was used originally for ray-casting described in the article?<p>Fast Inverse Square Root: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=24959157" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=24959157</a><p>Excellent article btw.
评论 #30184042 未加载
评论 #30183776 未加载
dannyincolor超过 3 年前
A direct link to the source code, for those interested: <a href="https:&#x2F;&#x2F;github.com&#x2F;AdRoll&#x2F;rustenstein" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;AdRoll&#x2F;rustenstein</a>
评论 #30189663 未加载
pjmlp超过 3 年前
I guess using Rust kind of fits the boots of Turbo Pascal for 1992.
评论 #30184062 未加载
5-超过 3 年前
see also: a series of posts (with accompanying code) on rewriting the doom engine from scratch:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;amroibrahim&#x2F;DIYDoom" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;amroibrahim&#x2F;DIYDoom</a>
lkxijlewlf超过 3 年前
Is there anything like this for Voxels (what&#x27;s used in Roblox, MineCraft,etc)?
评论 #30184779 未加载
评论 #30191434 未加载
评论 #30184384 未加载
atum47超过 3 年前
I&#x27;m a sucker for wolf 3d technology... Great job!!!