Lag and it's causes

Started by antibodee, March 30, 2015, 01:47:16 PM

Previous topic - Next topic

antibodee

So far most of the lag I've developed during gameplay comes from one of three things:

1.  Too many colonists (at 56 colonists where I'm at, i get about 4 frames a second on a decent gaming PC)
2.  Constructions where I don't have the materials.  Especially floors/walls as they exist in bulk.  I've learned to never order a construction I can't afford.
3.  Fire:  Even with the newest update, fire still makes things very laggy, even when the game is paused, if the fire is anywhere near the camera.

Has anyone found any decent ways to cut back on the lag?  The graphic settings don't go any lower than two settings.  If there are any tips and tricks you could share, it would be appreciated.

palandus

Since the game isn't multicore or multithreaded yet, all of the calculations get performed on a single core; not sure if also all of the graphical calculations are done on the CPU rather than the GPU.

So, what you might be able to is to set the Core Affinity for the game, to a separate and mostly unused Core, and thus you would get maximum calculations available to you. Otherwise it defaults to the First Core, which is also shared heavily by the Operating System.

REMworlder

I think a lot of lag comes from just having a lot of stuff going on. Eg, 56 colonists all scanning the map for food, etc. The construction issue sounds similar to a problem where having lots of crafting tables with orders that didn't have enough ingredients would cause lag spikes because colonists would constantly be looking for the ingredients on the map, though I think this was addressed in a recent patch.

For graphics:
Quote from: TynanThe graphics are almost wholly irrelevant to performance. The game is entirely CPU-bound, mostly from AI decision-making.
https://ludeon.com/forums/index.php?topic=9013.msg89216#msg89216

Before A9, Tynan also mentioned
Quote from: TynanBest things you can do [to reduce lag]:
-Fewer work types ticked. Untick as many as you can. Best case is each colonist has exactly one work type.
-Fewer bills active to be done - especially if there aren't ingredients for them. You don't want colonists repeatedly scanning for corpses to cremate when there aren't any. If nobody can do the bill, suspend it.
-Fewer locked doors and inaccessible areas.
http://www.reddit.com/r/RimWorld/comments/2ta0ly/late_game_lag/cny3il0

TheSilencedScream

A mostly obvious one: stayed zoomed in.

Honestly, the biggest FPS hit I take is if I'm zoomed out, especially if the game isn't paused. It's kind of unfortunate, as I sometimes run JustinC's zombie mod, and there'll be that ONE stray zombie that I don't realize is there. -_-
Quote from: Topper on August 31, 2015, 03:33:25 AM
is the sledgehammer compatible with the romance mod?
Only in Rimworld.

PotatoeTater

I do have to say that on occasion the game gets broken in saving. I have been checking the saves with my defragger and everytime my game gets laggy I save and quit and then defrag the save and the lag is gone.
Life is Strange

Boboid

It's better in A9 than in A8 but - Idlers, idle colonists just TANK my framerate.
I can happily run 40 working colonists on x3 speed ( It's a tad slower but it's not significant ) but if it's 30 working colonists and 10 idlers it trashes performance.

This probably has to do with me having most work types ticked on most colonists, each colonist is likely scanning for every job type ticked when idling. That's really just vague speculation though, all I really know is that idlers are bad news bears.
A prison yard is certainly a slightly more elegant solution to Cabin Fever than mine...

I just chop their legs off... legless prisoners don't suffer cabin fever

SSS

I have a pretty crap computer when it comes to gaming: Dual Core Intel Pentium (@2.13 GHz), 3GB RAM, no GPU, no SSD. Despite that, I have very little lagging when I play even on larger map sizes (up to 325x325) with only a nominal amount of additional lag. The primary times I experience it is when a save is first loading or when I've been doing something in another program and re-open the Rimworld window.

My RAM seems to be the limiting factor here; with bigger maps I can hit one and a half gigs, and normal maps eat up a bit over one gig. It's not a biggie if I just have firefox open. palandus's suggestion to use the second core would probably help (I hadn't thought of that); something else you can do is set the program's priority higher in task manager for a small performance boost.

Admittedly, I've never had 50+ colonists before (I believe my biggest was back in A3 or A4, which may have reached 20+), but I'm perplexed as to why so many others are having problems with lag. I'm glad I'm not, but it's a little surprising.

Boboid

Quote from: SSS on March 30, 2015, 10:46:53 PM
Admittedly, I've never had 50+ colonists before (I believe my biggest was back in A3 or A4, which may have reached 20+), but I'm perplexed as to why so many others are having problems with lag. I'm glad I'm not, but it's a little surprising.

It's mostly a colony size thing, pawns -colonists in particular- just eat up a lot of processing power.

If you never have large colonies you really never ought to run into any significant lag unless you're running Rimworld on an Abacus
A prison yard is certainly a slightly more elegant solution to Cabin Fever than mine...

I just chop their legs off... legless prisoners don't suffer cabin fever