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.

Lessons learned while developing Age of Empires 1 Definitive Edition

277 pointsby deafcalculusover 7 years ago

12 comments

quadcoreover 7 years ago
<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 未加载
nimbiusover 7 years ago
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 未加载
xriskover 7 years ago
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 未加载
adityabover 7 years ago
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 未加载
smacktowardover 7 years ago
<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_2018over 7 years ago
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 未加载
Avalaxyover 7 years ago
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 未加载
grigjd3over 7 years ago
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 未加载
ztobenover 7 years ago
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.
Tyrannosaurabout 7 years ago
Cool blog post, but light gray text on white is literally unreadable. How are people still doing this?
laniusover 7 years ago
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!
WadeJohnsonover 7 years ago
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 未加载