Jump to content

Critters - How to kill 10 FPS on a 50MB save file


Recommended Posts

If Klei can please look in to further optimizing critters please :confused: Especially the jumping morbs with their path finding suck since 2017 - Many thanks. :rolleyes:

The situation:

I have got this mega base which runs still ok, being a 50mb save game file - I don`t do critters, but had up to 300 dupes in the base. So far so good.

The reason why I don`t do critters since 2017, the games public beginning, is that I know that if want to do a lot of stuff in big, then don`t add critters to it.

Over time I started to wonder why the game speed was starting to kind of drop in a linear way.

The 2nd teleporter colony is partly excavated, has few buildings, zero population, no game play activity.

Appearently it is the wild, ever increasing morb population ! :grief: Hadn`t had a look whats going on it since ages :cold:

I will beam someone over to kill them all and destruct the outhouses creating those, to get my game speed back.

 

The increasing wild morb population in my currently dead other 2nd teleporter colony, kind of free roaming morbs - Free roaming sucks extra cpu:

image.thumb.png.0afa354fc958e6344fc507a342bb5519.png

Closeup zoom of a few of those morbs, jumping across ledges ( including "easter eggs" :lol: )

image.thumb.png.f0f16ef065998a57b0b724392398f40a.png

My DLC Terra classic mega base:

image.thumb.png.d6e7f68b9ed66c6744f01fcb91183505.png

BTW Still not have not visited other asteroids, beyond the 2nd teleporter one.

Reasons:

1.) Base needs another few thousand cycles work to start exploration "solid"

2.) FPS decrease "fear"

Link to comment
Share on other sites

12 hours ago, Cursed_Handus said:

Do critters compute every tile they can walk to? It feels like to would make more more sense to compute the paths up to x tiles away. Also it feels like critter pathing is something easy to multithread.

Nope its not. Its a simple row of "can i go there? yes/no", followed by the next tile. No potential for multithreading there, unless you think of putting different critters on differend threads, but that would never give you any performance gain, unless the critters are the only things on the map.

 

Link to comment
Share on other sites

There is multithreaded A* algorithm I think but having every critter run in one thread would improve performance so much so it would be as if you only had 1 critter if you can provide enough cores. You know how much faster could ONI run if every duper/critter ran in their own thread?

I blame guy who coded task jobs to be lazy and didn't solve multithreaded conflict when 2 dupes would be assigned same task, since it's not a problem if tasks are calculated in single thread since it would not be available. Then again recalculating remaining tasks again would probably do it.

Think of it like this:

100 dupes right now would take 100T calculation time to solve for tasks. Now if we ran them in 100 threads it would only take 1T but you'd have conflicting jobs. Soooo 1T -> resolve conflicting jobs -> 1T -> resolve very improbably last conflicting jobs again 1T so we may be looking at 2-3T time compared to single threaded 100T time. See how multithreading can improve performance? This would actually make single threaded CPU way slower this way but who the hell have less than 4 cores in their computer in 2021?

Link to comment
Share on other sites

one thing is path finding.

but to you know how many numbers animation self have? and all this stuff need handle by CPU

why factorio runs allot better, because it not use animate number coordinate stuff like ONI uses.

And multi-be those animate numbers for example 500, there allot numbers what CPU need handle. 

one solution is that disable animation for those items what you cant see. (devs job)

another solution is avoid make items what have animation, like babba todo (players job)

 

why game is soo fast in pause mode, because there is no single animation running at that protsess

Link to comment
Share on other sites

4 hours ago, gabberworld said:

one thing is path finding.

but to you know how many numbers animation self have? and all this stuff need handle by CPU

why factorio runs allot better, because it not use animate number coordinate stuff like ONI uses.

And multi-be those animate numbers for example 500, there allot numbers what CPU need handle. 

one solution is that disable animation for those items what you cant see. (devs job)

another solution is avoid make items what have animation, like babba todo (players job)

why game is soo fast in pause mode, because there is no single animation running at that protsess

As all asteroid are residing in the same big map, just divided by view zones and the player can basically instantly swap to a different view zone ( switching colonies ), I would recommend a general game setting option to "Deactivate all critter animations" as example.

For me its enough if I see a static morb image moving and floating around. In this way the game can ( optionally ) run better for critter farmers, which want to have 100-1000 critters in their world.

Link to comment
Share on other sites

3 hours ago, gabberworld said:

one thing is path finding.

but to you know how many numbers animation self have? and all this stuff need handle by CPU

why factorio runs allot better, because it not use animate number coordinate stuff like ONI uses.

And multi-be those animate numbers for example 500, there allot numbers what CPU need handle. 

one solution is that disable animation for those items what you cant see. (devs job)

another solution is avoid make items what have animation, like babba todo (players job)

 

why game is soo fast in pause mode, because there is no single animation running at that protsess

picard-meme-facepalm.jpg

Link to comment
Share on other sites

1 hour ago, babba said:

run better for critter farmers, which want to have 100-1000 critters in their world.

they could make also that only front critters are moving and what is back, animation is paused or something,

but yes, when i tested 500 same Critters in sandbox, fps drops allot, even if you map is basically empty from other objects

i personally would love make huge critter farms but i just can't because i know what then happens

 

animation what they use, all the movement comes from numbers, legs,heat,hands and soo on, have own coordinate numbers

there is no sprite 2d animation in this game at all like most games todo

example like this

83123-computer-sprite-figure-character-f

this would be much faster as it not need deal with numbers, it only needs load images.

images are stored in GPU memory, what is also another story because GPU memory is usually much faster than regular memory

Link to comment
Share on other sites

46 minutes ago, cpy said:

Occlusion culling, ever heard of it?

yeah but that is nothing todo animation moving what is two different thing, Occlusion culling, hides only pixels, but it not hide custom made animation what still processed by cpu

Link to comment
Share on other sites

7 hours ago, cpy said:

I blame guy who coded task jobs to be lazy and didn't solve multithreaded conflict when 2 dupes would be assigned same task, since it's not a problem if tasks are calculated in single thread since it would not be available. Then again recalculating remaining tasks again would probably do it.

Well, it is also a rather complex task and if you do not do the locking and synchronization very carefully, you may just end up slower. Also, you may want to get it to work first and think about fast later. Which Klei is doing.

Link to comment
Share on other sites

1 hour ago, gabberworld said:

yeah but that is nothing todo animation moving what is two different thing, Occlusion culling, hides only pixels, but it not hide custom made animation what still processed by cpu

Please take a look at your GPU stats while doing those tests not only on fps.
You should be able to figure out if it's GPU that's not catching up not CPU.

Link to comment
Share on other sites

32 minutes ago, Orzelek said:

Please take a look at your GPU stats while doing those tests not only on fps.
You should be able to figure out if it's GPU that's not catching up not CPU.

we talk here more about cpu, i just pointed out that gpu have faster memory. expect those low cost lappys who not even have gpu memory and use pc memory instead

this game seems have multithread  atleast i see that in intel, but i not know how it acts in amd because they two was always little different

another thing is, i not get why it use soo much cpu at empty game map when its zoomed out, i mean map is literally empty, with vacuum,  there nothing calculate at there ,no gas, no liquit, also because  there is vacuum, soo no temperature as well

Link to comment
Share on other sites

53 minutes ago, Gurgel said:

Well, it is also a rather complex task and if you do not do the locking and synchronization very carefully, you may just end up slower

Even if you do all that you can end up being slower than before. Or not much faster to justify all the added complexity and vulnerability to new kinds of bugs. That's what the Factorio developers eventually found out. Multithreading can be good for certain things, but it's not the magic solution everyone always assumes it is.

Link to comment
Share on other sites

6 hours ago, Steve8 said:

Even if you do all that you can end up being slower than before. Or not much faster to justify all the added complexity and vulnerability to new kinds of bugs. That's what the Factorio developers eventually found out. Multithreading can be good for certain things, but it's not the magic solution everyone always assumes it is.

Multithread can make new bugs yes, if not careful, but if i zoom out atm empty map and it start use 50% cpu, im not sure if its the multi-thread

as we cant really debug game self, we not really know what is messed up in game

soo i started the facorio new game = cpu usage 4-7% gpu 35%

oni, i cleand map, there nothing at there = cpu 20% gpu 38%

had to say oni devs need todo allot work till we even can start compare those two, if its even possible as one game made at c++ ans other at c#

--

i tested that 2d sprite in unity and was able run those 4000 at somewhere 35-40 fps

 

 

Link to comment
Share on other sites

4 hours ago, Steve8 said:

Even if you do all that you can end up being slower than before. Or not much faster to justify all the added complexity and vulnerability to new kinds of bugs. That's what the Factorio developers eventually found out. Multithreading can be good for certain things, but it's not the magic solution everyone always assumes it is.

Very much so, yes. Otherwise transputers would have ruled the world. Instead they are a historic curiosity. Most things do not parallelize well, even things were one would assume they do intuitively. And even for things that do parallelize well, the additional implementation effort can be rather large or prohibitive. Also, you suddenly get problems like deadlocks and races, which sequential code simply does not have and which are often hard to diagnose and prevent.

Link to comment
Share on other sites

51 minutes ago, cpy said:

Unity is **** engine when it comes to games like ONI.

yeah can be, but i to know that if disable animator for those objects what you cant see in screen increases the fps,

and that you need todo your self, unity will not todo that till you say for him.

disabling animator not disables the images, or the navigator, it only freeze the animation loop what is handled by cpu

 

Link to comment
Share on other sites

9 hours ago, gabberworld said:

yeah can be, but i to know that if disable animator for those objects what you cant see in screen increases the fps,

and that you need todo your self, unity will not todo that till you say for him.

disabling animator not disables the images, or the navigator, it only freeze the animation loop what is handled by cpu

 

How can you do that in ONI? Is there a mod for that?

Link to comment
Share on other sites

16 minutes ago, cpy said:

How can you do that in ONI? Is there a mod for that?

i better prefer if developers todo that them self, game is huge and messy for understand everything where its handled

is there mod for that, not thinks soo

by default in code is should look something like this
 

if (cordinateoutoffgamera){

            Animator ani = gameobject.GetComponent<Animator>();
            ani.enabled = false;

}else{

            Animator ani = gameobject.GetComponent<Animator>();
            ani.enabled = true;

}

thats the default unity Animator , i not know how they handle they own one

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...