Hard Light Productions Forums

General FreeSpace => FreeSpace & FreeSpace Open Support => Topic started by: ADDAvenger on August 08, 2007, 11:37:05 pm

Title: Random lagging
Post by: ADDAvenger on August 08, 2007, 11:37:05 pm
I can run the game perfectly (most of the time) with mediavps and all the settings up.  However, sometimes it's like my screen stops refereshing for anywhere from half a second to a second and a half, ie nothing on the screen changes, but once it wakes back up things have moved like you'd expect them to; it's not like it momentarily froze.  At first I figured it was something to do with crossing an arbitrary line and the game pausing to load another area or something, but it happens in dogfights when I'm not really covering that much space as well as when I'm going from one objective to another, so that doesn't seem to be it. 

I have GMA 950, which is crap, but like I said it ordinarily handles the game just fine, I also have 2GB of memory and a T2300, I've set the game process affinity to CPU 0, and that core is always loaded 100% when playing.  I know GMA 950 offloads some things to the CPU, like Texture and Lighting, but I think if this was a hardware problem it would be happening more frequently, right now it's mostly an intermittent problem.

Also, it does this when playing FS2 and FSPort, if that makes any difference.
Title: Re: Random lagging
Post by: Turey on August 08, 2007, 11:50:55 pm
It's probably the explosions. rename FreeSpace2/mediavps/adv_effects.vp to FreeSpace2/mediavps/adv_effects.vp.no an try again.
Title: Re: Random lagging
Post by: ADDAvenger on August 09, 2007, 12:21:14 am
I'll try that, but if I remember right it is truly random.  It can happen in dogfights or when I'm flying from one objective to another, with nothing happening on the screen except I'm moving closer to some ship or another.
Title: Re: Random lagging
Post by: ADDAvenger on August 10, 2007, 07:21:45 pm
I tried that, and it still lagged, once while dogfighting, and another time where absolutely nothing was exploding or anything.
Title: Re: Random lagging
Post by: castor on August 11, 2007, 04:47:47 am
Does it happen if you use the retail VP files only?
Title: Re: Random lagging
Post by: ADDAvenger on August 12, 2007, 01:22:36 pm
Does it happen if you use the retail VP files only?

I dunno, I'd try that except I have no idea what you're talking about.  You mean the FS1 and FS2 campaigns only, not playing user-made campaigns?  It has done it with FS1, FS2, and Silent Threat, I haven't tried any other campaigns yet.
Title: Re: Random lagging
Post by: castor on August 12, 2007, 03:13:26 pm
These are the original FS2 VP files that should reside in your FS2 install folder:
Quote
Root_fs2.vp
smarty_fs2.vp
sparky_fs2.vp
sparky_hi_fs2.vp
stu_fs2.vp
tango1_fs2.vp
tango2_fs2.vp
tango3_fs2.vp
warble_fs2.vp
VP files starting with mv_ or mp_ are from FSO/U-project, probably located in a folder named "mediavps".
By temporarily moving the mediavps folder (and any other .vp files except those I listed) out of the FS2 install folder you get FS2 with retail models, textures etc.
Title: Re: Random lagging
Post by: ADDAvenger on August 15, 2007, 09:37:45 am
I removed all the new and improved files and played for a while, but it still lagged once.  This one time I was on a Mara's tail and a swarm of hornets flew by me and nailed him, so maybe it really is hardware related... but that still doesn't explain why it has also happened when absolutely nothing is exploding or doing anything but flying around  :confused:   

Also possibly of note, the core I assign the game to is always at 100% utilization, whether I'm playing with mediavps etc or "classic" FS2.  A Core Duo at 1.66Ghz isn't exactly a powerhouse, but it's no slouch either.  However, I know GMA 950 offloads stuff to the CPU, maybe this is the problem?
Title: Re: Random lagging
Post by: nubbles526 on August 15, 2007, 11:16:03 am
You know, this topic is just like bumping a similar topic... :bump:


