 |
|  |
 |
|
Lemmy
|
 |
Bubblewrap
Dec 2000 time: 06:19
|
|
quote: I have to agree with this one... Civ3 is a TURN BASED strategy game. Keeping that in mind, think about other games strategy games you've played (assuming TBS games aren't the only you play) like the Command & Conquer genre, Age of Empires, etc. They work in real time, and do a pretty good job of it, without the 45 sec to 2 min lag between moves that you see in Civ3. |
you can't be seriuos to actually compare civ3 performance to aoe performance, the only thing they got in common is unit movement, and even that has many differences. Civ3 has so much more things to do.
First there are the cities, every turn lot's of thing have to be calculated for them, e.g. happines, production, production bonusses from building, building upkeep, research bonusses etc... now that's just if there are only human players, now you got the AI, this is way more complex than any rts game (except for RoN Maybe ) cos they got too worry about borders, diplomacy, high lvl strategies, low lvl strategies, what buildings to build etc... and everytime there is a change, lkike the AI loses a city, all of those strategies may have to be rethinked.
maybe firaxis should replace the "please wait" with somethin else, so people will know what the cpu is doing, like "calculting paths", "calculating turn for city xxx", or "planning AI strategy for civ xxx"
what comes down to is this, don't compare rts performance woth tbs performance, rts is meant to be fast, tbs is meant to be strategic/realistic.
|
|
|  |
 |
|
Ethelred
|
|
quote: Originally posted by twistedx
Without having access to the code, the best I can do is speculate that there is a single-threaded engine that decides unit movements and strategy. Real time games are multi-threaded in that respect... You don't see the AI in Age of Empires taking two minutes to figure out where to individually move its units because the multi-threaded engine allows calculations for many units at the same time. -- twistedx |
Since when does multithreading create more processor time. Multi threading certainly would help people with multiple processors. There is overhead to changing threads and for everyone with a single CPU all the threads must go through the same CPU.
What multi-threading does is allow the user to do something at the same time the AI is doing other things. It still entails sharing CPU cycles though.
|
|
|  |
 |
|
Soapyfrog
|
|
Montreal, QC, Canada
Nov 2001 time: 00:19
|
|
Besides, the AI movement code would have to be single-threaded... the decision to move a unit, where, how far and so forth is usually dependent on the movement of the previously moved unit... can't calculate the movement for both simultaneously since one is dependent on the other...
They are not ALWAYS dependent, of course, but often enough. In any case the AI should play like the human... one unit at a time.
|
|
|  |
 |
|
nbarclay
|
 |
Huntsville, Alabama
Dec 1999 time: 23:19
|
|
The thing that makes pathfinding so complex in Civ 3 is all the different movement costs. Worse, raliroads can potentially make a very, very long path "cheaper" than a short one. And the little matter of rivers and fast movers before Engineering adds yet another bit of complexity. If RTS games don't have those complexities, pathfinding is VASTLY simpler. Similarly, the whole RTS concept tends to favor speed over perfection, whereas TBS games place a higher premium on making the best moves possible even if it takes a little longer. So having an RTS AI make suboptimal decisions quickly is more acceptable, and more in keeping with the spirit of the game.
I'd be very interested to know what kind of pathfinding algorithm Firaxis used, whether they stuck close to Dijkstra's Shortest Path Algorithm (the one commonly taught in Computer Science classes) or whether they came up with a lot of good optimizations based on the nature of the game. For example, for pathfinding purposes, an entire friendly rail network should be treated as a single point. Taking advantage of that optimization would make many pathfinding operations trivial late in the game no matter how big the map, while without that optimization, the huge number of equal-cost moves would significantly increase the time required for Dijkstra's algorithm. Similarly, finding the shortest path from a rail network to a destination not on the network would best be done in reverse, since doing the search backwards gives only a single point to start the search from instead of potentially dozens of equivalent points. (Finding the shortest distance between two unconnected rail networks would be a bigger problem, since both networks have multiple entry/exit points, but such distances/routes should need to be recalculated only when workers have completed a movement-affecting improvement since the last recalculation.
I can easily see how path-finding could be no problem at all on standard maps but a huge problem on huge maps, because the increase in complexity with map size is a lot worse than linear. As for how good or bad Firaxis's algorithm is, I'd have to see the algorithm to do more than speculate, but the fact that the big slowdown comes after railroads does leave me a little suspicious of possible missed opportunities.
Nathan
|
|
|  |
 |
|
dunk
|
 |
Philadelphia, PA
Mar 2002 time: 00:19
|
|
quote: Originally posted by The Rook
I'm not any kind of engineer, but I notice when it's the AI's turn, it likes to move units around for no apparent reason. These are the units you see moving near the borders. I can only assume the AI is moving all it's units, not just the ones I can see. Yes, I realize there is an option to turn off the "view enemy/freindly moves," but that just stops you from seeing the move. I don't think it stops the units from moving at all. So what's the AI doing with these units? It seems to me, this is ineffecient code. The AI should just put units on Standby, like the human players does, until needed. |
I think has always been a problem with AIs. Not just in Civ. Play an old D&D game. It'll take you 30 minutes to kill a band of kobolds or orcs when you get advanced in level. All of them move every turn unless they are blocked in, even if there is no way they can get to your characters.
And, yes, the AI moves just about every single unit every single turn. I think fortified ones and workers working are the only ones who don't move. AIs have always done that. I think the issue here is that Civ II had that problem as well, but it didn't take minutes for your turn to come up again. I'm not very concerned with the delay, it's not that long on my machine.
It's very frustrating to watch AI Jaguar Warriors run in 2 triangles every turn ending in the same spot they started every turn.
I wonder how the AI determines what each unit will do each turn. That's a lot of computing. Even if a unit is sentried, the computer has to pass over it and say, "Ok, Mr. Worker, do I have anything for you to do? (Yes / No)" And to make that determination, the AI has to look all over the map and determine if our worker has any irrigation, mining, road-building to do.
Since unit movement is how the turns are based in Civ, I think this would be what the AI does with each unit. Why they move in circles constantly, I don't know.
|
|
|  |
 |
|  |
All times are GMT. The time now is 05:19. Apolyton Time is 00:19. |
top of page
|
| archivepost |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|