View unanswered posts | View active topics It is currently Sun Dec 01, 2024 4:23 am



Reply to topic  [ 98 posts ]  Go to page 1, 2, 3, 4, 5 ... 7  Next
 How to make Cortex Command lag less. [V1.2.2] 
Author Message
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post How to make Cortex Command lag less. [V1.2.2]
This one should be especially helpful to those of you with shitty computers.
Please read the tutorial in its entirety before posting or attempting anything.

NOTE FOR VISTA USERS
    None of this will work most of the time if your CC is located in "C:\Program Files\" due to Vista's system folder virtualisation. Just move it to your desktop or documents or whatever.

A QUICK GROUNDING IN CC PATHS
    Please pick the path relevant to your Operating System:
      WINDOWS: C:\Program Files\Data Realms\Cortex Command\
      MAC: <Application>/Resources/
    This directory will be referred to as the "CC directory" herein, and all paths listed are relative to this path.
    For example, "Base.rte" on Windows refers to "C:\Program Files\Data Realms\Cortex Command\Base.rte\"
    Please note: forward slashes are used in all paths for cross platform compatibility.

TURNING ON PERFORMANCE DISPLAY
    A little-known command that is a lot of help in getting CC working: Ctrl+P
    This should bring up a performance display dialogue, which will allow you to check out how your game is running, and if you need to fiddle with anything. Basically, we need to get TimeScale reading 1.00x at all times to have a smoothly running game. Make sure the bottom of the dialogue reads "ONE SIM UPDATE PER FRAME!"; it's important for this tutorial.
    If it isn't there, hit Ctrl+O.

GLOSSARY
    CC - Cortex Command.
    TimeScaling - Having ONE SIM UPDATE PER FRAME mode on.
    Full Speed - having a timescale of 1.00x while playing with TimeScaling.
    Sim Frames Per Second - 1/DeltaTime

Welcome.
For this tutorial, we are going to be manipulating the humble Base.rte/Settings.ini - before we go any further, please back up this file.

Open Base.rte/Settings.ini now.

