The parks you guys are building are getting crazier all the time, so I’ve spent the last two weeks almost entirely on performance optimizations.

There are three major areas that have been improved.

Rendering

Big Parkitect parks can contain tens or even hundreds of thousands of objects, and Unity was not too great at rendering lots of individual objects so far.

That’s why we’ve been eagerly looking forward to upgrade to Unity 5.4, which we’ve been testing over the last half year or so and which seems stable enough to use now.

Unity 5.4 adds instancing, which is a technique that allows faster rendering of multiple copies of the same object and moves a bunch of work that previously needed to be done on the CPU over to the GPU. Due to the way scenery works in Parkitect the same objects are usually on screen tens or hundreds of times and as a simulation game we need all the CPU time we can get, so that’s perfect :)

They also added experimental support for improved multithreaded rendering, which helps quite a bit as well.

Guests

We want to have as many guests in the park as possible, so they have already received the most attention for optimizations in the past.

There were still some improvements left to be done though, especially for off-screen people.

Mouse picking

Some of the parks you’ve built got so big that even something as seemingly trivial as figuring out what object is below the mouse could become a performance problem.

We’ve previously used Unitys mesh colliders for this; their intended purpose is more for adding physics interactions to a couple of objects, but it worked well enough in the past.

Since the game received scenery and more content though we’ve seen parks were it could take up to a second to figure out what’s below the mouse in extreme cases…so we’ve replaced that with a custom solution now that’s more suited for our needs and brings that time down to a couple milliseconds.

Results

We’ve tested with a couple of different scenes. Here are some of the results on two of our test systems (graphs showing milliseconds required to calculate each frame, so less is better):

More stuff

Stuff going wrong can cause performance issues as well. Especially right after game updates we’re receiving a bunch of reports about strange issues and performance problems that are usually caused by mods not being compatible with the newest game version yet. Luuk worked on this error window that identifies broken mods and contains the error message so that the problem can be reported to the mod author:

Tim worked on allowing to set specific colors for certain shop products:

And on this area delete tool that lets you select a bunch of objects at once (like the selection tool for creating blueprints) and then delete them:



And we’re displaying some of the controls on screen now depending on context, which should help new players (can be disabled). Eventually this should evolve into a proper tutorial.

And there are some new palm trees: