Live data from Hacker News

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

gamedeveloper.com

141–150 of 189 posts

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

#141

Earlier quoted context omitted.

Are these players interacting in any way? If they aren't then it could be more tolerable, but one player being more than several seconds behind others is going to lead to a rather undesirable experience, especially in the middle of a battle (and having most of their commands dropped due to being invalid equally so)

Giving the undesirable experience to one player is strictly superior to giving it to all of them. There just aren't many modern multiplayer games where slow players can negatively impact the experience of others, and that's because the industry has learned how terrible the experience is. And that's for players playing in good faith on bad connections - abuse by inducing latency was a big thing in the past. Think a pl…

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 enters the spiral-of-death, under the policy that you're proposing this player is effectively removed from the game; I would say this is a substantially worse trade-off -- I know that I would personally prefer some mild annoyance of brief pausing as opposed to a player leaving the game (and in session-based games, as RTS's generally are, a team-mate leaving often ruins the entire game)

Abuse is indeed a problem that most games I've seen of this nature don't address, and while there's no perfect solution, it can be quite effectively curtailed. In the systems I've designed, the basic principle is that each participating player has an allocated amount of wait time which serves as a quota that is charged while-ever the game can progress/run, but cannot, due to them being in a wait-state (connecting/loading/reconnecting/stalling/explicit pausing/whatever). There's some extra logic for handling the oscillation of wait-state.

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

#142

Seeing stuff like this on here fills me with nostalgia. I basically learned to code thanks to a few helpful and extremely patient IRC members in the Spring RTS engine[1] community (some of whom I spot in these comment sections on occasion - hi!), and deterministic lockstep simulation for online play was one of the first ideas that totally blew my mind when I learned about it ("b-but that means all the "random" number…

The random numbers I understand, because I’ve used a similar principle to make tests deterministic. The trick is to make the same number of calls to the generator and use the same seed. The floats are really thorny though, differing subtly across CPUs. Did they just rely strategically on rounding? Make heavier use of integers?

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

#143
An RTS we developed just recently (Iron Harvest) is still based on the same basic principle. But instead of peer to peer we use a "smart" proxy server that receives the commands of all clients and sends the entire sequence back to the client. That way if one client has a high ping the other players latency isn't affected.

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

#144

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".…

> There's some "interesting" naming conventions, one being prefixing member variables names with "value" -- there's even a "valueValue". Very little consistency in general in this regard, a reflection of independence between teams working on different components.

Actually suffixing! i.e. objectsValue.

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

#145
post #40

Earlier quoted context omitted.

I understand what was said. I'm saying that sucks. I don't really care about the tiny minority of people who care about the skill ceiling within a super low level micro. RTS entices people into a strategy game. But the games are so similar that everyone but the top 1% of players will do better by simply following a predefined strategy and executing it as tightly as they possible can. And that sucks. Nudging guys a fe…

> I don't really care about the tiny minority of people who care about the skill ceiling within a super low level micro. I'd argue that most people that kept playing aoe2 online and kept it "alive" all care about that. > I'd like to see RTS games that randomize game parameters each time, requiring you to actually strategize. aoe2 already has randomised maps, I think that's why you actually get less strategy (in a sen…

> I'd argue that most people that kept playing aoe2 online and kept it "alive" all care about that.

I didn't say they didn't?

> aoe2 already has randomised maps, I think that's why you actually get less strategy (in a sense). In games with fixed maps, you see much more interesting one-off strategies (people like to call it cheese[0]) because you can plan everything down to the second. You'd plan & practice strategies on specific maps in specific matchups against the "standard" build orders. AoE2 has these types of strategies too, but since the maps are always slightly different, you can't plan your building placement etc ahead of time. There's also MegaRandom [1] which takes the randomisation to the next level. But I'd argue micro matters significantly more in that map, since you can end up in "unfair" situations where you need to outplay with micro to stand a chance.

The random maps are random within a very narrow set of parameters. They don't change the strategy. Practicing standard build orders is what 99% of players will need to do. I agree, at the very top level there is a level of strategy again. But in that grind to the top, the way you do better is by simply narrowing the time to get your first rush online. There's very little chance to actually change your gameplan.

> That's how these games stay popular for 20 years. It's like complaining about strafe jumping in quake, it's what kept the game alive all this time.

These games have not stayed popular. RTS has not done very well as a genre. You've got Starcraft and AoE2. And that's kind of it. AoM, AoE3, the shittier spinoffs, and AoE4 haven't made particularly big splashes. Nor have other franchises.

The thing is, these games are really fun to play casually, or in single player. But playing competitively where people are going to do stuff that works is so different and not compatible with what people liked when they were introduced to the series.

Consider a comparison to fighting games, where it's also a hard requirement to be obsessively deep with the game to make any progress. Fighting games have still seen a ton of success with many popular new titles.

edit: I was super deep on the AoM scene and mildly deep on the AoE2 scene; dropping off well past the title's prime but sometime before AoE2:DE

edit edit: I can also recall that the majority of online players back in the day would like the setting but seem to lose interest in playing normal maps and eventually settle on silly scenarios. It's not surprising that MOBA games have really taken off as that's what a lot of these scenarios were in some form; but worse.

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

#147
post #142

Seeing stuff like this on here fills me with nostalgia. I basically learned to code thanks to a few helpful and extremely patient IRC members in the Spring RTS engine[1] community (some of whom I spot in these comment sections on occasion - hi!), and deterministic lockstep simulation for online play was one of the first ideas that totally blew my mind when I learned about it ("b-but that means all the "random" number…

The random numbers I understand, because I’ve used a similar principle to make tests deterministic. The trick is to make the same number of calls to the generator and use the same seed. The floats are really thorny though, differing subtly across CPUs. Did they just rely strategically on rounding? Make heavier use of integers?

Don't use floats (it wasn't a 3D game) or if you have to, make sure every float is derived from an integer that's kept in sync. And don't do anything that affects simulation state based on those floats.

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

#148

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".…

> There's some "interesting" naming conventions, one being prefixing member variables names with "value" -- there's even a "valueValue". Very little consistency in general in this regard, a reflection of independence between teams working on different components. Actually suffixing! i.e. objectsValue.

Good catch, Morten :)

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

#149

Seeing stuff like this on here fills me with nostalgia. I basically learned to code thanks to a few helpful and extremely patient IRC members in the Spring RTS engine[1] community (some of whom I spot in these comment sections on occasion - hi!), and deterministic lockstep simulation for online play was one of the first ideas that totally blew my mind when I learned about it ("b-but that means all the "random" number…

Yup. That’s how networking basically worked for Army of Two. We only sent controller input over the network. Everything else was deterministic.

Just showing my appreciation for Army of Two. It was a cheesy, weird game, but my friend and I loved playing it regardless. The online multiplayer worked great!

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

#150
post #142

Earlier quoted context omitted.

The random numbers I understand, because I’ve used a similar principle to make tests deterministic. The trick is to make the same number of calls to the generator and use the same seed. The floats are really thorny though, differing subtly across CPUs. Did they just rely strategically on rounding? Make heavier use of integers?

Don't use floats (it wasn't a 3D game) or if you have to, make sure every float is derived from an integer that's kept in sync. And don't do anything that affects simulation state based on those floats.

Age of Empires 2: Definitive Edition consistently de-syncs when playing across a M1 Mac (using Windows 11 Arm or Crossover) and an x86 machine, and I suspect the difference in floating point behavior described here is the culprit: https://developer.apple.com/documentation/apple-silicon/addr...
Post reply on HN