top | item 47127490

(no title)

izacus | 6 days ago

How did games like Age of Empires and StarCraft deal with that tissue on single CPU systems? They were mostly single threaded too and with way less computational power.

discuss

order

ddtaylor|6 days ago

Starcraft 1 is well known for having an absurdly hacked together pathfinding algorithm that almost stopped the game from shipping and the bugs it created are now expected mechanics of that game, such as "worker drilling", where players can pop through specific arrangements of buildings and units.

They also make heavy use of pre-computed pathing maps (Dijkstra) and place restrictions on how that pathing map can be changed.

It's also worth mentioning it's not just the pathing that is single threaded, it's ALL of the game logic, since it all has to be deterministic. All players must agree on the input, then run ALL of the game logic with the same inputs and same deterministic functions so that they agree on the game state without having to synchronize it.

I don't really know 0ad well enough to know if the game logic is more complex than Starcraft or Age of Empires.

Also, both Starcraft and Age of Empires have struggled with lag once above the unit counts. AoE in specific has always had a lot of lag once players start to get full armies. There are well known patches for Age of Empires 2 before the Definitive Edition (DE) where people just hand optimized the binary and figured it out.