Live data from Hacker News

1500 Archers on a 28.8: Network Programming in Age of Empires and Beyond (2001)

gamedeveloper.com

181–189 of 189 posts

Re: 1500 Archers on a 28.8: Network Programming in Age of Empires and Beyond (2001)

#181

> Cheating to reveal information locally was still possible, but these few leaks were relatively easy to secure in subsequent patches and revisions. I don't understand this. Running the whole simulation locally on both ends means that a modified client would have access to the whole game state, and I don't really see how you could patch that out. Anyone have any idea what they actually did? Try to detect modified cli…

One of the unofficial solutions used in Warcraft 3 was to spawn an illegal 3D model object in the corner of the map by a trigger as soon as the map begins, or during random spot checks during the map gameplay. The model would crash the game (and world editor, that's why we have to spawn it during runtime) when displayed, but it wouldn't get displayed when under fog of war, so you'd put it in a place that is impossibl…

That's cool. AoE2 scenarios sometimes had a different kind of anti-cheat, preventing players from deleting buildings that would otherwise count as points to enemies who raze them. That relied on a lot of complex triggers that I think involved spawning birds to keep count of things.

Re: 1500 Archers on a 28.8: Network Programming in Age of Empires and Beyond (2001)

#182

> Cheating to reveal information locally was still possible, but these few leaks were relatively easy to secure in subsequent patches and revisions. I don't understand this. Running the whole simulation locally on both ends means that a modified client would have access to the whole game state, and I don't really see how you could patch that out. Anyone have any idea what they actually did? Try to detect modified cli…

As long as users are running the game on their own computers, preventing that type of read-only cheating is not possible. "Solutions" to this problem come in the form of invasive spyware, such as Warden (Blizzard), Easy Anti-Cheat (Epic), Vanguard (Riot), etc. These are programs that run with the highest possible priviledge, inspect all memory/storage/devices/input, and report what they find to a server.

Run entire game on server, send stuff to clients, get inputs from clients. Or full-on stream the game like Stadia (RIP). Which is hard with low-spec hardware.

Re: 1500 Archers on a 28.8: Network Programming in Age of Empires and Beyond (2001)

#183

As someone who fixes up old games in my spare time, and Age of Empires II being one of them, I'll provide a bit of trivia about the game's internals: - The AI system is not part of the deterministic simulation. This was surprising to me, and after contacting one of the original programmers it was explained that it was due to a desynchronization bug that the "AI and network programmers weren't able to fix it in time".…

> I'll note that I've restored AI being deterministic in my project.

Are you the OpenAge author, or maybe Voobly? I've never read such detailed info on AoE's internals online. Thanks for the post.

> In practice, contemporary Intel/AMD chip families produce bitwise the same result, however those around the time of AoE are known to diverge on results to some small margin

That little bit of validation I needed for why I avoid AMD CPUs. (not entirely serious)

Re: 1500 Archers on a 28.8: Network Programming in Age of Empires and Beyond (2001)

#184

Earlier quoted context omitted.

I'm of the opinion that it's an acceptable concession that a brief pause occurs in gameplay to permit another player to recover from transient issues (network hiccups, brief machine resource starvation, or generally: stalling ) in favor of fairness rather than punishing the player too harshly for factors that are frequently out of their control. Consider for instance the situation where-in one player's simulation ent…

The spiral of death trade-off does not happen as you describe. While a client is catching up, you run the sim in a loop and don't render the game. The deterministic simulation code is only a small part of the overall game logic, and you can run it much faster than real time. If a client is slow enough to genuinely experience a spiral of death, the game will not be playable for them, and "mild annoyance of brief pausi…

The simulation is, rather obviously, what's being referred to with the spiral-of-death -- it's not unusual for instance in Age of Empires II to encounter transient periods where-in steps take an order of magnitude or more than the period they're simulating on less-capable machines (due to some O(n*n)'s in the AI system).

In the end this is still a decision regarding how to handle player's falling behind; too far and they're effectively taken out of the game as they're no longer interacting within a sufficient approximation of the current state.

Under what design is "high ping" going to cause the game to run at lower "speed"? The only possibility I can see is where-in the turn period is, for some bizarre reason, also the granularity of the simulation step and you're also adapting the turn based on player latency (in aid of fairness, usually)

Having implemented such a system myself, a few times now, it has in practice performed sufficiently well.

DE is garbage in general so it's not really a fair comparison.

Re: 1500 Archers on a 28.8: Network Programming in Age of Empires and Beyond (2001)

#185

As someone who fixes up old games in my spare time, and Age of Empires II being one of them, I'll provide a bit of trivia about the game's internals: - The AI system is not part of the deterministic simulation. This was surprising to me, and after contacting one of the original programmers it was explained that it was due to a desynchronization bug that the "AI and network programmers weren't able to fix it in time".…

> I'll note that I've restored AI being deterministic in my project. Are you the OpenAge author, or maybe Voobly? I've never read such detailed info on AoE's internals online. Thanks for the post. > In practice, contemporary Intel/AMD chip families produce bitwise the same result, however those around the time of AoE are known to diverge on results to some small margin That little bit of validation I needed for why I…

No, I'm quite the outsider to the community having only been involved in the game for a few years (besides as a teenager when it was released) and working alone.

The project in question --a platform for AoE2 multiplayer /w general game improvements-- is currently under development, although the core game/MP has been functional for over a year now and our little beta-testing group plays regularly.

Re: 1500 Archers on a 28.8: Network Programming in Age of Empires and Beyond (2001)

#186

As someone who fixes up old games in my spare time, and Age of Empires II being one of them, I'll provide a bit of trivia about the game's internals: - The AI system is not part of the deterministic simulation. This was surprising to me, and after contacting one of the original programmers it was explained that it was due to a desynchronization bug that the "AI and network programmers weren't able to fix it in time".…

How are you able to work on the game? Are you employed to do so? Do you reverse engineer? Or has the source leaked?

Reverse engineering (which is not actually something I particularly enjoy doing frankly)

Re: 1500 Archers on a 28.8: Network Programming in Age of Empires and Beyond (2001)

#187
post #171

Earlier quoted context omitted.

> Shame they made the remakes Windows-only. They run brilliantly through Steam on Linux, fwiw.

Sorta. You have to mess with the DLLs and Proton settings to make multiplayer work, and even then it's laggy. It also works in Wine on Mac in some cases, but for me it always had problems.

Never had to mess with anything for multiplayer AoE (or any other so far). That was in the before times, remember transgaming?

Re: 1500 Archers on a 28.8: Network Programming in Age of Empires and Beyond (2001)

#188

Earlier quoted context omitted.

The spiral of death trade-off does not happen as you describe. While a client is catching up, you run the sim in a loop and don't render the game. The deterministic simulation code is only a small part of the overall game logic, and you can run it much faster than real time. If a client is slow enough to genuinely experience a spiral of death, the game will not be playable for them, and "mild annoyance of brief pausi…

The simulation is, rather obviously, what's being referred to with the spiral-of-death -- it's not unusual for instance in Age of Empires II to encounter transient periods where-in steps take an order of magnitude or more than the period they're simulating on less-capable machines (due to some O(n*n)'s in the AI system). In the end this is still a decision regarding how to handle player's falling behind; too far and…

Transient periods is the point - for a client to enter a spiral of death, the simulation is running slowly enough that a client can't keep up, even if it's all they're doing. If a client enters this state, it's simply not going to be able to run the rest of the game, and it's out of the match regardless of what you do unless the game slows down permanently for everyone.

If you could simply wait a few seconds for them to catch up, they'd also be able to catch up without a global pause.

In any case, we're going in circles. I came to this thread to claim that "If one person lags, everyone lags." is not intrinsic to this kind of net code, and you disagreed. Company of Heroes and my own games are existence proof of my claim. I'm not really interested in arguing about it any more - millions of players can't be wrong.

Re: 1500 Archers on a 28.8: Network Programming in Age of Empires and Beyond (2001)

#189

Earlier quoted context omitted.

Oh man I discovered Spring about 15 years ago. Never dug into the engine but wrote a couple Lia scripts. Great engine. Good times.

You are not by chance the guy responsible for the commando-sneak widget? Computes the view circles of know units, sneaks a whole army single file into enemy territory by chosing a out of sight route?

No but that sounds fun! The best one I made was a really hacky script called followmouse that would constantly tell selected units to move towards the cursor. It was for microing around defenses and whatnot.
Post reply on HN