Live data from Hacker News

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

gamedeveloper.com

131–140 of 189 posts

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

#131

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 remember using some kind of resource explorer, looking into the scripts powering the AIs. If I remember correctly, it didn't get "smarter" at higher levels, it just cheated and gave itself more resources every minute, lol.

I've heard this repeated quite a bit, and while I haven't checked the AI scripts themselves (although I don't recall/imagine there being a script facility to give oneself resources..) I can say that, engine-wise, the only handicap behavior for AI that I've noticed is:

- On the highest difficulty ("Hardest"), AIs are bestowed 500 to all resources on next-age research completion. - Work rates for researches are skewed to be slower for the lowest-difficulty setting.

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

#132

What I find interesting about the lockstep approach described here is it seems a lot of modern RTS games still use the same approach, even though the bandwidth calculations have changed radically. When developing my own RTS game I was able to fairly straightforwardly get 1000 units in combat to live stream using about 50 KiB/s bandwidth, which is nothing these days: https://www.construct.net/en/blogs/ashleys-blog-2/r…

Did those units shoot? What happens when there is a few thousand projectiles in the air, fired by those 1000 units? What about map deformations? What about map wide physic simulations, like springs tsunami water sim or the lava flows of a volcano, changing directions?

None of this should matter as long as the algorithm determining randomness is deterministic.

The bottleneck is player input which is the most overestimated bandwidth stat in gaming. It's mouse movements and a couple of keys strokes per second. Top Starcraft players are in the 300 actions per minute range, that's still just 5 per second.

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

#133

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

Sending state updates every 200ms made my spidey sense tingle. Most industrial control systems of the 90s would work on continuous 200ms polling through the network. Mostly RS485 links at 9600 baud.

The thing is that this is perfectly reasonable if your network infrastructure is known. If you have fixed bandwidth and deterministic packet sizes, then you can do math and know what the behavior will be. Determinism is good! Also this assumes the network is single purpose. Which it was! For games in the 90s it was! This isn’t bad design, it was good design for the network infrastructure people would have had at the time!

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

#134
IIRC, and I've got nearly all my emails since the nineties until now so I could find out, I sent an email to the author of that article back when I read it, I think, still IIRC, on the Gamasutra website. And he answered me: we chit-chatted about deterministic game engines, for I wrote one in... 1991! (not for a networked-game though).

The subject already came up here on HN and some posted about games using deterministic engines before AoE.

The reason I did it is I had a bug which happened ultra-rarely and couldn't figure it out so I thought a long time about this and realized a could make the game deterministic and that would maybe allow me to record the bug happening and then be able to replay it. I found that by myself: back in 1991 I had never heard of anyone writing a deterministic engine back then. So I took a few days and rewrote the engine to be fully deterministic. Sure enough it eventually caught the bug: some case where the hero would clear a level after having fired two shots at once, which was an extra (by default it only had one shot at any time). The shot still on the previous level would continue to "live", invisible, in the following level, and would corrupt the memory. Classic.

Oh the memories to see that article again!

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

#135

What I find interesting about the lockstep approach described here is it seems a lot of modern RTS games still use the same approach, even though the bandwidth calculations have changed radically. When developing my own RTS game I was able to fairly straightforwardly get 1000 units in combat to live stream using about 50 KiB/s bandwidth, which is nothing these days: https://www.construct.net/en/blogs/ashleys-blog-2/r…

> So as much as this is a fascinating piece of history and an impressive technical solution to the constraints of the time, I think modern games ought to move past it.

But why? As far as I know mega-hits like Warcraft III and it's new, updated, version, "Warcraft III: Reforged" which came out 20 years later still use that technique.

The benefits do go well beyond being able to "send" hundreds of units across the wire: a deterministic game engine allows to create tiny replay files and, very importantly, allows to find and smash bugs way quicker.

Having the next game state being a deterministic function of the current game state + player inputs is great.

What would RTS games win by "moving past" that? To do what instead? How would you then implement the replay functionality? You'd also invariably run into a class of bugs which would be hard to reproduce but which would be trivial to reproduce using a deterministic engine.

From a latency point of view you're not gaining anything either: you need to receive the other player's units position anyway. So what's the difference between receiving the hundreds of unit's position or receiving the player input that created these unit's position? Just compute them, deterministically, as soon as you get the player's input.

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

#136

What I find interesting about the lockstep approach described here is it seems a lot of modern RTS games still use the same approach, even though the bandwidth calculations have changed radically. When developing my own RTS game I was able to fairly straightforwardly get 1000 units in combat to live stream using about 50 KiB/s bandwidth, which is nothing these days: https://www.construct.net/en/blogs/ashleys-blog-2/r…

Did those units shoot? What happens when there is a few thousand projectiles in the air, fired by those 1000 units? What about map deformations? What about map wide physic simulations, like springs tsunami water sim or the lava flows of a volcano, changing directions?

Yeah, the units all shoot. One-off events turn out to take negligible bandwidth if they are cosmetic and the client can predict what happens.

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

#137

What I find interesting about the lockstep approach described here is it seems a lot of modern RTS games still use the same approach, even though the bandwidth calculations have changed radically. When developing my own RTS game I was able to fairly straightforwardly get 1000 units in combat to live stream using about 50 KiB/s bandwidth, which is nothing these days: https://www.construct.net/en/blogs/ashleys-blog-2/r…

> So as much as this is a fascinating piece of history and an impressive technical solution to the constraints of the time, I think modern games ought to move past it. But why? As far as I know mega-hits like Warcraft III and it's new, updated, version, "Warcraft III: Reforged" which came out 20 years later still use that technique. The benefits do go well beyond being able to "send" hundreds of units across the wire…

Everything I've read about the lock-step approach is that it is a total nightmare to develop - keeping games deterministic is really hard and a de-sync bug that happens out the blue after 1 hour of 4-player multiplayer is the kind of thing that is extremely difficult to get to the bottom of. Streaming everything is by comparison much easier to develop in my view since that class of problems disappears. It also allows late-joining, including spectators, as it syncs the full state of the game periodically, and it makes it resistant to brief network outages, such as going through a tunnel on a train while on cell data.

I think it's also worth sometimes revisiting the assumptions made for the current algorithms and approaches in use. The original design was for dial-up modems. The networking landscape is completely different now. Maybe some of the original assumptions are no longer valid and a different set of tradeoffs is worthwhile.

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

#138
post #103

Earlier quoted context omitted.

TCP is older than 28.8 to be fair

But then again we had 300 baud modems long before TCP was invented.

I used to have 300baud writing to a cassette (recorder) but never the modem thing - i guess they sounded the same.

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

#139
post #132

Earlier quoted context omitted.

Did those units shoot? What happens when there is a few thousand projectiles in the air, fired by those 1000 units? What about map deformations? What about map wide physic simulations, like springs tsunami water sim or the lava flows of a volcano, changing directions?

None of this should matter as long as the algorithm determining randomness is deterministic. The bottleneck is player input which is the most overestimated bandwidth stat in gaming. It's mouse movements and a couple of keys strokes per second. Top Starcraft players are in the 300 actions per minute range, that's still just 5 per second.

But parent wanted to ditch the effort for determinism.

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

#140
post #70

Earlier quoted context omitted.

The 28.8 was more than enough for me to place the article in time.

If you're old enough to know what 28.8 means

28.8mbit a second? Wow speeds were slow back then /s
Post reply on HN