Enhance your games speed with this handy little script!
Easy to use and can increase frame rates with large and even small scenes. Includes 4 example maps and 3 scripts for different scenarios.
How to use:
Firstly, take a look at the examples. The levels each have a tailored script to run as fast as possible. You can see how fast the levels run without the script by either deleting the rubbish decal on each level (next to the player start), or setting it to static. You should see a noticeable difference (dependent on your PC specs). Examine the scripts and notice the small differences. Mainly distance, itemcount and mloop. Distance is your view range, lower is faster but has more pop up. Generally you will have to tweak this for each level to get best results. Itemcount is the number of objects to occlude. Mloop is the rate of update, smaller is slower, but more effective on small levels.
Making your own levels:
You will have to organise your levels a little to take advantage of this script. This is to ensure fastest speeds and no odd issues arising.
Firstly, add your player marker. It is important to do this as the very first item or the script will show the player marker when running.
Next add any dummy object, preferably a low poly overlay of some sort such as the "rubbish" one included as default in GG. Select it and open up the properties panel from the selection menu. Set static mode to no. Set main to the appropriate script name eg. occlude_high.lua. Set physics on to no. Set always active to yes.
Now design your scene. Only include scenery, no game play items such as weapons or any other collectables or AI. Once you have finished it as you want, or at least until you want to test, before running it, you will need to edit the script a little. Find the last object you placed and remember it's number. Open up the script in notepad. Change itemcount to the number of your last entity. This will ensure that any AI or collectables are NOT included in the occlusion which can cause re-spawn issues and also slow the system a little. You may want to rename it so as not to alter your original. If you do, remember to change it in the editor afterwards.
That should be it. However, if you are designing a really small scene you may need to alter mloop. This controls the update of objects, a smaller value will work better with small levels, a larger value better with big scenes. Both the high and medium scripts use an automatic calculation and don't need to be altered, but the small scene is just set to 1 as that works far better. You need fast update on a small scene with low draw distance.
You can keep adding to the map and changing the itemcount to match as you build your level, just remember not to include any game play items until the entire level is complete.
Now it is released for free perhaps it can be further improved, I have tried several other ideas but all slowed it more if only by a tiny amount. Still, as it stands it can give quite the boost to some levels!
If you aren't familiar with them here are a few videos about the script.
SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.