Memory-fix by Harkonnen is out!

Harkonnen...

Just wondering, any word from Firaxis or 2k regarding your work, or is it too soon to expect some kind of response?

After seeing the effects on my own system Im ready to sound the charge of the light brigade in your honor if they dont get some kinda kick in the head jumpstart. :D

Im not much of a technical kinda guy, I just read the install instructions for a fix and go. From what I gather, and correct me if Im wrong, its basically a memory reservation problem. Or rather, a lack of knowing what is being stored and thus an "overstorage" of items in memory. Is that the case? If so, and if I am again understanding what you did, then you forced a memory reserve. It would seem then that the scan for whats in memory or a knowledge of what is being stored is the issue. Or am I looking at it wrong? Laymens terms would be helpful in any response you might give hehehe.

And awesome work and my thanks btw!!

ps...I tried to read as many of the pages as I could but Im crashing here...its 1 AM =)
 
I installed your patch, looks like it works some wonders..but the graphics for tech icons are very blur, so i will change some setting back to medium.

Anyway, what settings do you recommend for me for the harkonnen.ini:

ram: 512mb
video 256mb


anyway, just wanted to thank you for some awesome work
 
All

Just spent the last hour reading through this thread

It`s obvious that this guy`s work has had a MAJOR impact on the game peformance.

No doubt that Firaxis (or Take 2) will at some stage implement this fix into a future patch - the worry for me is that they will code their own, based around the contents of this thread and that the good guys (in this case Harkonnen) go unrewarded.

I think it would be nice for CF to start a headline thread (are they called stickys?) where the end user (ie. the paying public) can lobby Firaxis / Take 2 to ensure that in this case, credit goes where credit is due.

After the games initial problems, I am sure many prospective buyers are reading these forums waiting for the game to become stable and playable on the specs it is advertised at - I think Harkonnen has brought that stability and Firaxis will reap the financial rewards.

