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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Guide to implementing 2D platformers (2012)

122 点作者 vvoruganti8 个月前

6 条评论

jonathanyc8 个月前
I like the idea of a guide like this. Reminds me of “Implementation of Hex Grids,” another high quality game-related guide: <a href="https:&#x2F;&#x2F;www.redblobgames.com&#x2F;grids&#x2F;hexagons&#x2F;implementation.html" rel="nofollow">https:&#x2F;&#x2F;www.redblobgames.com&#x2F;grids&#x2F;hexagons&#x2F;implementation.h...</a> and before that, “Beej’s Guide to Network Programming”: <a href="https:&#x2F;&#x2F;beej.us&#x2F;guide&#x2F;bgnet&#x2F;" rel="nofollow">https:&#x2F;&#x2F;beej.us&#x2F;guide&#x2F;bgnet&#x2F;</a>
dang8 个月前
Related. Others?<p><i>Guide to implementing 2D platformers (2012)</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=31450218">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=31450218</a> - May 2022 (37 comments)<p><i>A guide to implementing 2D platformers</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10202275">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10202275</a> - Sept 2015 (32 comments)<p><i>The guide to implementing 2D platformers</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=4065033">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=4065033</a> - June 2012 (2 comments)<p><i>The Guide to Implementing 2D Platformers</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=4005883">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=4005883</a> - May 2012 (2 comments)
评论 #41700245 未加载
henning8 个月前
For making the game more fun, you can then add features that are now standard&#x2F;expected like coyote time. <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=97_jvSPoRDo" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=97_jvSPoRDo</a>
teddyh8 个月前
&gt; <i>Type #1: Tile-based (pure)</i><p>&gt; <i>Character movement is limited to tiles, so you can never stand halfway between two tiles.</i><p>[…]<p>&gt; <i>Examples: Prince of Persia</i><p>That is absolutely false. You can stand on any pixel in Prince of Persia. It’s when I find stupid errors like these that I start to question the entire article they appear in.
评论 #41676225 未加载
matheusmoreira8 个月前
&gt; I believe that Mega Man actually employs infinite acceleration, that is, you’re either stopped or on full speed<p>Yeah, acceleration is essentially infinite.<p><a href="https:&#x2F;&#x2F;tasvideos.org&#x2F;GameResources&#x2F;NES&#x2F;Rockman&#x2F;Data" rel="nofollow">https:&#x2F;&#x2F;tasvideos.org&#x2F;GameResources&#x2F;NES&#x2F;Rockman&#x2F;Data</a><p>When moving horizontally there&#x27;s very small lag at the start and then he accelerates to full speed pretty much instantly.<p>When moving vertically by jumping, his speed is straight up set to some constant. There is downwards deceleration by gravity though, leading to &quot;fall faster&quot; tricks:<p><a href="https:&#x2F;&#x2F;tasvideos.org&#x2F;GameResources&#x2F;NES&#x2F;Rockman#FallingFaster" rel="nofollow">https:&#x2F;&#x2F;tasvideos.org&#x2F;GameResources&#x2F;NES&#x2F;Rockman#FallingFaste...</a>
moth-fuzz8 个月前
I’ve implemented platformer collision dozens of times now and the only way I’ve found it to be genuinely smooth is to do it one pixel at a time, just like the author suggests.<p>But something always bugs me about that - we know the closest edge of the closest obstacle, we know the vector of the player’s motion, by all accounts we <i>should</i> be able to calculate the point of contact in one go without doing any substeps.<p>And yet, doing it in one pass always seems to result in a myriad of edge cases (literal!) that break the whole thing, unless you do heavy preprocessing, converting your tiles to a graph of lined surfaces, etc etc.