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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Lessons learned while developing Age of Empires 1 Definitive Edition

277 点作者 deafcalculus超过 7 年前

12 条评论

quadcore超过 7 年前
<i>Develop strong out of sync (OOS) detection tools early, and learn how to use them.</i><p>The way lockstep work is that the clients gives themselves a rendez-vous in the future and agree to compute one turn of the game, given the players&#x27; input of that turn, at that moment. It&#x27;s very clever. The players input are sent to every clients and will be computed in the future in a deterministic way. So every client is computing the exact same game. Now if the clients doesnt compute the same game given the same players&#x27; input, the game is OOS and that basically should never happen because the game is dead.<p>To detect an OOS, a client needs to compute a hash of some relevant game data (ultimately &quot;everything&quot; ends up being represented by the position of the units (plus a dead state)), every <i>turn</i> and send them with its &quot;end of turn&quot; message to the server&#x2F;clients. If clients disagree with the value of the hash, they are OOS.<p>The cool thing with lockstep is that you can record every turn inputs (which is fairly light) and then replay the whole game - because that&#x27;s already how a game is played. So, when you have an OOS - or any bug, you can just replay the game until the OOS and try to fix it. Sometimes it doesnt work though and you may replay the game without detecting any OOS.<p>If you dont detect an OOS after a replay, you&#x27;re basically in deep shit. I mean <i>needle in a haystack of c++</i> kind of deep shit. Every client needs to dump <i>every data of every function that ever ran</i> in a log file, and then you need to reproduce the OOS and then compare the log files and then guess what caused the data to differ.
评论 #16385117 未加载
评论 #16388638 未加载
nimbius超过 7 年前
As with all historic RPG&#x27;s, The key lesson is in how you craft your C integer types. One type allows you to cleverly assign various character traits to specific groups and users, the other turns Ghandi from a benevolent peace loving icon to a harbinger of endless misery and destruction<p><a href="https:&#x2F;&#x2F;www.geek.com&#x2F;games&#x2F;why-gandhi-is-always-a-warmongering-jerk-in-civilization-1608515&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.geek.com&#x2F;games&#x2F;why-gandhi-is-always-a-warmongeri...</a>
评论 #16387648 未加载
评论 #16387752 未加载
xrisk超过 7 年前
It&#x27;s a pity they aren&#x27;t releasing on Steam though. Most players aren&#x27;t going to buy the game from the Win10 store.
评论 #16385543 未加载
评论 #16385155 未加载
评论 #16385836 未加载
评论 #16384447 未加载
评论 #16387034 未加载
adityab超过 7 年前
Looks like they want to avoid changing gameplay as much as possible.<p>Considering their focus on preserving even minute details of game dynamics... I wish they&#x27;d made an exception for pathfinding - the algorithm in the original AoE is extremely bad.<p>In particular, I really wish they&#x27;d introduce some improved ways to command groups of units. IIRC the Rise of Rome expansion introduced double-click group selection of all similar units, so it&#x27;s not without precedent. If they change nothing else, my number one wish would be formations like in AoE II. I can&#x27;t stand the way units just swarm like ants when told to move together.
评论 #16385511 未加载
smacktoward超过 7 年前
<i>&gt; Assume the original developers knew what they were doing. The old code shipped and was successful. If you don&#x27;t understand it, most likely the problem is you, not the code.</i><p>This needs to be chiseled on a tablet somewhere.
评论 #16384964 未加载
indescions_2018超过 7 年前
Love reading gamedev post-mortems such as these ;)<p>Although what author discusses is specific to Age1 engine. Time sync in webrtc peer networks encounters many of the same pitfalls. With errors tending to propagate non-linearly as more peers (and more complex scene objects) are added.<p>ThreeNetwork - Network sync library for Three.js<p><a href="https:&#x2F;&#x2F;github.com&#x2F;takahirox&#x2F;ThreeNetwork" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;takahirox&#x2F;ThreeNetwork</a>
评论 #16384945 未加载
评论 #16384425 未加载
Avalaxy超过 7 年前
I&#x27;m surprised they decided to modify the old code, I expected them to make a clean start and re-create the original experience from there.
评论 #16384551 未加载
评论 #16384111 未加载
评论 #16384020 未加载
评论 #16385092 未加载
grigjd3超过 7 年前
Not building custom containers is generally good advice. The chance you build something that underperforms is noticeable. Other coders won&#x27;t know what you&#x27;ve made. There is a fair chance that std has what you need if you&#x27;re even just a little bit thoughtful.
评论 #16388898 未加载
ztoben超过 7 年前
Fun read. I&#x27;ve always wondered what kind of experience it takes to get picked for a project like this. Seems like it would be fun.
Tyrannosaur超过 7 年前
Cool blog post, but light gray text on white is literally unreadable. How are people still doing this?
lanius超过 7 年前
Good thing they decided to keep the gameplay the same, like Starcraft: Remastered. I never played AoE 1 competitively, but if it&#x27;s like SC many bugs&#x2F;glitches became core gameplay mechanics. Here&#x27;s hoping the AoE 1 remake fares better than the one for AoE 2!
WadeJohnson超过 7 年前
I have no real experience with C&#x2F;C++ as well as game development but I always wonder what would happen if old games like these would get recompiled with an, for example, avx2 flag.
评论 #16385215 未加载