Subnautica Performance and Framerates
Moviemakers go on and on about how hard their jobs are, don't they? Call me insane, but I figure that if your entertainment media can be re-shot over and over again, it's got to be easy-pesy. Compare a movie, which has linear progression, to a game, which has practically infinite experience permutations. Logically, that makes games infinitely harder to make, and Unknown Worlds could probably create a movie like Interstellar in about three days. Obviously I'm talking garbage, but reading garbage is the risk you run when you click on a blog post with 'hugh' at the top. Stick with me though, there's a point coming. Games are rendered in real time. A player's experience is substantially influenced by the technical effectiveness with which a game presents its endless permutations. This is a way of saying 'make your game perform better, idiot.' This blog post is a run down on our current Subnautica performance thinking. Performance, or the measure of how fast a game runs, has been top of the Subnautica agenda since the game's inception. Originally, Charlie envisioned Subnautica as a low visual fidelity, aesthetically simple game that would run on everything from the Large Pixel Collider (LPC), to an iPad. At the time, we figured that blazing frame-rates would come naturally from lower visual quality. As the project grew and matured, it evolved into a high visual fidelity game. It's not just the detail of the individual screen: We're dealing with the large groups of fish, dynamic lighting, multiple large creatures, and deformable, voxel based terrain. Adding all this stuff means we needed more computing power than an iPad could provide. At first, we asked PC Gamer if they would be willing to provide an LPC to every Subnautica customer. Like complete cheapskates, and despite the awesome cross-promotion potential, they refused. So instead, we started to think about what a realistic level of required computing power would be.

Being a game developer means selling games. You can't sell games to a target market with no-one in it. That's why the above graph is so important: Creating it told us that if we set our minimum GPU specification as an Intel HD 4600, 39% of Steam users could play it. For now (these specs are draft!) this is the line we've drawn under the bottom of our target market. Making this calculation scientifically is very important. Anyone can walk onto a forum and say 'I think that a GTX760 is a fine recommended spec.' Or, they might say 'Subnautica runs like crap.' Or, 'Subnautica runs smooth as butter.' These statements (and game forums are full of them!) are anecdotal, qualitative, and all but useless for making effective decisions about performance. How many people can actually play if our minimum spec is a GTX 660? As it happens, a whole lot less than if it is a GTX 550 ti!

Setting scientific targets is the first part of the recipe. To complete the cake, we need to hit them. That means lots and lots of testing. The graph above is one of the earlier performance tests we ran at our draft minimum specification: An Intel HD 4600 GPU, two Haswell CPU cores @ 2.5Ghz with four total logical processors, 8Gb RAM. Our minimum graphics level is 1280 x 720 resolution with all eye candy off. To read this graph, you need to stop thinking in terms of 'Frames Per Second' (FPS). FPS is nice to talk about but useless for analytical purposes. I won't go into it here, but suffice to say if you measure a game's performance with FPS, you could be missing huge issues, and analysing data is made needlessly harder. Instead, think about 'frame time' - The time it takes to render a complete frame, in milliseconds (ms). Each blue dot in the graph is a single rendered frame - The y-axis showing the length of time it took to render and the x-axis the time at which it was rendered in the benchmark. In frame times, 35FPS is equivalent to 28.6ms, and 60fps is equivalent to 16.7ms. Those two thresholds are the orange and green lines you see overlayed on the graph.


We visualise performance in a few ways. The above histogram shows the proportion of frames being rendered in three critical buckets: Those less than our minimum playable threshold (28.6ms), those less than target (16.7ms) but greater than minimum playable thresholds, and those less than target. In an ideal world, all frames would be in the green bucket. But in that ideal world, there would probably be nothing on the screen.

Hitting performance targets is a tricky business. On the one hand, many people on the team want to 'add stuff' to Subnautica. With few exceptions, 'adding stuff' results in the game running more slowly. Further, devoting engineering resources to keeping performance within target ranges means taking resources away from creating gameplay. And at the end of that dark corridor stands TotalBiscuit, ready to eviscerate us for not achieving good frame rates. (<3 you TB!) Rightfully so, too. There's no point in making games that run like PowerPoint presentations. The point of games is to interact with the game space, not watch it pass by. The slower a game runs, the greater the barrier between engagement and the player. While not everyone on the Subnautica team is obsessed with performance as I am, I don't think any of us are in the 'lower frame rates are more cinematic' camp. I hear there's dengue in that camp.
