ATO_Architect Posted December 30, 2005 Share Posted December 30, 2005 I am hoping someone can provide some good insight on what things in GR, other than map complexity can be tamed to keep frame rates under control without sacrificing action intensity. I have a new mission I am scripting on a new urban map that is driving me crazy. The enemy force is composed of six tanks and about 70 enemies and the friendly force is composed of two tanks, one truck, and about six friendly soldiers. There are also about three additional static civilian vehicles serving as tank targets. When the mission begins, all of the enemies are hidden but two tanks and about six troops. Frame rates during the beginning of the mission go between 45 and 24 depending on where you are looking and standing. Once the assault begins, several smoke effects are initiated to create a smoke screen and three enemy tanks are revealed and begin moving into assault position. Three tanks then begin firing at various points and two tanks start rolling toward their objective...not a lot of activity altogether. But by this stage, frame rates are plummeting to 14 and as low as 7. UUggghh!!! What can I do to get this under control? I already have about 12 hours of scripting into this mission and it is driving me nuts. The map is intricate, but it is soooo good! When the map is bare, frame rates are running at 60. Once I add just a bit of activity, it all goes south. Any advice is greatly appreciated. I really want to salvage this one of I can. Quote Link to comment Share on other sites More sharing options...
31isnotapowerof2 Posted December 30, 2005 Share Posted December 30, 2005 IIRC, smoke effects cause one of the worst lags. Even a single smoke effect can reduce the FPS by as much as 10. Try to use a smaller smoke effect, ie. if it's large, change it to medium. I don't know about map modding, but you may try automatically activating the smoke on the map instead of creating them as effects on the mission. Hope that helps. Quote Link to comment Share on other sites More sharing options...
ATO_Architect Posted December 30, 2005 Author Share Posted December 30, 2005 IIRC, smoke effects cause one of the worst lags. Even a single smoke effect can reduce the FPS by as much as 10. Try to use a smaller smoke effect, ie. if it's large, change it to medium. I don't know about map modding, but you may try automatically activating the smoke on the map instead of creating them as effects on the mission. Hope that helps. ← Thanks. That helps. But do you know if the lag continues after the effect is over or should it go back up again? Quote Link to comment Share on other sites More sharing options...
ATO_Architect Posted December 30, 2005 Author Share Posted December 30, 2005 IIRC, smoke effects cause one of the worst lags. Even a single smoke effect can reduce the FPS by as much as 10. Try to use a smaller smoke effect, ie. if it's large, change it to medium. ← Tried removing the smoke effects...not much of an improvement. Something else is killing me here. Does anyone know what all of the various drains on frame rates are? Any good tips for optimizing frame rates? Quote Link to comment Share on other sites More sharing options...
The Worm Posted December 30, 2005 Share Posted December 30, 2005 Okay, this is a long shot idea, but it might work. In regular missions, you can get a jump in framerates by turning off the swaying of the trees. Pull up the cheat console and type in "togglemovetrees" (without quotes). Now, in an urban map, there are no trees, but I suspect it'll work anyway, because maybe the engine does it's calculations wheter there are trees or not. You can script the mission to stop swaying trees by some response in Igor (Console command or something like that). It might work, give it a try. Normally I try this stuff out first before posting, but a virus ate my windows, so I cannot do anything until I reinstall everything Quote Link to comment Share on other sites More sharing options...
CRAZY BIKER Posted December 30, 2005 Share Posted December 30, 2005 I've run across the same problem when triggering tanks....the game lagged bad enough to toss people out of the game.... my solution when triggering tanks is to use timers so that they all don't start at the same time...(especially if they are firing straight away) examlpe: I want all tanks active at the same time..or close to the same time...so when the trigger is triggered....I let the first tank spawn...then in 10 seconds...allow the next and so on. although there was still some lag...people are not getting tossed anymore. another thing to consider when using tanks I find....is the larger the map, the better. also...you may want to look at how much is actually going on at the time the tanks come into play. I hope this helps. Biker Quote Link to comment Share on other sites More sharing options...
ATO_Architect Posted December 30, 2005 Author Share Posted December 30, 2005 I've run across the same problem when triggering tanks....the game lagged bad enough to toss people out of the game.... my solution when triggering tanks is to use timers so that they all don't start at the same time...(especially if they are firing straight away) examlpe: I want all tanks active at the same time..or close to the same time...so when the trigger is triggered....I let the first tank spawn...then in 10 seconds...allow the next and so on. although there was still some lag...people are not getting tossed anymore. another thing to consider when using tanks I find....is the larger the map, the better. also...you may want to look at how much is actually going on at the time the tanks come into play. I hope this helps. Biker ← I tried breaking the execute plan commands in script blocks of two vehicle plans per block and usng timers to space them out a bit. (such as execute vehicle plan for tank A and execute vehicle plan for tank B in one block, timer for 10 seconds, timer expires and execute vehicle plan for tank C and execute vehicle plan for tank D in the next block, etc.). I'll try breaking it up even further and see if that helps. I am really confounded by this. I scripted another mission on the m08_battlefield map that is much more activity-intense with more tanks plans all executing at the same time and my frame rates are much better than on this one. Quote Link to comment Share on other sites More sharing options...
ATO_Architect Posted December 30, 2005 Author Share Posted December 30, 2005 Okay, this is a long shot idea, but it might work. In regular missions, you can get a jump in framerates by turning off the swaying of the trees. Pull up the cheat console and type in "togglemovetrees" (without quotes). Now, in an urban map, there are no trees, but I suspect it'll work anyway, because maybe the engine does it's calculations wheter there are trees or not. You can script the mission to stop swaying trees by some response in Igor (Console command or something like that). It might work, give it a try. Normally I try this stuff out first before posting, but a virus ate my windows, so I cannot do anything until I reinstall everything ← WORM, YOU ARE THE MAN! I used the togglemovetrees command and it improved FPS by 10 to 15 out the gate! Somebody should pin this discussion. I have several missions I am going to do this to. Great tip! Now when the action gets heaviest, the lowest the FPS falls now is around 18 to 20. Still pretty low, but playable. I think with some more refinement to the vehicle plan timing, I can salvage this puppy yet. Thanks everybody! BTW...I saw another console command that may also improve FPS. I am going to do an experiment and if it works, I'll post it here. Quote Link to comment Share on other sites More sharing options...
ATO_Architect Posted December 31, 2005 Author Share Posted December 31, 2005 Does anyone know if the "Far Clipping Distance" influences the amount of polys loaded into RAM? I wonder if reducing the far clipping distance would improve FPS. Quote Link to comment Share on other sites More sharing options...
sniper82 Posted January 1, 2006 Share Posted January 1, 2006 as far as i know it does some of the missions i have made need that at less than 100 to play, maybe thats because i have like 5 tanks but still Quote Link to comment Share on other sites More sharing options...
rcrph Posted January 5, 2006 Share Posted January 5, 2006 Automatic weapon fire also create a big hit on the cpu's. I try to minimize arming the opposition with these type of weapons. Quote Link to comment Share on other sites More sharing options...
wombat50 Posted January 8, 2006 Share Posted January 8, 2006 (edited) I remember reading a post or a tutorial by a well known modder on how to limit lag in co-op missions. It was wide ranging but I couldn't find it. But I came up with a few gems looking. Jack57: I think the effect our scripts have on frame rate is generally overstated. The amount of loops running to have just one AI actor do his stuff is probably more than most people would have in an entire mission. This why the number of active actors will have a far greater impact on frame rate than optimizing scripting. That is not to say you shouldn't strive to have optimized scripts - it all helps. If you are getting slowdown and\or lag look to see what actors can be made temporarily inactive (hidden) eg: is there any point having patrols wandering around on the other side of the map when there are no players nearby? I aim to have no more than 30 actors active at a time if at all possible. Try and keep vehicle numbers to a minimum and if you are using trucks or jeeps as props deactiviate them with the DestroyVehicle command. When using effects for fire and explosions use less for co-op than you would for SP. Just use the StopIf Co-op query in the block where you activate your effects, to filter some of them out. Playsound can be another lagger - too many all at once will cause problems. Again, have fewer if possible for co-op games. Slowdown and lag aren't the same thing of course, but they can be caused by the same thing. My 2 cents Chavez: But using GroupEnable and GroupDisable can - amongst other scripting stuff - reduce ure lag. Also - reduce the number of vehicles and the speed of them is something I'm not forgetting. I read in another post by Chavez, he stated tank speed should be 5m or less in a mp mission. Edited January 8, 2006 by wombat50 Quote Link to comment Share on other sites More sharing options...
Serellan Posted January 8, 2006 Share Posted January 8, 2006 Does anyone know if the "Far Clipping Distance" influences the amount of polys loaded into RAM? I wonder if reducing the far clipping distance would improve FPS. ← Yes it does. Reducing it can definetly help. Also, look at your checks. If you are checking for lots of things every second, that can affect performance. As a rule on the GR1 engine, we would not check for things (I am referring to time elapsed triggers) more than every three seconds. Also, if you have a LOT of checks like these, look at staggering them (one check every 3 seconds, another every 4 seconds, etc). Most objective checks in GR were every three seconds, and players generally don't notice that they don't fire off immediatly). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.