Here’s how we’re optimizing Techtonica
You can play the Techtonica demo right now on Steam. We’re keeping it up until we’re closer to launch, but…
…it’s not entirely representative of the game experience players will have when we launch into Early Access this year.
We’ve made tremendous gains in level, art, narrative, and progression design. The gameplay loop in the demo is a close approximation to the Early Access launch version of Techtonica, but the stuff that surrounds it has seen a lot of updating.
One of our main focuses as of late has been optimization work. Today, we’ll share some footage of the demo against the current in-dev build, and we’ll dive deep into the occlusion culling system we have in place for big optimization enhancements.
Let’s dig in.
Early framerate gains
We put together a quick video pitting the demo against a recent in-dev build of Techtonica. You’ll see Steam’s FPS counter running in the top-left corner. Here are some things to note before you watch.
- Performance in our demo was solid, but...the level was barely decorated and a lot smaller.
- This video compares the demo to the still in-dev, Early Access version of the game.
- The Early Access version is 10x bigger, and it features enhanced elements like more lush plant life, facilities, and waterfalls. Put simply, it runs better even though there’s a ton more to load.
- The optimization work isn’t done! In fact, we captured this footage in front of PT VICTOR, which itself hasn’t been optimized. This will improve!
The first half of the video is the demo, the second is the in-dev version of the game as of April 2023.
It’s important to note that we’re still improving performance and optimizations. These gains really took off over the last couple of months as our team shifted focus to optimization work.
How did we do it? Well, let’s dive into one of the bigger ways…
What is occlusion culling, and how are we using it?
The terrain and all props in Techtonica are split into 30m x 30m columns. We call these columns "chunks." We used to keep everything within visible range of the player loaded in all at once, but there are so many cave walls that block players' vision of everything behind them.
For example, you could be in a small cave, but there might be a huge cave behind a wall in front of you. You can't see the big cave because of the wall; but, if that wall didn't exist, you’d be able to see everything. Our old system would have rendered everything behind this wall. This can amount to tens of thousands of plants and machines and other expensive landmarks, like Production Terminals and Facilities, all getting rendered when they don't need to be.
In most games, you can pre-compute information about when to hide those objects since the position of the big props in the game never changes. However, in Techtonica, you can destroy just about everything in the game, so we cannot pre-compute that data. A wall hiding your view of another cave might get M.O.L.E.d away in a few minutes.
To solve this, we've rigged up a system to detect when those 30 x 30 "chunks" are blocking the visibility of another chunk or if they’ve been dug out with the M.O.L.E..
Using a simple search algorithm combined with this data, we can evaluate quickly which chunks are not visible to the player, and we can hide everything in those chunks (machines, belt resources, plants, rocks, facilities, etc.).
Below, you’ll see two GIFs.
First, we have a player panning back and forth with an overhead of the map. The front half of the GIF features no occlusion culling. The second half features occlusion culling, and you can see the map space load in and out as the player pans.
In this next GIF, we show you the moment when a player bursts through a wall with the M.O.L.E.. The map loads as the line of sight is established.
This is a really big win for us as we more or less cut down the amount of stuff rendered and visually simulated to a tenth of the original amount in most cases!
That’s it for this update. See you next week!
P.S. We totally overhauled our Discord and are now hosting community streams and events all in one place. Come hang out! discord.gg/Techtonica.
- Oldest ▾