Why does a game like Planet Coaster run horrible once you have a lot of guests + props vs GTA5 ?

My guess is CPU limitations for all the "AI"? Not sure, though. I know that games like Supreme Commander would start to drag once you got a LOT of enemy AI units running around.
 
You would need a 12Ghz CPU to fix Planet Coaster. It's pretty heavily single thread like most sim games.
 
It's using Unity which isn't going to be a particularly performant engine because it is written for generalization (even though it's core is C++) and I've heard a few mentions of it being bad at having too many objects/actors (doesn't scale well). Additionally, the API is all managed C# which comes with overhead and baggage which can also reduce performance. I would be shocked if GTA V wasn't written in C++ by programmers sweating the details for performance. Cursory research indicates that Rockstar's RAGE engine is C++ and you damn well know they're squeezing everything out of their own solution and digging into performance issues for their specific use cases (they solve the problems they have, not generalizing solutions).

I will say that Unity has a new Principal Engineer who is liable to shake things up

 
Last edited:
Remember in GTA5 that NPCs disappear once you get too far away; they are just in the world as filler and have no impact aside from existing.

By contrast, each NPC in Planet Coaster (and other games like it) carry a much higher processing load, as they have to decide where to go and what to do, what financial decisions to make, and so on. There's a much higher processing load per NPC then in games like GTA5. And since parks can have thousands of guests at a time...you see how that can become a CPU problem fast.
 
It's using Unity which isn't going to be a particularly performant engine because it is written for generalization (even though it's core is C++) and I've heard a few mentions of it being bad at having too many objects/actors (doesn't scale well). Additionally, the API is all managed C# which comes with overhead and baggage which can also reduce performance. I would be shocked if GTA V wasn't written in C++ by programmers sweating the details for performance. Cursory research indicates that Rockstar's RAGE engine is C++ and you damn well know they're squeezing everything out of their own solution and digging into performance issues for their specific use cases (they solve the problems they have, not generalizing solutions).

C# can be written in a fairly optimized way, but it takes a bit of doing if you come from the world of having done C++ for decades.
 
C# can be written in a fairly optimized way, but it takes a bit of doing if you come from the world of having done C++ for decades.

GC and managed code languages are unlikely to ever be as fast in time critical applications as something where you can control memory allocation/access/freeing/etc and data arrangement explicitly. The ideas of doing that much manual management of memory and data structures are anathema to the language specs and it's why going for levels of control approaching that of lower level languages are flagged unsafe by the language itself (oh you want to use pointers? unsafe! don't want something to initialize? that's special too). If that's the route you go, why are you using these languages at all? Additionally, JIT compilation and running on a VM are adding yet more overhead. Game applications have hard limits to performance targets that are acceptable (~33ms for 30FPS). Adding layer after layer of cruft isn't going to make your very performance intensive application faster or more repeatably fast. Generalized solutions are unlikely to make for the best performance either, such as were present in older versions of Unity; and the Unity scripting engine GC will halt the game to perform GC and if that takes too long you'll suffer serious hitching. Lots of Unity's power and flexibility is around the scripting engine. They're trying to fix it in the Unity 2019 version with incremental GC but that doesn't help people using older versions of the engine. If you need to get everything from the hardware that you can in order to make sure you're finishing everything you need in 33ms then high level languages aren't going to provide what's necessary because you need control over what happens and when on the hardware.

Remember in GTA5 that NPCs disappear once you get too far away; they are just in the world as filler and have no impact aside from existing.

By contrast, each NPC in Planet Coaster (and other games like it) carry a much higher processing load, as they have to decide where to go and what to do, what financial decisions to make, and so on. There's a much higher processing load per NPC then in games like GTA5. And since parks can have thousands of guests at a time...you see how that can become a CPU problem fast.

Stating that the GTA5 actors aren't doing things except "existing" is disingenuous as each of them also has an AI attached to them which is making decisions (such as pathing or what to do in combat).

Rollercoaster Tycoon was written almost entirely in x86 Assembly and does most of the same things the actors in Planet Coaster do with over three thousand of them (required for a Loopy Landscapes scenario) in the park and ran on hardware 1/10th as fast as that of today and limited to one executing CPU. Planet Coaster should be rip roaringly faster and more capable than a game that's two decades old and it isn't.
 
$137 million versus $7 million... hmmm, let me think
 
So wrong. Learn to gamedev.
I'm sorry for neglecting to put my disclaimer stating that everything in my post is my own opinion.

I did learn to gamedev. Unity has been falling out of favor as a viable engine even among indies among the past few years. It was made to be accessible, and that is it's biggest problem.
 
Back
Top