But anyways, I know now more or less it's the beams that are slowing down the in game, and the 3d ship selection is slowing the loading time down. Disabling mv adeffects did help somehow.
Title: Re: Random lagging
Post by: castor on August 15, 2007, 11:44:39 am
AddAvenger, are youusing OpenGL or Direct3D?
If you're using OGL, try Direct3D instead (your vid card OGL driver may suck).
If you're using Direct3D, try OGL instead (Direct3D support in FSO isn't up to date, it may have bugs causing.. who knows what).
Title: Re: Random lagging
Post by: Vidmaster on August 15, 2007, 11:45:22 am
did you disable vsync ?
Title: Re: Random lagging
Post by: ADDAvenger on August 16, 2007, 09:32:20 pm
Vsync is not disabled (I understand that's only done when benchmarking since it causes tearing)

I'm using OpenGL, I suppose I'll try D3D, though I may just learn to put up with the weird lagging if that's the only fix
Title: Re: Random lagging
Post by: ADDAvenger on August 17, 2007, 07:33:21 pm
D3D didn't fix it, it still lagged, and in fact the game crashed before I could finish a single mission...
Title: Re: Random lagging
Post by: castor on August 18, 2007, 05:01:29 am
Uhh,baad. Some more suggestions.
- make sure something else isn't stealing your CPU
- try it without audio (add the -nosound option)
- put it on 640*480*16bit resolution
- try to run it on compatibility mode (silly yes, but its just for testing..)
Title: Re: Random lagging
Post by: ADDAvenger on August 20, 2007, 08:12:08 pm
Uhh,baad. Some more suggestions.
- make sure something else isn't stealing your CPU
- try it without audio (add the -nosound option)
- put it on 640*480*16bit resolution
- try to run it on compatibility mode (silly yes, but its just for testing..)

Compatibility mode for what exactly, 98?

Edit: FWIW, I've also noticed the 100% CPU usage while playing CnC Generals, though that's not nearly as surprising since it's a strategy game with lots of AI, as well as more graphics/physics intensive.
Title: Re: Random lagging
Post by: jr2 on August 20, 2007, 10:31:27 pm
Hmm, you don't have anything like Folding@Home or somesuch on your comp, do you?  If so, try disabling it and then playing.. just don't forget to re-enable it when ur done.
Title: Re: Random lagging
Post by: ADDAvenger on August 23, 2007, 01:49:14 pm
I do run F@H, but I turn it off when gaming, and the core I assign to the game is almost always at 100%, it occasionally dips down a few %.  It does this whether I'm playing a mission or looking at stuff in the tech room or intelligence room, the place where the mission simulator is.

Which compatibility mode do I try, 98 or 95?
Title: Re: Random lagging
Post by: Grizzly on August 23, 2007, 03:15:04 pm
Don't.

This is not FS2 related, this is related to another program on your computer, wich is seemingly randomly consuming your comp's resources, causing the stuttering.

Turn off your antivirus scanner, for example, and try again. (do NOT disable the firewall, unless you disconnected yourself from the internet!)
Title: Re: Random lagging
Post by: ADDAvenger on August 23, 2007, 09:11:47 pm
Don't.

This is not FS2 related, this is related to another program on your computer, wich is seemingly randomly consuming your comp's resources, causing the stuttering.

Turn off your antivirus scanner, for example, and try again. (do NOT disable the firewall, unless you disconnected yourself from the internet!)

Actually, I can definitively say this is not AV related, since I just uninstalled McAfee (subscription ran out anyway) and the behavior is exactly the same.
Title: Re: Random lagging
Post by: jr2 on August 24, 2007, 02:18:47 am
Do you disable F@H, or Exit it?  If you only disable it, try exiting it and then re-launching after the game is done... (I have F@H).
Title: Re: Random lagging
Post by: ADDAvenger on August 24, 2007, 10:20:46 am
Do you disable F@H, or Exit it?  If you only disable it, try exiting it and then re-launching after the game is done... (I have F@H).

I run two console clients as services, and shut them down through services.msc whenever I need to do something potentially intensive.  FWIW, I sometimes forget to turn it off, and sometimes it's a lot worse and sometimes it lags no more than it would with the clients off.
Title: Re: Random lagging
Post by: jr2 on August 24, 2007, 04:50:36 pm
Ya, because F@H is "lowest" priority - it's supposed to take a backseat, and usually does.  IDK what your problem is then.. what services are taking all the CPU time?
Title: Re: Random lagging
Post by: ADDAvenger on August 24, 2007, 04:57:52 pm
Well I don't know for 100% scientific certainty (since I don't know how to monitor individual process utilization while gaming), but the CPU peaks when I'm running the game, and flatlines when I hit the windows key to look at Task Manager, so it seems it can only be the Freespace process (fs2_open_3_6_9.exe)
Title: Re: Random lagging
Post by: jr2 on August 26, 2007, 02:40:19 am
Hmph...

