Topic: Ongoing question about SP Campaign lag - help from XC folks?  (Read 4471 times)

0 Members and 1 Guest are viewing this topic.

Offline Kumerian14

  • Master of "Oh, hey, that actually worked."
  • Lt. Junior Grade
  • *
  • Posts: 38
  • Now, where did I leave those fighters?
Ongoing question about SP Campaign lag - help from XC folks?
« on: September 03, 2013, 11:57:20 pm »
I moved this topic to a new thread because (a) it's a peeling off another topic and (b) I figured other people might want to know this info without searching too hard.

Corbomite has been giving me some excellent help regarding Single-Player campaign issues in http://www.dynaverse.net/forum/index.php/topic,163393513.0.html.  He has been very gracious with his time in explaining some of his (and others') experiences with the AI map generation routines.  In addition to Corbomite's excellent advice, I have also consulted the Nuclear Wessels page, specifically the campaign customization docs which talk about modifying the Metamap.gf file.  However, there are two items that are still haunting me:

1) The build-up of lag due to AI moves, map updating, etc. over the course of a campaign; and
2) The related tweaking of AI map generation variables in ../MetaAssets/ServerProfiles/SinglePlayer/Metamap.gf

Corbomite indicated in the linked topic that to prevent "Creeping Game Lag Syndrome", he turns off a chunk of the AI routines, causing the AI to simply sit and wait for you to attack it--it doesn't attack you at all.  He indicated that this is the only way to prevent the system from slowly drowning itself in garbage data that accumulates with every AI move.  While I would like to tone down the aggressiveness of the AI regarding the constant random loss of hexes all over my territory, I would still like to have some randomness so that surprise drafting still occurs in some hexes and some AI movement occurs occasionally, thereby keeping things interesting.  However, if leaving even some of this movement in the game will eventually cause my campaign to become unstable and/or unplayable due to lag, then I want to address it now before I spend more time on a SP campaign.  I just abandoned one at 50+ missions, so I'd rather not repeat my mistake.

I did some searching in the forums and couldn't find anything definitive about this, other than mention of a potentially related problem with people running Vista.  While I'm actually running SFCOP on a Mint Linux/Wine 1.6 platform set to Win98 mode--XP mode consistently locks up--I don't see this as a Linux/Wine issue, as I've seen similar issues on an XP SP3 machine.  In the interest of full disclosure, I have also installed the 2552 update, the DLL stability package, the INI updates, the Dynaverse address patch, and the OP4.0 (non-hardcore) shiplist from FireSoul.