DELTATIME FIDDLING
DeltaTime is the amount of time taken to render each simulation frame (not graphical frame), in seconds. A DeltaTime of 0.5 means there will be 2 frames per second. DeltaTime is the most important variable in relation to lag. By default it should be set to 0.0166667. In other words, Cortex Command is set to run at ~60 FPS by default.
If you experience constant lag, your computer is quite likely not powerful enough to play CC at such a high framerate (it could also be that CC inexplicably doesn't like your computer, which seems to be a common issue).
"But", I hear you asking, "if my computer's hardware is the problem, how can I make it run any faster?". We make the game run faster by making it simulate less frames per second. Each simulated frame means a lot of calculations, so cutting down the number of frames cuts down the amount of work your processor has to do.
If CC is running slowly, try the following values until you can run Zombie Cave or Prom Grounds (or any other small map) at full speed (or until you're happy enough with performance):
Code:
DeltaTime = 0.0181818    // 55 FPS - No real change
DeltaTime = 0.02   // 50 FPS
DeltaTime = 0.0222222   // 45 FPS - Mildly Choppy
DeltaTime = 0.025   // 40 FPS
DeltaTime = 0.0285714   // 35 FPS - Getting bad
DeltaTime = 0.0333333   // 30 FPS - Minimum tolerable
DeltaTime = 0.05   // 20 FPS - My PIII can run CC too, guise!
Pros Of DeltaTime Fiddling:
  • It takes a lot of strain off your CPU, and reduces lag effectively.
  • Its not hard to make custom values (open calculator, 1/<number of frames per second>)
  • Can be used to put CC into "Beautiful Mode" on beastly computers (0.006667 - ~150 fps)
  • It allows you to use TimeScaling at the same time.
Cons Of DeltaTime Fiddling:
  • Everything starts to gib more easily the faster everything gets. At lower deltatimes, this means everything explodes without reason.
  • AirResistance and similar things are softened the higher the deltatime goes, as they are calculated per physics frame (which is a stupid thing to do, and Dan should be told off for it).
  • Terrain-Rape gets bad after a while, because everything moves further per frame.
As a bonus, if you make the game do more frames per second, the game looks amazing.
Code:
DeltaTime = 0.005 // 200 SFPS - "Pretty" mode (try this on high-end computers only!)


SHRINKING YOUR RESOLUTION WHILE RETAINING PLAYABILITY
This one can help quite a bit on low end machines. See these two variables?
Code:
ResolutionX = 640
ResolutionY = 480
Fairly self-explanatory, yes? we're going to reduce these. pick any two numbers that will still fit in your resolution when multiplied by two. for example, if your native resolution is 600x800, 300 and 400 are your maximums. Once you have inputted your numbers, test to see if CC will still run (MAKE SURE IT IS RUNNING IN WINDOWED MODE!), if not, pick some new numbers.
Code:
Sure to work presets, in X : Y format,
320 : 240
400 : 300
If it does work, quit out of the program (you dont need to wait for it to load), and set the following line:
Code:
NxWindowed = 2
This will make your window twice as large without doing extra work, which will allow you to play in a non-tiny window with less laggy CC.
Pros Of Resolution Fiddling:
  • No Physics Alteration.
  • Shows CC from a whole new perspective.
  • Considerable performance boost on older computers.
Cons Of Resolution Fiddling:
  • Unsuitable for Multiplayer.
  • Makes the menu misbehave.

TIMESCALING OFF
This method of reducing lag is for those who dont mind an inconsistent frame rate.
Basically, when you're playing, if you notice the game slowing down and the noises sounding weird, hit Ctrl+O. You should notice the game jumping about a bit in action-packed scenes, but CC should run quite a bit visually faster. Consider turning up your DeltaTime aswell to improve consistency.
Pros Of Turning TimeScaling off:
  • Really fast and easy to do, and easily reversible.
  • No .ini fiddling!
  • No Physics alteration - things should still respond as normal.
Cons Of Turning TimeScaling off:
  • Makes the game inconsistent.
  • Doesn't do much to how much maths your CC is doing.
Personally I hate this solution, but it makes some people happy, so at least give it a go.

UPDATING YOUR DRIVERS
updating your drivers can significantly increase performance, especially for those of you with multi-core processors (due to timing issues with CC and older drivers). however, doing it wrong can seriously ♥♥♥♥ up your computer.
If you're still keen and know what you're doing with a computer, go to either: here (Intel) or here (AMD)
NO RESPONSIBILITY WILL BE TAKEN FOR YOU ♥♥♥♥ UP YOUR COMPUTER!

MINOR TWEAKS
The Following Tweaks will give less noticeable performance boosts, but feel free to try them out.
Turn glows off. This is done with the following lines of code (found in Base.rte/Settings.ini again)
    Code:
    PostProcessing = 0
    PostPixelGlow = 0
    this will prevent explosions from lagging as badly, and prevents eye-rape. It makes things less pretty, but thats the idea behind lag reduction. It makes the largest change out of all of the Minor Tweaks.
Set MaxUnheldDevices to a lower number, or 0 to prevent devices from sticking around after you drop them.
    This will prevent heaps of devices (25) from laying about on the map, and should speed things up a little bit on larger maps, and death mode. It's a very minor tweak but can net you an extra half frame per second on a bad day.

FOOD FOR THOUGHT
All of the Non-Boolean variables described above can also be tweaked in the opposite direction.
This means that you can turn the Simulation Quality up by lowering the DeltaTime variable, make it so devices can always be picked by setting MaxUnheldDevices to 5000, and (extending our reach to some other variables) tweak the console size (ConsoleScreenRatio), skip straight into the game (PlayIntro), or even prevent MOs from settling (EnableParticleSettling). Hopefully, most of these will be put into a settings dialogue in future builds, to allow people to tweak these things without poking around in settings files.


That's it for now!
Hopefully, this will help some people enjoy Cortex Command in a more responsive environment.


EndNotes:
I'll expand this more later, i mainly just wanted to stop having to write out the DeltaTime thing over and over again. Feel free to comment, and if you have any other personal ways of reducing lag, PM them to me in a format similar to the one present in this post and i'll edit them into the OP, and include credit and whatnot. I'm especially interested in known Minor Tweaks currently.

3/12/10: Spelling and a few structure changes V1.2.2
29/08/09: Deltatime effect clarification. V1.2.1 (minor edit)
    Also, added something for vista users
02/07/09: Driver Details. V1.2
13/05/09: Added resolutions and two minor tweaks, and food for thought. V1.1

Dates are in DD/MM/YY


Last edited by Geti on Fri Dec 03, 2010 2:44 am, edited 7 times in total.



Tue May 12, 2009 11:56 am
Profile WWW
Banned
User avatar

Joined: Tue Feb 27, 2007 4:05 pm
Posts: 2527
Reply with quote
Post Re: How to make Cortex Command lag less. [V1.0]
Nominating for a sticky.

All in favor?


Tue May 12, 2009 3:43 pm
Profile YIM
User avatar

Joined: Sat Mar 03, 2007 11:20 pm
Posts: 789
Location: Location: Location
Reply with quote
Post Re: How to make Cortex Command lag less. [V1.0]
Thats a cool "tutorial" Trying the methods right now.

Edit: aye!
Edit2: holy nut, this fixed my lag when i am playing 1280x960
Good job man.


Tue May 12, 2009 3:46 pm
Profile
User avatar

Joined: Mon Jun 30, 2008 9:13 pm
Posts: 499
Location: Finland
Reply with quote
Post Re: How to make Cortex Command lag less. [V1.0]
Blasting stuff with a DeltaTime of 0.005 and TimeScale of 0.3 is so pretty.


Tue May 12, 2009 3:56 pm
Profile

Joined: Sun Dec 07, 2008 10:29 pm
Posts: 34
Location: Engrand
Reply with quote
Post Re: How to make Cortex Command lag less. [V1.0]
ProjektTHOR wrote:
Nominating for a sticky.

All in favor?


Agreed.

I'd suggest a bit about using 1/2 to change the time scale after pressing ctrl o.


Tue May 12, 2009 5:46 pm
Profile
User avatar

Joined: Mon Jun 04, 2007 5:55 am
Posts: 1627
Location: Ohio
Reply with quote
Post Re: How to make Cortex Command lag less. [V1.0]
holly hell! I'm gonna do that in just a moment, and set it to ~26-27 FPS, yay flicker frequency!
and yes i'm gonna do some weird timescale crap as well. this is one of the 3 most important threads on these forums.

edit

Doesn't this mean we could mess with the real to sim cap?


Tue May 12, 2009 6:06 pm
Profile YIM WWW
User avatar

Joined: Mon Feb 11, 2008 3:42 pm
Posts: 259
Reply with quote
Post Re: How to make Cortex Command lag less. [V1.0]
Well done, sir. This will be quite useful indeed. Slightly glitchy gaming is better than laggy/no gaming.

Can't wait to lower DeltaTime. :D

EDIT: I also think you should add 1/2 timescale fiddling tips.


Tue May 12, 2009 9:28 pm
Profile
User avatar

Joined: Thu Mar 06, 2008 10:54 pm
Posts: 1360
Location: USA
Reply with quote
Post Re: How to make Cortex Command lag less. [V1.0]
Aweseom geti, but i have a question: if i normally play at 120-140 frames per second, is it normal to lag on terrain bombs, and does everyone lag with them?

(terrain bomb = bomb that gets larger and eats terrain around it)


Tue May 12, 2009 9:38 pm
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: How to make Cortex Command lag less. [V1.0]
Depends on the method the terrain bomb uses. If its just a deepgroup thing it shouldnt lag more than a rocket digging a hole in the ground with its nose. If it uses millions of MOPixels, it might lag quite a bit, especially on slower computers.
Thanks for the stickie, also i will add in stuff about 1/2 TimeScaling, but not till after school ;)


Tue May 12, 2009 9:50 pm
Profile WWW
User avatar

Joined: Thu Mar 06, 2008 10:54 pm
Posts: 1360
Location: USA
Reply with quote
Post Re: How to make Cortex Command lag less. [V1.0]
Geti wrote:
Depends on the method the terrain bomb uses. If its just a deepgroup thing it shouldnt lag more than a rocket digging a hole in the ground with its nose. If it uses millions of MOPixels, it might lag quite a bit, especially on slower computers.
Thanks for the stickie, also i will add in stuff about 1/2 TimeScaling, but not till after school ;)