I have GMA 950, which is crap, but like I said it ordinarily handles the game just fine, I also have 2GB of memory and a T2300, I've set the game process affinity to CPU 0, and that core is always loaded 100% when playing.  I know GMA 950 offloads some things to the CPU,

Set the process affinity to CPU 1... I have a hunch that your GMA 950 offloads to CPU 0, causing the lag as both FSO and your GMA are using the same core... can't hurt to try.. this would also explain the CPU usage dropping to nothing when you minimize FSO, because it's no longer asking for anything to be rendered.
Title: Re: Random lagging
Post by: ADDAvenger on August 26, 2007, 02:47:30 pm
It seems you're right, looking at task manager, core 0 was mostly flatline, but there were small spikes here and there, while core 1 was almost always at 100% as expected.  I think that fixed it as much as it can be fixed on my machine, I still have occasional lag, but now it's only when a bunch of stuff blows up all at once. 

I do have to set the affinity every time I launch the game, could you all put some little piece of code into 3.6.10 that sets the affinity automatically for those of us with dual core and integrated graphics?
Title: Re: Random lagging
Post by: jr2 on August 27, 2007, 02:02:25 pm
Quote from: http://www.majorgeeks.com/Win2000_Launcher_d438.html
Win2000 Launcher is an application booster for Windows 2000 and Windows XP (Whistler). By default, Windows 2000 launch your game at a priority level 3 (there are 6 levels). With the launcher you can configure your programs to use the priority level of your choice and choose on which CPU your program should run on (if you have multiple processors in your system).
Title: Re: Random lagging
Post by: ADDAvenger on August 27, 2007, 07:30:58 pm
Quote from: http://www.majorgeeks.com/Win2000_Launcher_d438.html
Win2000 Launcher is an application booster for Windows 2000 and Windows XP (Whistler). By default, Windows 2000 launch your game at a priority level 3 (there are 6 levels). With the launcher you can configure your programs to use the priority level of your choice and choose on which CPU your program should run on (if you have multiple processors in your system).

Well.. that's nice, but this is a temporary fix at best, since neither multi core processors nor shoddy IGPs are going away any time soon.  Yeah I know they get better, I'd probably have 0 problems if I had the x3100 IGP, but sooner than later the game will be made better and more intensive, and it'll be the same old thing all over again.

I know you all are behind on 3.6.10, and it may not be put in, but I know you all keep some kind of wishlist somewhere, just stick this in there for me.
Title: Re: Random lagging
Post by: ARSPR on August 28, 2007, 07:30:49 am
Quote from: http://www.majorgeeks.com/Win2000_Launcher_d438.html
Win2000 Launcher is an application booster for Windows 2000 and Windows XP (Whistler). By default, Windows 2000 launch your game at a priority level 3 (there are 6 levels). With the launcher you can configure your programs to use the priority level of your choice and choose on which CPU your program should run on (if you have multiple processors in your system).

Well.. that's nice, but this is a temporary fix at best, since neither multi core processors nor shoddy IGPs are going away any time soon.  Yeah I know they get better, I'd probably have 0 problems if I had the x3100 IGP, but sooner than later the game will be made better and more intensive, and it'll be the same old thing all over again.

I know you all are behind on 3.6.10, and it may not be put in, but I know you all keep some kind of wishlist somewhere, just stick this in there for me.

Look in google for imagecfg.exe util. This utility modifies your exe so it automatically uses one or other core. (IIRC it's an old official Win NT utility). So you only need to "modify" your fsopen.exe with this util.