Is there anyone from the XC crew who can give me some additional guidance about this (with all due gratitude to Corbomite)?  I had considered "cleaning out the garbage" from the file in question (I think it's sfc2spd.sds, yes?), but I cannot open that file type on my system.  If I cannot do that, I think that only leaves me the option of tweaking the Metamap.gf settings.  Has experience and past tweaking produced a workable middle ground that is suggested for SP Campaigns in order to provide some AI randomness yet prevent eventual "freezing" over time?  Is there another option / solution that I should consider?

Thanks for any help again, folks, and my apologies for the "maximum verbosity" lately!
"Never fight a battle you do not have to win." - Captain Kumerian, Klingon Defense Force

Offline Sirgod

  • Whooot Master Cattle Baron
  • Global Moderator
  • Vice Admiral
  • *
  • Posts: 27844
  • Gender: Male
Re: Ongoing question about SP Campaign lag - help from XC folks?
« Reply #1 on: September 27, 2013, 01:11:06 am »
I am really not sure, but I may be able to direct you to a man who might know. at least, he knows more about linux than I ever will.

If you want, Please try and PM Nemesis about this. Very friendly mod, and like I said, he knows his stuff. Between him and Corbo, they will get ya going in no time.

Also, I meant to mention in the other thread, welcome to the boards, and to our small family here. It is always a pleasure to meet another person who enjoys this game.

Stephen
"You cannot exaggerate about the Marines. They are convinced to the point of arrogance, that they are the most ferocious fighters on earth - and the amusing thing about it is that they are."- Father Kevin Keaney, Chaplain, Korean War

Offline Kumerian14

  • Master of "Oh, hey, that actually worked."
  • Lt. Junior Grade
  • *
  • Posts: 38
  • Now, where did I leave those fighters?
Re: Ongoing question about SP Campaign lag - help from XC folks?
« Reply #2 on: September 27, 2013, 04:08:02 pm »
@Sirgod:

Hiya and thanks for the welcome!  I've been playing SFC and SFB for a long time, but not recently, so I didn't remember some of these issues when I restarted the campaigns.  Good to know that Corbo is a excellent source for help--he seemed to know his stuff very well.

I'll do as you suggested and contact Nemesis, but as I stated, I don't really see this as a Linux/Wine issue, as Corbo mentioned that it's endemic in the program.  The flat file will all of the AI move data just grows out of all proportion to the computer's ability to re-read it efficiently after each game refresh.

If I get some good advice from Nemesis in that PM, I'll try to post an update here.
"Never fight a battle you do not have to win." - Captain Kumerian, Klingon Defense Force

Offline Age

  • D.Net VIP
  • Commander
  • *
  • Posts: 2690
  • Gender: Male
Re: Ongoing question about SP Campaign lag - help from XC folks?
« Reply #3 on: September 27, 2013, 05:08:02 pm »
What exactly do you have installed as I recommend Pestalence's Enhancement pack as it has features that allow you to do this.He would be an excellent person to ask if Sirgod can get a hold of him.

Dizzy and Diehard are two thoers as they are server admins.It seems you are tweaking the map to much possibly which maybe causing you to lag up.

Offline Kumerian14

  • Master of "Oh, hey, that actually worked."
  • Lt. Junior Grade
  • *
  • Posts: 38
  • Now, where did I leave those fighters?
Re: Ongoing question about SP Campaign lag - help from XC folks?
« Reply #4 on: September 27, 2013, 08:47:55 pm »
@Age

Oops, sorry.  Let me clarify a bit.  I haven't actually mucked around with the AI map settings in the .gf files extensively; rather, I've been asking for information before I do any extensive modifications.  Since I'm running SFCOP under Linux/Wine, I wanted to insure that the system was stable before I did anything that might give the impression of a L/W problem.  In addition, I remember playing this on XP SP3 and the same lag issues developed over time, just as Corbomite had indicated.  After I would get through about 40+ missions as the ISC, each move / turn took longer and longer to compute, so I finally gave up, as it was becoming unplayable.

As for the Enhancement Pack, I explained part of this in the linked thread, but let me summarize (in order):

1) 2552 patch
2) Taldren bonus pack
3) Mini-updater
4) Directory server updater
5) DLL stability pack
6) INI update pack
7) OP+ 4.0 refit pack (non-hardcore)

I tried installing the whole Enhancement Pack v5.1 a few times, but when it reached Mod Chooser, it crashed out Wine, possibly because the Mod Chooser was trying to run in the background or restart so as to register all the mods.  After a bit of testing, I found the configuration that I listed to be the most stable on my system.  Since I don't play multi-player skirmishes on-line at present, I didn't need most of the other items, so I omitted them in the interest of testing.  In particular, I skipped the portion that installs the new / updated scripts, as I thought that might cause problems.

Hope this helps to clarify a few things.  Any suggestions are welcome!
"Never fight a battle you do not have to win." - Captain Kumerian, Klingon Defense Force

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Ongoing question about SP Campaign lag - help from XC folks?
« Reply #5 on: September 28, 2013, 11:28:42 am »
Kumerian-

I was thinking about what you said about wanting to still have the AI operational, but maybe slow the progress of the lock up down enough to finish the campaign and I noticed something that I never really experimented with because I was content leaving the AI off. Look at the note given in this line I told you to mod in the metamap.gf file:


