T-hawk Wrote:4. On the F6 screen and in the city view screen, sometimes my machine stops providing all mouse rollover help text. Most occurrences are if those screens were accessed from the tech-completed or city-build-completed dialogs, but it can randomly happen anytime. Alt-tabbing away from Civ 4 and back restores the rollover functionality. Anyone else ever seen this?
I have found that when rollover text stops in the main window, often there is a nonsense rollover shown, often a worker action that will take about 1273623 turns to complete.
In ever case, selecting a unit, then rolling over the icon of a specific unit on the lower edge of the screen shows the rollover for that unit and clears the problem.
If I get around to running a DLL attatched to a debugger, I wil try to track this corruption down. If I was to hazard a guess, I would think it was a double dispose or some such.
Quote:I definately would have preferred a 2D game with a quick-responding GUI, but that wouldn't have sold so well to the eye-candy generation of modern gamers I guess.
I am not sure I agree with your diagnosis.
Having some experience with the SDK and the python codebase, I suspect that the culpret may be something other than 3D graphics.
If your game is slow all the time, tiny maps the same as huge maps, if it is slow scrolling and panning, you can blame that on 3D graphics to some extent.
But if you experience a slowdown more on larger maps, with more active civs, with more units, I suspect the problem is something else.
I have noticed a distinct lack of optimization for speed in just about every instance of the code I have seen. The coding philosophy is to recalculate everything, constantly. This does have some advantages. You can drop into worldbuilder at any time, change anything, or edit a saved game, or whatever, and things just work, because nothing is cached.
You would not believe how many thousands of times, each turn, there are loops over every plot on the map. That is why large maps have such a big slowdown. There is a geometric increase in the amount of computation involved.
Or another example, when you trigger a golden age. Lets say it is the last one you can trigger, which requires 5 great people. The game loops over every unit you have, in the order they were created, checks to see if they can trigger a golden age, if they are of a type already counted, if not, it adds them up, until it gets to the 5 great people needed to see if it should provide the golden age button to you. Then it does the exact same thing again after you click the golden age button. Then it loops over every unit 4 more times, once for each great person it is going to eliminate, checking the distance each time, to pick the shortest distance.
Some of you may know the game has a concept of an 'area', which is basically either an island/continent or a body of water, ocean/lake. All over the code, something needs to be done/checked for every tile in an area. In every case, the way this is done is to loop over every tile on the entire map, and check to see if it is in that area. This means that on a 3 land tile island, every time you do something there, like say land troops on an isle with an enemy city, there are tons and tons of loops over every tile on the map.
Now, as far as I can tell, unless you drop into worldbuilder, or perhaps are playing some mod, there is no way to change what is in an area. I wonder how much of a speed up could be had just by adding a cached list of only the plots in a specific area, and using that when iterating over the plots in an area. This can introduce bugs, if some cases are missed. Opitimizing something for speed is often a good way to introduce these type of caching bugs. But I wonder how much of a speed up you would see on large maps. Particularly when these loops are done in python, which is already going to be an order of magnitude slower.
Practically every agorithm in the SDK involves looping over all of something, loop over all the plots on the map, or loop over all the players in the game, often double loop, so square the number of players, loop over all the units, or loop over all the trade deals, and so on.
Python is another instance I think of a lot of slowdown. Civ4 is so customizable that it is constantly dropping into python and back. All of these customization calls have a time overhead. Perhaps half or more of them are never used in a non-modded version of civ.
Now, there is profiling code scattered all over the SDK, so I suspect that the Firaxians have made an effort to optimize the slowest things, and I definitely am no expert on the code. It is often the case that something which seems like it would be slow actually turns out to not be what is taking the most time. I have not done any profiling myself, I am just guessing.
That said, I think blaming the slowness of Civ4 on the 3D might be jumping the gun. There are plenty of 2D applications which are slow as well. Personally, I suspect both the extensive python callback mechanism combined with some of the game engine code to be more of a speed issue than any of the interface.
When it is taking longer and longer for the computer to finish the AI turns, you cannot blame that on the 3D interface. When you think the interface is slow in doing something, it may not be because it is slow to draw the 3D, it may be slow because it takes so long for it to figure out what to draw, way before the 3D is even involved.
To be clear, I am not criticising the code. There are all sorts of design decisions that have to be made, and I was not privy to any of them. I do not know why they decided to do things the way they did. Everything is always going to be a tradeoff. Often you can gain speed at a cost of a higher memory footprint. Perhaps they did not want to raise the minimum RAM required any further. Or it could be any number of things. All I am saying is it very well could be something other than the graphics.
-Iustus