Sudden, huge drop in FPS and UPS

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
User avatar
oLaudix
Filter Inserter
Filter Inserter
Posts: 285
Joined: Sun Jun 14, 2015 3:24 pm
Contact:

Sudden, huge drop in FPS and UPS

Post by oLaudix »

I put some turrets to deal with critters and when the fight started i went to grab smth to eat. When i came back the fight was over but i only had 3 UPS. And it isnt fixing itself ... Any idea what the hell happened?
Image
Image

User avatar
Smarty
Global Moderator
Global Moderator
Posts: 816
Joined: Sat Oct 04, 2014 5:00 pm
Contact:

Re: Sudden, huge drop in FPS and UPS

Post by Smarty »

the amount of alien artefacts are lagging the game

User avatar
oLaudix
Filter Inserter
Filter Inserter
Posts: 285
Joined: Sun Jun 14, 2015 3:24 pm
Contact:

Re: Sudden, huge drop in FPS and UPS

Post by oLaudix »

Smarty wrote:the amount of alien artefacts are lagging the game
I tried to pick them up and suddenly it went back to 45 UPS ... Its really wierd that it dropped it to such a low level instead of gradual slowdown ...
Image

orzelek
Smart Inserter
Smart Inserter
Posts: 3922
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Sudden, huge drop in FPS and UPS

Post by orzelek »

You have 276 on timer for entity updates there. Something is fishy - amount of alien artifacts on ground is small and wouldn't cause that :D

User avatar
Smarty
Global Moderator
Global Moderator
Posts: 816
Joined: Sat Oct 04, 2014 5:00 pm
Contact:

Re: Sudden, huge drop in FPS and UPS

Post by Smarty »

there might be more around not in the picture :mrgreen:

User avatar
oLaudix
Filter Inserter
Filter Inserter
Posts: 285
Joined: Sun Jun 14, 2015 3:24 pm
Contact:

Re: Sudden, huge drop in FPS and UPS

Post by oLaudix »

There is a lot more since i play deathworld and there are biters everywhere. Now i'm runnin around trying to pick them all up ... I wish i could just destroy them :D
Image

keyboardhack
Filter Inserter
Filter Inserter
Posts: 478
Joined: Sat Aug 23, 2014 11:43 pm
Contact:

Re: Sudden, huge drop in FPS and UPS

Post by keyboardhack »

This command deletes all alien artifacts in a save. Change alient-artifact in this line if you want to delete anything else lying on the ground

Code: Select all

if ent.stack.name == "alien-artifact" then

Code: Select all

/c
for chunk in game.surfaces.nauvis.get_chunks() do
    local top, left = chunk.x * 32, chunk.y * 32
    local bottom, right = top + 32, left + 32
    for _, ent in pairs(game.surfaces.nauvis.find_entities_filtered{area = {{top, left}, {bottom, right}}, name = "item-on-ground"}) do
		if ent.stack then
			if ent.stack.name == "alien-artifact" then
				ent.stack.clear()
			end
		end
    end
end
Waste of bytes : P

User avatar
oLaudix
Filter Inserter
Filter Inserter
Posts: 285
Joined: Sun Jun 14, 2015 3:24 pm
Contact:

Re: Sudden, huge drop in FPS and UPS

Post by oLaudix »

I wasnt aware of the

Code: Select all

name = "item-on-ground"
part. Tried to put alien-artifact there -_- Thanks, ill use it.
Image

bobucles
Smart Inserter
Smart Inserter
Posts: 1708
Joined: Wed Jun 10, 2015 10:37 pm
Contact:

Re: Sudden, huge drop in FPS and UPS

Post by bobucles »

Hit ~ and try one of these on for size:

Code: Select all

/c game.forces['enemy'].kill_all_units() 
It worked on my modded game, bringing 6UPS back up to 30. Idle monsters use a LOT of CPU resources for a thing doing literally nothing. They really could use some tweaks.

User avatar
oLaudix
Filter Inserter
Filter Inserter
Posts: 285
Joined: Sun Jun 14, 2015 3:24 pm
Contact:

Re: Sudden, huge drop in FPS and UPS

Post by oLaudix »

bobucles wrote:Hit ~ and try one of these on for size:

Code: Select all

/c game.forces['enemy'].kill_all_units() 
It worked on my modded game, bringing 6UPS back up to 30. Idle monsters use a LOT of CPU resources for a thing doing literally nothing. They really could use some tweaks.
I don't play on deathworld to kill everything with console command ... The problem here is that even if mobs are just there, they still need pathfinding.
Image

bobucles
Smart Inserter
Smart Inserter
Posts: 1708
Joined: Wed Jun 10, 2015 10:37 pm
Contact:

Re: Sudden, huge drop in FPS and UPS

Post by bobucles »

The problem here is that even if mobs are just there, they still need pathfinding.
If mobs are just standing there, moping around, then they don't need anything. Even a regularly updating thing like health regen or random facing can sit on the back burner for an arbitrary length of time. It doesn't matter until they come in range of the player or his stuff.

I played around with the F4 features and found that some random map decals were being treated as pathing features when they clearly are not. That would make a needless CPU drain over distance.

Of course I am partially at fault for using modules to place 50K pollution sources into my world, but wow the CPU drain of a few thousand sleeping mobs really grinds things to a halt.

grifter1
Inserter
Inserter
Posts: 37
Joined: Sat Aug 08, 2015 5:53 am
Contact:

Re: Sudden, huge drop in FPS and UPS

Post by grifter1 »

keyboardhack wrote:This command deletes all alien artifacts in a save. Change alient-artifact in this line if you want to delete anything else lying on the ground

Code: Select all

if ent.stack.name == "alien-artifact" then

Code: Select all

/c
for chunk in game.surfaces.nauvis.get_chunks() do
    local top, left = chunk.x * 32, chunk.y * 32
    local bottom, right = top + 32, left + 32
    for _, ent in pairs(game.surfaces.nauvis.find_entities_filtered{area = {{top, left}, {bottom, right}}, name = "item-on-ground"}) do
		if ent.stack then
			if ent.stack.name == "alien-artifact" then
				ent.stack.clear()
			end
		end
    end
end
hi
is this still the right command for 12.8

posila
Factorio Staff
Factorio Staff
Posts: 5314
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Sudden, huge drop in FPS and UPS

Post by posila »

Hi, if you share your save and mods, we can profile the game to see what exactly is slowing it down so much (and maybe improve it in next major update)

Post Reply

Return to “Technical Help”