• Register
Post news Report RSS A common delusion about Starbound performance

Here I'll try to describe what the real problem of Starbound performance is.

Posted by on

The problem is not exactly in CPU

There is a common belief that Starbound lacks performance because it does not utilize GPU-power, but instead does everything (or mostly everything) on the CPU. It turns out to be not true. Or better say, it's not necessarily true. Starbound still does a lot of computations on CPU, but it:

  1. is not the bottleneck
  2. is what every game does: no matter how powerful your GPU is at rendering things, the game still computes a lot on CPU. For example: collision checking and corresponding entity transformations.

In other words, the GPU is not a magic box that does all computations on its side. It does a huge amount of computations necessary for rendering, especially in 3D games of course. But things like positions/scales/rotations etc, which are needed not for rendering, but for game logic itself, are still done on the CPU (except for some cases when you could indeed utilize GPU in theory, but that is relatively rare), and that is usually not a problem.

As an indirect evidence of that, you can look at debug info in game to realise this:

not cpu bound

Here I took a screenshot in a quite intense scene. Update rate, which is essentially the amount of frames the CPU handles, is close to 60. But the render FPS barely reaches 30.

What's the problem then?

If it was some abstract/unknown game, one may have thought that the GPU is just too slow to render what it is asked. But when you know it's a graphically simple 2D-game, you understand that it just can't be true. And you will be right: the problem is not in the GPU. The problem lies in a non-efficient usage of GPU, or better say - non-efficient communication with GPU.

When it comes to rendering, no matter how powerful you GPU is, there is still a very important aspect of how do you ask it to render the things you want. How well it is prepared beforehand for doing this, etc. And that's where the Starbound performance issue is.

You can roughly compare it to a set of logistic tasks. Imagine you are doing deliveries, you have a courier, and you are most probably interested in doing as much deliveries as possible. Or at least 60 per day :) Ideally, you would like to give your courier a complete list of deliveries for this day, as well as the most optimal routes (the known travelling salesman problem). It is not always the case, but you would still want to give at least optimal batches of deliveries. Obviously, if you give the tasks in a non-efficient way, the courier will just spend a lot of time on overheads, like visiting neighboiring places multiple times, etc. Add to that some other factors (like, the courier needs different vehicles, and/or specific times to deliver), and the problem can become even worse. And istead of planned 60 or even 200 deliveries per day, they will do 30-40 at most, even if they are very fast by themselves and have the best vehicles in world.

Same happens with rendering. And that's what can be optimized in Starbound.

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: