Jump to content

optimisation is achievable ?


Recommended Posts

On 11/28/2023 at 8:05 PM, Zeliphar said:

that true , but the game already don't used all the capabilities of the CPU and Ram so that why , the game can be optimised at this point , but the dev would do it ?

Games like ONI are often limited not by raw computation, but instead they are limited by the rate at which memory can be moved in and out of the CPU to perform the computations on, basically it's doing simple computations on a large amount of memory, rather than doing complex calculations on a small amount of memory.

CPUs with large caches tend to be able to perform better, because with a large cache it's more likely the system doesn't have to reach all the way out to main memory to do the next calculation.

For ONI the best optimizations which could be done would be to maximize CPU cache hits by structuring memory in such a way that the system can move it into cache very efficiently, and even in terms of computation often the best thing is minimizing branching in the code to optimize instruction pipelining (that is it can be faster to just do the calculations repetitively rather than applying "does the calculation need to be done" optimizations). This however is architecturally quite tricky, especially for a game like ONI which is implemented in Unity, rather than a closer to the metal game like Factorio. Parts of ONI are implemented in C++, basically the "cellular" simulation which deals with gas, liquid, and solid cells and the temperature exchanges between them, but most the objects: machines, dupes, critters and so on are implemented in C# and I think without much thought given to optimization. And to actually optimize it would be close to "full rewrite" territory, which to be clear is never going to happen because full rewrites are disastrous.

On 11/29/2023 at 2:15 AM, Zeliphar said:

For interest's sake, I loaded this save on my system, which has a  i5 12400F CPU, Ubuntu Linux. With the Fast Track mod it runs about 50 fps at 3x and I'd describe the experience as "very playable". At 2x it's a solid 60 fps.

And I'd say that regardless of what the official Recommended System Requirements are for Spaced Out (they just say "64 bit CPU" lol), Spaced Out was developed targeting a modern CPU I don't mean an expensive modern CPU, but a budget modern CPU: something like a Ryzen 5 5600 or Intel i3 12100F. Spaced Out is quite demanding on the CPU if you want to like, actually do the Temporal Tear thing.

Link to comment
Share on other sites

11 hours ago, Zeliphar said:

actually i got I7 87K , and... i play a lot of "real game" without problem...

Yeah, before I upgraded I was using an i5 4400, and it was honestly fine for every game I played, including vanilla ONI (though I had to keep things limited). I upgraded specifically for ONI Spaced Out.
Not that there haven't been other benefits, like my old i5 really didn't handle both playing a game and streaming/encoding at the same time very well even with GPU encoding, I mean it was playable but you really noticed the performance hit. The 12400F takes such loads with ease, and can even do the encoding on the CPU no problem.

Link to comment
Share on other sites

3 hours ago, blakemw said:

Games like ONI are often limited not by raw computation, but instead they are limited by the rate at which memory can be moved in and out of the CPU to perform the computations on, basically it's doing simple computations on a large amount of memory, rather than doing complex calculations on a small amount of memory.

This made me quite curious now since I got a new laptop today (was 42% off last week which made it fit right into my low budget). I'm mostly using userbenchmark to compare the components 'on the surface' (which may be better than just some numbers) but it lacks a lot of specs. In this case now, they do rate the memory latency of my old desktop (reached 3:04 minutes / 184 seconds on the OP's benchmark) significantly better than any of laptops I came across. Heck, the memory latency score is almost equal to the top CPUs. It's a Intel 4th Gen i7 and my new is a 12th Gen i5 Laptop with a RTX 4050 (not i5 12400F but 12450H)

After some more digging I could find the Cache Sizes of both, L1 is 64 KB vs 704 KB, L2 is 256 KB vs 8 MB and L3 is 8 MB vs 12 MB. I sincerely don't get why my new one would get a worse score even after reading the explanation but well... I was a little afraid first to get an even worse benchmark but 2:00:04 / 120s is about what I expected for a 750€ laptop (even the original 1300€ didn't really make it a 'high price high spec supercarrier of doom' and I am / MSI Afterburner is (on a MSI Laptop) currently 'refraining' from overclocking.

Link to comment
Share on other sites

14 hours ago, SakuraKoi said:

This made me quite curious now since I got a new laptop today (was 42% off last week which made it fit right into my low budget). I'm mostly using userbenchmark to compare the components 'on the surface' (which may be better than just some numbers) but it lacks a lot of specs. In this case now, they do rate the memory latency of my old desktop (reached 3:04 minutes / 184 seconds on the OP's benchmark) significantly better than any of laptops I came across. Heck, the memory latency score is almost equal to the top CPUs. It's a Intel 4th Gen i7 and my new is a 12th Gen i5 Laptop with a RTX 4050 (not i5 12400F but 12450H)

Latency is only one factor, and a relatively minor factor. It's kind of a "whole system" thing.

But probably in this case the main thing is "laptop syndrome", on Factorio benchmarks a 12450H only gives about half the update rate as an i5 12400F, or it's max load "single thread" performance is about half for real world setups it is found in. On my Desktop my 12400F is cooled by a giant honking heatsink which is probably 20x more massive than the heatsink and cooler on a 12450H. Even if in theory a laptop should have the specs, it often can't sustain the processing rate for thermal reasons, it bursts to high rates so you can open an application quickly or whatever but can't sustain them.

There may be some hope that you could eke out some more performance by ensuring that ONI is not using efficiency cores, using Task Manager to set the ONI process core affinity to a single core (a p-core) so the OS doesn't shuffle the process between cores and won't use e-cores, and generally encouraging the laptop to run as hot and high performance as possible (these steps may or may not help, as the OS might already do the right thing, but generally ONI doesn't seem very good at asserting its need for resources so it's definitely worth trying). But you'll still ultimately be running into much lower limits than are achievable on a Desktop.

Link to comment
Share on other sites

On 12/3/2023 at 11:13 AM, blakemw said:

But you'll still ultimately be running into much lower limits than are achievable on a Desktop.

Well, I was expecting that already since the RTX 4050 is (knee)capped at 45w. Still, it is a matter of performance-to-price which made it seem, at that discount (1300€->750€), to be superior to all other choices (which were also at a discount) despite that GPU-deception (VRAM, for example, should not be affected while clock speed should be, if I am not vastly mistaken). Even for 200€ more (since I will increase storage from 0.5 to 2.5 TB and RAM from 16 GB to 32 GB) I doubt I could have gotten a better ready-made desktop (never again), mini-pc (the cheap ones come without GPU...) or build a desktop from the ground up.

Like a GPU on par with a 'proper' 4050 does cost over 300€ alone, a CPU is luckily more affordable (< 150€) but with the SSD and RAM I got, that's 650€ alone. Without Motherboard, Tower, OS, new screen, PSU... that easily exceeds a thousand, I did estimate. Hence why the original 1300€ would have been worse than a desktop build with the same price but sub 1000€ is the realm of prefabs (no OS, no new screen and 4K costs, luckily I have no need for that). Needless to say, lower wattage means a lower electricity bill! (113W peak vs 'I forgot to measure but definitely more in sustained use').

In regards to the CPU...

On 12/3/2023 at 11:13 AM, blakemw said:

On my Desktop my 12400F is cooled by a giant honking heatsink which is probably 20x more massive than the heatsink and cooler on a 12450H. Even if in theory a laptop should have the specs, it often can't sustain the processing rate for thermal reasons

I did consider if or rather how much a cooling pad or improvised stand would prove effective in regards to sustaining a higher processing rate (if I deem it necessary). Currently it lies flat but on a widely angle-adjustable desk which reaches over my bed (mouse is on an independently adjustable board). I'd also think that the ONI Benchmark is the closest to a 'sustained benchmark' or could at least easily permit to stress the thermic limits through consecutive tests, which, while writing, I decided to may as well do (I#=Interval#, always loaded the same save):

I1: 1:58:39 - I2: 1:59:83 - I3: 2:01:46 - I4: 2:02:68 - I5:  2:01:80

Bonus: 'Extreme Performance' instead of 'Balanced' (I6 after a quick break): 1:57:74. CPU quickly reached but never went over 70°C. Make of that whatever you will. Atm I'm trying to reset that power plan...

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...