It is common for modern video games to be badly optimised due to, partly, inefficient usage of multiple cores on a CPUs.
I’d assume that developers know this, but don’t have the time to rectify this.
So, therefore, what are the difficulties in utilising various cores of a CPU effectively? Why does it require so much focus, money, or perhaps time to implement?
In: Other
>It is common for modern video games to be badly optimised due to, partly, inefficient usage of multiple cores on a CPUs.
Are they though? People like to claim that Starfield is badly optimised but it isn’t, it is just really demanding. A lot of modern games are actually pretty good about using more CPU cores if you have them – for example, BF2042 can easily push a 8 core CPU to 100% utilisation on 64 player servers. The big issue for modern games is when they are designed for the consoles and then ported to PC with zero regard for optmisations for the much wider variety of hardware found.
>I’d assume that developers know this, but don’t have the time to rectify this.
Optimisations require you to start planning for them when you start development. If you wait until you are done then you are going to end up having to rewrite whole swaths of your code which takes a lot of time and can introduce numerous bugs and glitches which further increases the required time. This is why console ports tend to perform poorly on PCs despite PCs often being more powerful – i.e. they are designed with optimisations for the consoles in mind rather than more broader optimisations that you would find on PC (e.g. a lack of graphics options due to the known performance of the console GPUs).
>So, therefore, what are the difficulties in utilising various cores of a CPU effectively?
How to utilise multiple CPU cores is a solved problem these days – you need to go back 15+ years to see how bad people were at optimising for multiple CPU cores. You can break your program into tasks which you can spread around CPU cores as threads and you use locks to protect data that you are using from other tasks who want to change that data. The problem is that you have two kinds of tasks, tasks that can be completed in parallel with each other and tasks that need to be completed sequentially because each task depends on the results of the previous task or from multiple previous tasks. It is the sequential tasks that can only run on a single CPU core with zero parallisation possibilities and are your limiting factor when it comes to performance scaling.
Latest Answers