Are you, in fact, a pregnant lady who lives in the apartment next door to Superdeath's parents? - Commodore

Create an account  

 
Interface issues

Using Civ4 with 1.54 GHz and 256 MB RAM. [Image: lol.gif] Of course it's awful. To me, Civ4 is associated with awful performance.

A killer event : getting the world map from an AI if you haven't explored much. Just done it (again) in a personal solo game, the (large or huge ?) Earth map that was shipped with the game, and with 18 civs. The PC almost "freezed" during 10 minutes upon world discovery, and after that it was just painful... [Image: rant.gif] I guess it just means Game Over. [Image: nod.gif]

The problem is that Civ4 doesn't cost 50 euros, but around 1050 euros (game + new PC).
Reply

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
Reply

Hi,

Iustus Wrote:I have noticed a distinct lack of optimization for speed in just about every instance of the code I have seen.
I haven't looked at the code myself (have to do enough coding outside of playing games already... wink), but I already wondered how they managed to make this kind of game so slow. This is something I really dislike about modern games; they no longer care to optimize the code for speed. They put the burden on the customer: Let them buy a new machine if they really want to play this game!

I grew up with computer games for slow, non-modular systems (C64, Amiga 500). Back then, the game developers had to think about advanced algorithms to make games fast enough. Nowadays with the modular PCs, nobody cares about that anymore which I consider a waste of resources and a damn shame. But then I'm also in the minority of gamers whose main priority for a GUI is a fast response time, not more eye candy. In my view they had better left out some small details like broken algorithms to find out where an aqueduct should lead to on the display, and should have optimized the code instead. As I said, I haven't looked into the code yet, but modern software engineering and OOD offer enough ways for optimizing code without introducing unwanted side-effects and bugs.

-Kylearan
There are two kinds of fools. One says, "This is old, and therefore good." And one says, "This is new, and therefore better." - John Brunner, The Shockwave Rider
Reply

You should have seen how slow Civ4 was before the code was optimized! lol
Follow Sullla: Website | YouTube | Livestream | Twitter | Discord
Reply

I wonder if we can hunt down FoxBat for a Civ4 Accelerator Mod. lol
Reply

I've spent a lot of time staring at the SDK, disappointed by the coding standards used in development of this software (doop li cay shun clap clap clapclapclap) , and it certainly does look slow, but I wouldn't be in a hurry to clean anything up without a decent profiler handy to actually measure it. Obviously non optimal loops have a tendency to not matter even a little bit, where performance is concerned.
Reply

VoiceOfUnreason Wrote:I've spent a lot of time staring at the SDK, disappointed by the coding standards used in development of this software (doop li cay shun clap clap clapclapclap) , and it certainly does look slow, but I wouldn't be in a hurry to clean anything up without a decent profiler handy to actually measure it. Obviously non optimal loops have a tendency to not matter even a little bit, where performance is concerned.

Other than pathfinding issues (which aren't readily crunchable) there's pretty much zero in the SDK that significantly detracts from game performance. It is the graphics load, and the graphics engine, that gobbles resources like mad.

Meanwhile, any complaints about speed (from my point of view) can talk to the hand. Seriously. I played Civ1 on an 8086 turbo where it took OVER HALF AN HOUR for the computer to generate a random map and launch the game. This was in an era in which the 80286 (the next step up) was top of the line! That's a standard sized map I'm talking about (all there was), not a Huge one. Between turns in the late game could take twenty to forty minutes apiece as well. Years later, I tried on a 386 and it was like greased lightning, by comparison -- and still slower than the release version of Civ4 played on the below-min-spec machine I used all through development.

A huge map on Civ4 can be produced in about two minutes on a slow machine, with up to five minutes for a difficult, outlier instance.


The graphics are hoggy, no doubt about that. The game lacks sufficient ability to disable eye candy to streamline performance for those who care not a whit about the appearance (relative to the playing speed). These are fair observations to make, but to say that Civ4 is slow compared to some phantom, rose-colored memories of non-existant, idealized "good old days" is sheer nonsense.

I guess some of you never played Ultima games on at-the-time current computers and suffered through the overly-wrought eye candy or went out and bought bleeding edge machines just for gaming purposes. Even the machines themselves cost less (in total dollars, much less inflation-adjusted dollars) now than they did back then.


Anyway, that topic pushed a button. I've thrown in my two bits, now back to your regularly scheduled codepicking.


- Sirian
Fortune favors the bold.
Reply

Sirian, I beg to disagree with this.

I think games on Amigas/C64 (yes that's a long time ago) were faster. They were actually often better than most games these days because there wasn't much eye candy. Those games had to be great due to gameplay and yes, there were great games available at that time. Of course not comparable in their complexity, but sometimes simplycity is actually better for games.
It was terrible to work without harddiscs and have a floppy galore, but that was due to the lack of hardware and nothing a game developer could do about.

As far as I can remember, Civ1/2 played very well on my computers and I never even owned some top notch state of the art machine.
C3C could get slow at the IT, but once the UI popped back, it was very crisp without any delays. CIV4 is very slow and even in the beginning it has this slight delay whenever you want to move units. This gets worse with time of course. I dread any late game or any bigger map for that matter.
Reply

I'm quite happy with Civ IV and it runs decently on my machine. However, I do experience some slowdown, but it does not seem to be caused by the 3D graphics. For example, I often use binary science rate, which means I go from 0% to 100% research and back fairly often. To do this I have to click 10 times on the plus or minus. I can click 10 times much faster than the game updates the science rate. Recalculating the science and commerce production based on the science rate doesn't seem like something that would be slowed down by the 3D graphics engine. Other small slowdowns like selecting units (where it has to figure out which actions are available) or bringing up the city screen seem like other areas where it is somewhat unresponsive, but not because of the graphics engine's fault. The framerate when scrolling around the map seems fine, for example.

I'm not complaining-- Civ IV is one of my favorite games and is quite playable. But when I see people complaining about the lag and wishing that Firaxis had stuck to a 2D graphics engine, I think we should point out that it's not necessarily the 3D graphics that are slowing the game down for them.
Reply

I seem to be one of the few people not to experience any significant issues with the game, my 1GB of RAM handles it well (the dual core processor might be helping, not sure). I had a couple of art issues on my old machine's ATI card with 1.00, fixed by unpacking the art files (or patching the game) and I get occasional slight delays when loading bits of art (spotting a type of resource which hasn't yet been displayed early on, for instance). There's a slight delay on returning from minimised mode to fullscreen because it's all loaded back from the page file I believe, and map trades do cause an undestandable delay, but on the whole it's been fine for me throughout. I suspect that I tend to play for shorter periods than some other people, particularly late-game, which probably accounts for the lack of issues with the memory getting full of no-longer-needed assets (even more of a potential issue with large mods like FfH I guess).
He may have ocean madness, but that's no excuse for ocean rudeness!
MordorXP - freeware dungeon crawling remake in progress, featuring crazy ideas and descriptive text from the keyboard of your favourite Beefy.
Too Much Coffee Man
Reply



Forum Jump: