Live data from Hacker News

Lessons learned while developing Age of Empires 1 Definitive Edition

richg42.blogspot.com

21–30 of 69 posts

Re: Lessons learned while developing Age of Empires 1 Definitive Edition

#21

> Assume the original developers knew what they were doing. The old code shipped and was successful. If you don't understand it, most likely the problem is you, not the code. This needs to be chiseled on a tablet somewhere.

Really great piece of advice. The "every other developer is an idiot" mentality that can be popular in some people/cultures will almost always bite one in the ass.

In general, I liked how applicable a lot of the points made in this post apply to development out side of problem space videogames.

Re: Lessons learned while developing Age of Empires 1 Definitive Edition

#23
post #10
post #7

It's a pity they aren't releasing on Steam though. Most players aren't going to buy the game from the Win10 store.

Why not? A MS account is not uncommon.

There is a stigma in the PC gamer community against Microsoft, especially after Games for Windows. "Steam or go home" sentiments also aren't all that uncommon. As for the accounts - I really don't know anyone who actually uses the MS store (whereas pretty much everyone who plays video games has a Steam account), and I interact with plenty of end-users daily. Maybe it just happens that the area I live in never adopted it, but I would still say that Steam is the better platform to try to get exposure on.

Re: Lessons learned while developing Age of Empires 1 Definitive Edition

#25
Develop strong out of sync (OOS) detection tools early, and learn how to use them.

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' input of that turn, at that moment. It'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' input, the game is OOS and that basically should never happen because the game is dead.

To detect an OOS, a client needs to compute a hash of some relevant game data (ultimately "everything" ends up being represented by the position of the units (plus a dead state)), every turn and send them with its "end of turn" message to the server/clients. If clients disagree with the value of the hash, they are OOS.

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'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.

If you dont detect an OOS after a replay, you're basically in deep shit. I mean needle in a haystack of c++ kind of deep shit. Every client needs to dump every data of every function that ever ran 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.

Re: Lessons learned while developing Age of Empires 1 Definitive Edition

#26
post #10

Earlier quoted context omitted.

Why not? A MS account is not uncommon.

There is a stigma in the PC gamer community against Microsoft, especially after Games for Windows. "Steam or go home" sentiments also aren't all that uncommon. As for the accounts - I really don't know anyone who actually uses the MS store (whereas pretty much everyone who plays video games has a Steam account), and I interact with plenty of end-users daily. Maybe it just happens that the area I live in never adopted…

Trading one monopoly for another, I guess.

Re: Lessons learned while developing Age of Empires 1 Definitive Edition

#27
post #2

I'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.

I'd equate it to the difference between restoring an old film, vs re-filming it with new actors/director etc...

Re: Lessons learned while developing Age of Empires 1 Definitive Edition

#28

Develop strong out of sync (OOS) detection tools early, and learn how to use them. 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' input of that turn, at that moment. It'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 th…

Of course if you want your game to update its state at a rate faster than the slowest ping time of the connected client then you've got problems. On LAN play you can get away with this, but over the Internet it's not as workable, especially if some players are on modem.

I remember one game that has crossplay between Linux and Windows brought down by a scheme like this, because it turns out that Linux and Windows default floating point libraries had slightly different rounding behavior, and eventually the pathfinding algorithm would zig on the Windows hosts and zag on the Linux hosts and desync the clients.

Re: Lessons learned while developing Age of Empires 1 Definitive Edition

#29
post #7

It's a pity they aren't releasing on Steam though. Most players aren't going to buy the game from the Win10 store.

Windows Store has been surprisingly fragile for me. I've bought a couple of games through it and things like turning off IPv6 will cause it to fail to download anything and spit out cryptic error codes.

But mostly I don't want my games spread across a dozen different storefronts. Keeping them all in once place is more convenient. I would probably be more open to the Windows Store if I owned an XBox and there was some kind of integration, but I don't.

Re: Lessons learned while developing Age of Empires 1 Definitive Edition

#30

I have no real experience with C/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.

Very little. Quite a few programs recieves a decent boost when compilers moved from a 386 default to 486, then Pentium 1. Since then the gains have been much smaller, unless you use the instructions on purpose.
Post reply on HN