Things that slow down or speed up the game performance

I’ve been experiencing performance problems (slowdowns) lately. It’s almost impossible to tell how fast and well the game is handling the data at a given moment, or if the next reading session is going to be a crawlfest. But if you’re driving, and if there are portions on the road where the car just seems to go faster, i.e. framerate goes up, make a note of it. All I know is that certain spots in the game are really fast to process, while in other places the time progress can slow down to a crawl. I hope this helps!

NPC companion autopickup
This seems to create some or heavy slowdown. Turning it off, especially for crafting, sleeping or reading, should make said operations faster, or at least not-slow. Luckily it’s disabled by default.

Being underground
This is where the game is likely to operate the fastest. Find an evac shelter and go downstairs to do your reading/sleeping etc. Unfortunately you’ll need lighting. Time flies when there’s no creatures to process. Of course there could be an ant nest nearby, or zombies in the cellars of the nearby houses. Next best thing: LMOE shelter. They are likely remote.

Z-levels
Not sure about this one as I’ve never played with Z-levels enabled. I just suspect that enabling the 3D might slow the game in many areas. Enlighten me.

Lots of monsters nearby
Probably obvious. Do your reading and such in the middle of nowhere, preferrably in the plains. Try killing stray dogs and other nearby critters.

Lots of items nearby
If you’re like me and like to haul all your possessions everywhere in your car, then that might be one culprit. My early games are visibly more responsive than the advanced games. Currently I suspect that a lot of books in your car can slow down the game. Try tossing away some items or leave your books elsewhere. A ton of (perishable) food around might cause processing slowdown too. Or if you just killed a ton of zombies and their items litter the ground, don’t stick around to do crafting and such. Just something to keep an eye out for. I suspect clothing that’s been left outdoors now rots (loses condition), and if that’s true, then that is one possibile culprit as they’re being processed. Pure speculation, of course. Devs are crafty and sneaky. Tricksy little devsies.

Tilesets
Another possibility. I’ve always played with tilesets, and never ASCII, or “curses”. So try changing or turning off your tileset or even download the curses (non-graphical) version of the game to see if it’s visibly more responsive. Personally I’ve always gone with MShock tileset but AFAIK that isn’t maintained so much these days. So that could be one factor on my side.

So, to sum it up. If you want the quietest (fastest) possible reading spot, find a remote place and dig underground. Make sure all ant hills, house cellars, uncleared labs and slime pits are far away, and couldn’t possibly be within the reality bubble. Digging however requires some Construction skill, so a remote spot in the plains is likely OK as long as you clear the reality bubble of critters.

I might try some of these out. The other week I tried a really old build I had, and it ran as smooth as a knife trough butter. It was so great, I don’t know what might have slowed performance so much.

Z-levels definitely slows the game down. Also, so does world size.

Viewport size
For some reason the game scales very badly with viewport size.

Manually saving actually speeds the game up for me. The game seems to slowly eat up more and more RAM suspending the world data until a save is made. This has solved the “reading\mechanical work takes forever” issue for me.

Dying in a game world with Delete world upon death…ANNnndddddd the game decides to save THEN delete. Because we need this. :wink:

Don’t forget the usual causes of performance hits, namely having other programs running, especially browsers. Personally I have started using my phone to look things up when I have a game running.

It was Kevin’s light and temperature reworks that fucked sleeping up and turned it into a frozen screen and slowed the whole game.

Precompiled binaries on windows are much slower compared to compiling your own version on linux. Does not seem to be much of a difference if SDL is enabled or not(with linux anyway)

Console or tiles too?
Windows console seems to be really unoptimized. I get much better speed in cygwin console than in native windows one, even though the cygwin one goes through extra abstraction.

Protip: Do not run the game on a toaster. Like me.

Is there no way we can fix this problem of the game being really slow? Even dwarf fortress works reasonably in my machine, but going through the menus in CDDA is a pain, specially when you are putting tiles with the debug tool to draw the tilesets, for example.

It’s only in the new version, I grabbed whale’s old ass version on github. Fixed a few errors and then compiled it on debian.
It runs so fast, that safemode is actually required, probably even delay as well. You hold down that arrow key and you will either: die or hit an obstacle.

There has been a serious loss of performance over the years.

EDIT:

It would be really good if there was a way we could accurately judge performance between versions.

I’m going to do some testing on windows, to see if I can get some more performance out of the experimentals
System Specifications:


Summary
Operating System
Windows 7 Ultimate 64-bit SP1
CPU
AMD FX-6300 31 °C
Vishera 32nm Technology
RAM
12.0GB Dual-Channel DDR3 @ 803MHz (11-11-11-28)
Motherboard
Gigabyte Technology Co. Ltd. GA-78LMT-USB3 6.0 (Socket M2) 31 °C
Graphics
Compaq WF1907 (1440x900@60Hz)
2250W (1920x1080@60Hz)
2047MB NVIDIA GeForce GTX 960 (MSI) 33 °C
Storage
931GB Seagate ST1000DM003-1SB102 ATA Device (SATA) 30 °C
238GB CORSAIR FORCE LX SSD ATA Device (SSD) 38 °C
Optical Drives
No optical disk drives detected
Audio
Realtek High Definition Audio

Some Testing:

Experimental 5860 - tiles - Windows x64

Play Now! Runs decently, have seen better. Not much of a discernable difference. Moving along x axis is slightly faster than Y axis Long actions, such as attempting sleep have about 200 - 400 ms lag.

Playing with preferred Settings

Animations :False Rain Animations: False SCT Animation: False Animation Delay : 0 Force Redraw: False

Term Width 80
Term height 24

Tiles: False
Minimap: False

Fullscreen: Fullscreen
Software Rendering: False
Scaling Mode: No scaling

No marked improvement over previous settings

Matching term width and term height to screen resolution results in a fair slowdown.
Term width: 240
Term Height: 67

Massive delay between tile movement, to the point at which the keyboard buffer seems to back up a bit.
About 500ms lag after confirmation of attempting sleep.
Small amounts of input delay going through menus.
25 minutes of crafting complete in a few seconds.

Continuing to play on the aforementioned settings, will see if changing anything else helps.

Was using default world settings before.

City size: 1
City Spacing: 8

Spawn rate: 0.7
Item Spawn: 0.7
NPC spawn rate: 0

Static spawn: False

All other settings default, no mods.

No marked improvement over previous settings (Default).

Experimental 5860 - Terminal - Windows x64

Runs virtually the same as 5860SDL, maybe some minor slowdown on movement. Animations :False Rain Animations: False SCT Animation: False Animation Delay : 0 Force Redraw: False

Term Width: 80
Term Height: 24

Slight Improvement over previous settings, running around is a little quicker.
Similar issue with SDL, moving on the y axis is way faster than the Z axis.
About the same values for attempting sleep and crafting as SDL

Term Width: 239
Term Height: 66
(Values slightly decreased as to account for lack of fullscreen function)

Hilariously slow, worse than the SDL version running at high width and height values.
On the plus side however, the keyboard buffer seems to be behaving itself.
Not much of a discernable difference with long actions

Whales - Github release - Term - Debian
(Not sure if sdl available?)

Force Y/N in prompts: True Use Celsius: False Use Metric System: False No Bright Backgrounds: False 24 Hour Time: False Snap to Target: False Safemode on by default: True Auto-Safemode on by default: False

Even just running on the terminal, this release is stupid fast.
Moving at about 1.5 maptiles per second, by holding in arrow keys.
Attempting to sleep is instantaneous
Crafting is instant as well
Distinct lack of features however, driving vehicles is quite slow in comparison to walking, in terms of realtime.

Cataclysm - Tiles - Debian
Latest Version from github.

Movement is about 1.3 maptiles per second. Takes about 550 - 600 ms for half an hour to progress ingame

Cataclysm - Term - Debian
Latest Version from github.

Moving at about 1 maptile per second
Attempting to sleep is about 300ms lag
Crafting is about the same
Progressing an hour ingame is roughly a second

tl;dr The biggest killer so far has been term width and term height.
Running on default values for that seems to make the game run quite quickly.

Would include config files themselves, but character limits

I’m guessing optimize flags are already on, somewhere in the makefile. Well, here’s hoping they are.

Someone needs to profile a typical “run” of the game.
Without profiling, we can only guess what is so slow and that’s obviously not the right way to do it.

I tried to do it on an earlier setup, but it didn’t cooperate. I’ll try again, maybe this time I’ll get it to work.

Wad67, that’s an awesome research, I hope it helps!
And if you can look into it, Coolthulu, it would be really appreciated -everyone would be thankful at you for that!

1 Like

I can’t get the profiler to work right. Or I can’t read its output well.
It says that the most time is spent not on drawing, but on game setup, even if I run around for a longer while.

[quote=“Coolthulhu, post:16, topic:12894”]I can’t get the profiler to work right. Or I can’t read its output well.
It says that the most time is spent not on drawing, but on game setup, even if I run around for a longer while.[/quote]

I might give profiling a whirl on my linux distro, apparently valgrind is good.
I had a brief google just before, I should be able to get some data related to Cataclysm’s performance.
Probably won’t be able to interpret it though, looks a bit mathematic.

[quote=“Coolthulhu, post:4, topic:12894”]Viewport size
For some reason the game scales very badly with viewport size.[/quote]

I think this might be the main problem with the slowness of my game, can you specify what you mean by this? Like, do I need to scale the viewport to only take up a certain amount of my monitor? I play in windowed borderless fullscreen, is that part of this issue?

Drawing individual tiles is slow. If you increase font/tile size so that you see less of them at once, it will be faster.

[quote=“IcedPee, post:18, topic:12894”][quote=“Coolthulhu, post:4, topic:12894”]Viewport size
For some reason the game scales very badly with viewport size.[/quote]

I think this might be the main problem with the slowness of my game, can you specify what you mean by this? Like, do I need to scale the viewport to only take up a certain amount of my monitor? I play in windowed borderless fullscreen, is that part of this issue?[/quote]

Under your options menu, under the graphics tab.
There are two options for terminal width, and terminal height.
Increasing these slows down the game significantly, to the point at which I don’t touch them and leave them on default.
Having fullscreen enabled does not seem to impact performance as you are simply scaling the viewport up, rather than actually increasing the size.

I’d say it is to do with rendering, maybe field of view.
I guess zooming out would impact performance too, but I don’t have that feature as I don’t use tilesets.

I probably would use tilesets if there was just a completely plain ASCII one, preferably a square size too.