MaxAIsPerEmpire = 1 // ( -1 ) Create a fixed number of AIs per empire.


It would seem to indicate that if you set this parameter to -1, it will set a fixed number of AI's at the start of the game (you may have to turn that feature back on for this). While the flat file would still fill up with useless data, it would be from a fixed number of AI that would diminish as you killed them off and no more would be created to add to the load. I've never tried it, so you would have to experiment with it to see what happens and what you have to keep switched on to get the AI to generate in the first place. Hope this helps, even though it'll be a lot of work.


Offline Kumerian14

  • Master of "Oh, hey, that actually worked."
  • Lt. Junior Grade
  • *
  • Posts: 38
  • Now, where did I leave those fighters?
Re: Ongoing question about SP Campaign lag - help from XC folks?
« Reply #6 on: September 28, 2013, 07:09:34 pm »
@Corbomite,

Hello again!  Thanks for the info--I was looking at exactly the same thing in NuclearWessel's .gf modding guides.   ;)

I actually started a test campaign recently using some tweaked values.  Here's what I tried:

(IMPORTANT: default or irrelevant entries were omitted, so don't cut and paste this as-is!)

Code: [Select]
[Census]

AttemptsToCreateAIInHomeHex = 4 // (10) Maximum AI to create in 1 turn
MaxAIsToCreatePerTurn = 2 // (3) How many AIs to try to create before giving up
MaxAIsToKillPerTurn = 2 // (10) Maximum AIs to be killed in 1 turn before ending phase
AITurnOverRate = 0 // (1)
MaxBattlesPerTurn = 20 // (50) Maximum number AI battles in a turn before ending phase
CreateAIFrequency = 2 // (3) How many AIs to create a second, untill goal level reached
KillAIFrequency = 1 // (3) How many AIs to kill a second, untill goal level reached
InitalAILevel = 150 //  (400) How many AI's to create before game starts
MaxAIsPerEmpire = -1 // ( -1 ) Create a fixed number of AIs per empire. -1 means not to use a fixed number.

[AIMovement]

NumTriesToGetACandidate = 3 // (5) Number of tries to find a target hex to move to

Now, I don't know exactly what all these items do, but based on the info in NW's guide, my logic was as follows:

AI Movement - If I limit the number of tries to find a target hex for movement to 3/5, maybe that will extend the playability by roughly 40%, as the computer won't be making as many entries into the flat file.
Census - I also hoped to decrease the accumulation of garbage data by decreasing (1) the starting number of AIs generated, (2) the number of AIs created, (3) the number of attempts to create an AI, (4) the number of AI-only battles per turn, and (5) the number of AIs killed (the last two were problematic).

As far as the MaxAIsPerEmpire, I considered setting this to a predefined amount, as that would do exactly what you said.  However, I opted for a random number (by using "-1") to see whether my other tweaks had a detectable effect.  What worried me about a fixed number was whether or not all the skirmishing would happen right at the beginning of the game, either involving me or other AI races, and that not too long into the game, I would reach a point where there were no skirmishes at all.  This is just a guess, but it seemed logical.  That being said, if my tweaks don't seem to work the way I would like, then I may do what you suggested and set a maximum number from the beginning of the campaign.

You probably know way more than I do about this, Corbo, so I'm game for any input from you.  Does my plan seem sound, or am I off-track here?  Also, does NuclearWessels hang out here?  He appears to be an excellent resource for this stuff, but I don't think that I've seen him posting lately.

What do you think?
"Never fight a battle you do not have to win." - Captain Kumerian, Klingon Defense Force

Offline Corbomite

  • Commander
  • *
  • Posts: 2939
Re: Ongoing question about SP Campaign lag - help from XC folks?
« Reply #7 on: September 28, 2013, 09:32:41 pm »
Dave (NW) doesn't come around here very often, but he does pop by from time to time. Your plan sounds good for a start. Just try to keep the number of variables at a manageable amount so you can really see what is changing and why.