K, thanks, and without anything there, my CC runs at 167-200 fps.

Now is 150 fps "beautiful mode" without anything or no matter whats there?

And i think this is due to my 4096MB ram, but idk


Tue May 12, 2009 10:04 pm
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: How to make Cortex Command lag less. [V1.0]
I dont mean rendered frames per second, I mean DeltaTime frames per second. DeltaTime frames per second is given by
Code:
1/DeltaTime
whereas rendered frames per second is just how many frames are getting drawn each second. I'm assuming your DeltaTime FPS is actually 60 like the rest of the default installations.
But yeah, 4GB of ram would help.

"Beautiful mode" is activated by changing your deltatime to 0.006667, giving ~150 DeltaTime FPS.


Wed May 13, 2009 5:03 am
Profile WWW

Joined: Sun May 10, 2009 3:19 pm
Posts: 24
Reply with quote
Post Re: How to make Cortex Command lag less. [V1.1]
Sticky this, this guy clearly knows his stuff.


Wed May 13, 2009 6:06 pm
Profile
User avatar

Joined: Mon Jun 30, 2008 9:13 pm
Posts: 499
Location: Finland
Reply with quote
Post Re: How to make Cortex Command lag less. [V1.1]
It is stickied.


Wed May 13, 2009 6:10 pm
Profile
User avatar

Joined: Mon Apr 06, 2009 9:41 am
Posts: 712
Location: New York
Reply with quote
Post Re: How to make Cortex Command lag less. [V1.1]
Wait, how do I timescale on a mac?


Sat May 16, 2009 12:31 am
Profile YIM
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: How to make Cortex Command lag less. [V1.1]
[control + O] or [command + O] should work.


Sat May 16, 2009 3:58 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 98 posts ]  Go to page 1, 2, 3, 4, 5 ... 7  Next

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.046s | 13 Queries | GZIP : Off ]