LET`S MAKE SURE FIRAXIS KNOW!!!!!!!!!!!!!!!!!!!!!!!!!!!

:worship: :worship:
 
Have installed it today and it works great.

Gamespeed on large maps at the end of the game (after 2000 AD) now is good instead of "a bit slow" and the speed at the beginning of a new game on huge map now is rapid.

I also saw a change in mem usage after returning to desktop.
Normally Civ IV is very reluctant to release this mem after I exit the game. It will stay at 7% for a very long time. It still has a process named Civ IV within the list opf processes and only ending this process would release the mem used [if you don´t do it manually, it takes eternities (more than 15 mins) till it is released by the system]
After the Harkonnen Patch the mem used by civ gets released within less than a minute.

Great work, Harkonnen :worship:
 
Thanks Harkonnen!

I shouldn't have used insane mode. As soon I turned it off, it stopped swapping. I've set vid_mem_usage = 40 and it works wonders. Swapping is completely gone.

And thanks for pointing out the smartgart thing. It seems it had been turned off when I updated my drivers.
 
Just wanted to give a tip on finding civ4.ini ... on my PC it was actually named "CivilizationIV.ini" .... easiest way to find it is just do a search on "civ*.ini" and it should come up (That symbol is an asterisk ... to get it hit Shift - 8)
 
I just double-click '_Civ4Config' shortcut within Civilization IV folder.

(more replies on questions in last 2 pages are coming)
 
Chopperhead
So, you didn't activate my fix in this case... You need to select 3 files (two .dll and one .ini file). Either by ctrl-clicking 3 of them or by clicking first of them and then shift-clicking last of them, so that all 3 files are selected.

Then you must copy them (right-click on any of them, left-click copy in popup menu). Then paste them (FILES!) into Civilization IV folder, e.g. right-click in folder empty space and left-click Paste in popup menu (you have spotted folder location correctly).

If everything is correct, OS will copy PatchByHarkonnen.dll, Harkonnen.ini and will ask if you want to overwrite 'zlib1.dll', you must answer YES.

After that you may give it the first try by simply starting Civilization4 via its shortcut. Note that double-clicking savegame isn't currently working if you loaded saves this way.

(I am sorry if it contains more details than needed... I am just interested in everyone to get it working. By 'working' I mean actually improving things, and not causing more trouble than benefits)
 
I have 512 RAM Intel Celeron 2.4 GHZ and GeForceFX 5200 128MB/BIT. After installing the patch, the game works better. I can finally play standard map without all this stutter and stuff. I tried the Harkonnen save file, and even though it loads and works faster/better, it is still not very playable on my computer. However, I didn't tick the window mode and low texture quality. Overall, the performance is better ! Great job !
 
ALL
Thanks to everyone for more inspiring words! :goodjob: As the energy flows in, update is being finished and polished. There is 70% chance that it will contain globe view fix as well, I have spotted the problem, but still haven't come to a rocking solution.

MadMaligor
Yes, I am tracking redundant allocations and eliminate them in non-heuristical way, i.e. it shouldn't cause problems, and it's pretty general solution which might work for many games with redundancy like this one (though I think civ4 is something special if such reduncancy was allowed in what Firaxis claims to be "official final release").

It works because civilization4 has reserve CPU resources, but suffers from memory allocations. I made it more ballanced (but it wasn't very easy to avoid opposite disballancing against CPU after the fix...).
 
Harkonnen said:
Bast
Try 'vid_mem_usage = 120', 'insane_mode = 0'. This might get a little slower, but more stable. Hope that helps...
Ok I tried this set up and loaded up that saved game again just to test. I played a few turns it was ok (no crashes) BUT when I zoomed out to the globe view it took about 10 seconds. It never used to take that long and the transition was smoother without this patch.

What I'm overall finding is that although some aspects of the late game have become quicker, it has come at the expense of others. :(
 
ThERat
Well, 'low' settings are recommended for 512Mb+128Mb systems (ram+video). Your system is better, so you may use high settings.

I recommend 'vid_mem_usage = 160', 'insane_mode = 1'. I recommend either windowed mode or full-screen mode without alt-tabbing.
 
Bast
Globe view is known issue. Though with my system it is slow both with and without my patch, so I haven't noticed it before releasing. This gonna be fixed either tomorrow or next week.
 
Harkonnen said:
Bast
Globe view is know issue. Though with my system it is slow both with and without my patch, so I haven't noticed it before releasing. This gonna be fixed either tomorrow or next week.
Ok thanks. :) I'll keep checking this thread out. Right now, I've reverted back to normal mode. I need more saved large games to test my computer out on. I'm sick of having to load this saved game.
 
Pendle Witch
Well, the idea was born about 3 weeks ago, and all those 3 weeks I was implementing it avoiding many slow-downs, BSODs and other pleasures of system programming... So I don't think Firaxis is going to fix it easily.

Also there is "Pirates!" game which uses same engine and suffers same problems (though not so serious). But it's quite long on the market, and no fix so far.

I was expecting to see this fix in 1.09 and, to tell the truth, I wasn't very happy that my weekly efforts might die in vain. Well, 1.09 didn't fix anything regarding memory usage, at least with my system, so my efforts continued.

I don't know why Firaxis haven't contacted me yet (I will do that myself when I release update). So far I see 3 possible explanations to that:

1) They will do so after this weekend themselves, just they looked after this thread to see if it's worth the effort.

2) Firaxis programmer who is responsible for graphics engine is also the only one who seeks forums for information on that, crash reports for example. So I think he might avoid reporting that some russian jerk has solved a problem with binaries which he couldn't solve with game source by hand.

3) Firaxis doesn't think memory usage is a big problem, i.e. that's not an issue to be fixed and to spend money for. Well, actually "Take2" is sooner to think so... developers differ a little from distributors in their attitude to quality vs. quantity. They had a lot of reviews on or before release date and that's why they had their sales... Though, lazy supporting after that makes me scaring for the future if CIV5 and SMAC2. Pirates! my suffer too.

Well, I don't know the truth about all that. Time will tell. Christmas is soon, and many boxes will be opened that day. I hope Firaxis/Take2 understands that (and reads that :)), so it's better be bought now than then.

All
Please don't think that I am releasing, posting links and supporting all of that just to sell this fix to Firaxis. That wasn't my drive during development, but it's kinda waste not to use this opportunity :) Also, if they will allow me to place my fix in-game-source, it will give more benefits than it does now acting at Direct3D layer.
 
Bast
You may my try my 1961 AD savegame (see link in post #1). So far it was the largest non-modded savegame I had to load. I.e. if it runs fine there, it should run fine anywhere.
 
Harkonnen that game is only 726kb. My saved game that I've been experimenting on is 1048kb. But I'll try it anyway. Are there still wonders to be built? I want to test out wonder movies in the late game.

Because the last wonder I built "Space Elevator" was stuttering.
 
Rheinmetall
Hmm... insane_mode might be slower in some specific cases, but it shouldn't cause swapping...

1) Did you turn on smart-gart before or after turning off insane mode?

2) Does you video memory is shared with system memory? Some notebooks work this way.
 
Bast
Yes. There is broadway being built right after hitting Enter, and space elevator within ~10 turns.

Broadway sometimes was stuttering (2 sec normal, delay, 2 sec normal, delay), but sometimes it performed perfectly like it was be an intro movie for those who don't have problems with it.
 
Back
Top Bottom