Soldato
- Joined
- 14 Aug 2009
- Posts
- 3,343
Ultimately, the performance of a game comes down to the developers. You can make Unreal run nice if you have a strong engineering team and technical direction, you write efficient code by default, know when and how to optimise, and have people that know the engine inside out. You also need some rendering wizards that know all that magic voodoo I don't concern myself with as a gameplay programmer
Keeping performance stable in big open world games full of stuff is very challenging though. Streaming content in and out smoothly and managing the lifetime of objects as they go in and out of relevance while making sure all the gameplay systems don't **** the bed is hard work.
The engine will only ever hitch and/or slow down when it's doing something it's been instructed to by a developer at the end of the day (even indirectly, like garbage collection etc.)
Impossible to say without actually profiling the game, but I'd wager in most cases, frame hitches in open world UE titles are going to be the garbage collector. This is the system that checks for any unused objects every 30 seconds, and destroys any that aren't needed any more. If there are a lot of objects, or objects with many components to clean up, you'll get a hitch. There are various ways to mitigate against this, none of which are 'tick a box' solutions, but it's an artifact of the UObject reference counting system that is at the very heart of Unreal. This is a very common software engineering pattern and not some shoddy bit of work on Epic's part.
Epic do seem to be shaping up to move away from the UObject system and lean more into ECS using the Mass framework, which isn't a silver bullet, but offers a lot of performance benefits.
Normally for shader compilation stutter it should be resolved if you have the pre compile step at the beginning and perhaps later on each time you significantly change settings, drivers, etc. Moreover, let's say they don't compile all the possible combinations, but if something misses that and it stutters during gameplay, then it should be saved, cached and not really be a problem later on. Thing is... games can stutter even if you come back to the same area, doing the same thing or just simply moving the mouse around. That should really happen to a properly coded game.
Can the garbage collector be programed to do its work over the course of multiple frames or even constantly, alongside other tasks and avoid on big stuttery dump at a time?