I was playing with a few friends the other day against the computer (using multiplayer online) and while I was eliminated early I noticed something very unusual in my observation of the game. After a period of time the computer armies and civilians essentially stopped doing anything. The civilians say idle, the armies basically stayed in one location waiting to get eliminated. It was really strange, has anyone noticed this also?
Were you hosting the game?
Maybe if you did set up the MP game with your elimination the AI got eliminated too.
After a period of time the computer armies and civilians essentially stopped doing anything.
In Age 1 and DE, the AI is special in that it’s not fully peer to peer in multiplayer games. It’s actually client server. We surprisingly discovered this while working on the multiplayer code (to fix it so it didn’t use DirectPlay). The AI is chock full of code that isn’t out of sync (OOS) safe.
So what this means, is that if the host leaves an MP game, the AI bits running on the other machines won’t get any more high level commands and it basically gives up. Also, this means in MP games, the host needs a beefy connection because it’s basically the server for the AI. It sends A LOT of commands to the peers. It sends so much data that I had to add compression and command coalescing to the low-level network code to make it work at all.
So in MP with AI’s, the host must stay in the game until the end.
I think it’s the only code in the sim that doesn’t care about being OOS safe, which is odd. I don’t know why they designed it way, but I will ask the original developer on Twitter and see what he says. Perhaps they did this because it made the AI code easier to write, or because they thought that the AI processing was so expensive that switching to client-server made more sense (because then a group would only need one beefy machine to run the AI).
That makes so much sense! Thanks for responding. I was hosting. It was so weird, when I was eliminated the vast majority of the AI stopped doing anything, but a couple of them still made maneuvers, these few people were probably the few that were being controlled from the other still playing players. Honestly, I was eliminated, I didn’t ''leave the game". There is no differentiation between that and quitting? I stayed to watch. Is there anyway to hand off the control of the AI to one of the players who is still alive?
Basically, the question is, is there anyway around this?
Not to my knowledge. The net code and game does support automatic host migration, but not of the AI. (Host migration doesn’t work if you click “Host as dedicated server”, however. If the host leaves when that’s checked the MP game session immediately ends.)
Although if you stayed in the game to watch, and you were the host, the AI should still work okay until you actually quit and disconnected from the session. So what you are describing definitely sounds weird.
Make sure you have one unit left where the AI can’t find it or become a spectator, but then you can’t host. On a water map you could hide a vessel in a corner.