Lessons learned while developing Age of Empires 1 Definitive Edition
richg42.blogspot.com
richg42.blogspot.com
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.
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.
You can't run updates any faster than the slowest machine can run them, though, or again you stall. This was a bigger problem on Age 1 and 2 where render rate and update rate were linked. On Age of Mythology and beyond, the render rate was decoupled from the update rate, so updates could happen more slowly while animations and so forth could still look smooth via interpolation.
With enough finageling you could utilize the libgcc floating point implementation on Windows and make it consistent everywhere. Or you could take the wiser approach of avoiding floats outside of graphics code and using fixed point instead.
https://www.geek.com/games/why-gandhi-is-always-a-warmongeri...
I agree but I'd go even further: it's a pity they aren't releasing as standalone. Where are the good old days when using a locked platform wasn't required to install a game?
The age of physical discs are over, but the developer is still free to release a DRM-free version of the game independently. Witcher 3's Projeckt Red does this. You can simply enter the product key received from Steam to download this DRM free copy.
Those are resources that could go into inventing the first plane. And some superior sooner or later realizes that you are on a unimaginative crusade and cuts the lifeline, resulting in a dead market-plattform, with contract-bound studios being dragged down with the sinking ship.
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.
Unfortunately the only Steam alternatives that have some amount of IPv6 support are Humble Bundle and Green Man Gaming. Though you may as well not count Humble Bundle as accessing their website over IPv6 results in it being completely broken [1].
I would like to see Valve get with the times on their v6 support though.
In the case of Humble Bundle breaking, it seems simply because some of their CDN subdomains are IPv4-only. Since the site loads various resources from those IPv4-only endpoints, it causes everything to just break when accessing over IPv6. In a way I'd argue it's still better than your browser displaying "no valid IP address for this domain" – usually you can at least find an e-mail address at the bottom of the page to alert them to the problem.
Just checked this in Firefox and it loads completely fine via IPv6 (and I verified using the devtools that it is using IPv6).
Joke aside, i assume a month later they will release on steam. The red number sirens and the fear of pirates have convinced a lot of sailors to rock the boat.
- Friends list
- Text & Audio chat
- Cloud saves
- Automatic updates
- DLC installation
- Sales and Discounts
- Curation, suggestions, and browsing
- Achievements
The Microsoft Store has most of those, more or less, but the experience is not ideal.
The social services are tied into the Xbox app which works okay, but is quite complicated and Microsofty. Also PC gamers might not have their friends on Xbox or maybe it has their CoD friends, not their AoE friends, etc.
The MS store is not purpose-built for games, so it makes it a poor place to buy them. It's hard to find "real games" on there because you have to sift through mobile games, photoshop, movies, and Xbox controllers. Many PC stores make a big deal about sales with purpose-built home pages, best seller lists, weekly sales, event sales, newsletters, etc. The MS store does not have sales often and if they do you're not likely to hear about them. PC stores put a lot of effort into discoverability. There's personalized home pages, followed curators, recommendations from friends, and detailed search systems with a multitude of tags and sorting options. You can search for a recently released co-op action-rpg with steam controller support and sort by recent review sentiment. The MS store, by comparison, is a mobile app store on a computer.
PC Game stores are expected to have fast and reliable downloads. Steam can consistently download faster than my hard drive can write, and can reliably resume interrupted downloads. Steam can validate the integrity of game files and re-download them if necessary. Other clients seem to do fine as well. Download speeds from the MS store are reportedly inconsistent, and it has (or had) no ability to resume interrupted downloads. For weeks after the ~100GB Gears 4 was released exclusively on the MS store, /r/pcgaming was full of people complaining that the download was interrupted at 95GB and had to start over from 0.
All of these problems are solvable. I believe the download issues have been fixed. The store is already the best place to buy "Play Anywhere" titles if you have an Xbox, simply because you get it on both platforms. But MS has a long way to go to make the store pleasant to use and to win back PC gamers' sentiment.
One practically unsolvable problem is that the store doesn't exist on Linux, macOS, or Win 7, which matters to some portion of games and some portion of gamers.
Considering their focus on preserving even minute details of game dynamics... I wish they'd made an exception for pathfinding - the algorithm in the original AoE is extremely bad.
In particular, I really wish they'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's not without precedent. If they change nothing else, my number one wish would be formations like in AoE II. I can't stand the way units just swarm like ants when told to move together.
For example, if you make the pathfinding smarter, then there's a good chance you've made all AI enemies effectively more powerful and now all of the level difficulty is too high. You may also affect the strategy of levels — levels that used to have carefully crafted chokepoints that the player must notice may no longer be chokepoints with smarter pathfinding. That in turn might lead you to want to tweak the design of the level...
So no, there are no downsides to better pathfinding.
In a battle between melee and ranged units the ranged units want to maximize their surface area touching the ranged units so that all the melee units can attack at once and quickly change targets once an enemy unit has fallen. The ranged units want to minimize their surface area so that only the outer layer of the group will be attacked while every unit on the inside can freely fire on the melee units.
In an older RTS with poor pathing this meant constantly jockeying your forces around trying to either get a good surround or keeping rank. Moving your forces in certain ways could unpredictably change the formation of your units so great care had to be taken when engaging the enemy. Getting this to work out was a skill in of itself that took strategy, positioning, the ability to predict the enemies move, etc. All of this depth could take place between very small groups of very simple units.
In an RTS with perfect pathing the ranged units always move in a perfect sphere (minimizing surface area and maximizing volume) and the melee units perfectly synchronize their movements so they don't trip over each other when surrounding the enemy. Once it is decided that a group of simple melee units and ranged units will fight there really isn't much for the player to do except tell them to get on with it.
As real time strategy games have evolved along with better pathfinding, we've found out that with all things being equal, perfect pathing makes for very very boring fights. Active abilities had to be added to give the player something to do during the fight. Rock Paper Scissors type unit counters had to be added so that positioning mattered again. More AOE spells and debuffs had to be added so that another thing would force players to jockey units around.
Study the design of Starcraft BW and Starcraft II and you can see this very clearly. Certain fundamental unit matchups were completely broken by improved pathfinding such that more and more complicated mechanics had to be added to the game to give them balance and dynamism again.
Of course, this only really applies to C&C, SC, and AOE style RTS games. More modern RTS series like Men of War and Wargame don't follow this pattern because the range and lethality of the units typically far exceed their movement speeds and terrain and cover play a much larger role, but that is a whole different topic.
This needs to be chiseled on a tablet somewhere.
In general, I liked how applicable a lot of the points made in this post apply to development out side of problem space videogames.
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.
ThreeNetwork - Network sync library for Three.js
(see also https://www.joelonsoftware.com/2000/04/06/things-you-should-...)
They tell for the network and pathfinding code than redoing would have been stupid as it has already been done and was working. I guess it is the same for most of the system/gameplay code.