Terra Vitae is meant to run on an ordinary computer, not only a fast one. You can run a world at normal speed (1x), twice as fast (2x) or four times as fast (4x), and the world you get should be the same whichever you choose. At higher speeds it simply happens sooner. This month went into making that hold true on machines that aren’t fast.
Work in progress · in-gameUsing the time each frame has
Every frame, the game has a small amount of time to spend on running the world, and the rest goes on drawing the picture. That time used to be fixed at 8 milliseconds, no matter how well the game was keeping up.
Now it starts at 8 milliseconds and slowly grows towards 12 while frames are arriving on time. If a frame turns up late, it drops by 2 straight away. So a computer with room to spare lets the world run faster, and one that is struggling gives time back to the drawing, so the game stays smooth.
Animals that think faster, and in parallel
Animals spend a lot of effort looking around: what can I see, what is nearby, who is a threat. We’ve made that cheaper. With a dozen animals, the world now takes about a sixth less time to run. With 24 or 48 animals, it takes a third or more off.
Animals’ scripts also now run side by side on several of your computer’s processor cores at once. The result is exactly the same whether it runs on one core or eight, so a world turns out identically at 1, 2, 4 and 8 workers. The game chooses how many to use by itself, which is one fewer than the number of cores you have, up to a maximum of eight. If you would rather choose, there is a script_workers setting in the options.cfg file.
How it runs on a real low-end laptop
Concept art · created with the help of AIWe build the game on Windows and test it on a budget laptop with an Intel Core i5-1334U, 16 GB of memory and built-in graphics. It is a long way from a gaming machine. Here is how Telluria runs on it with the window at 1280 by 720.
With 12 extra animals, every speed keeps up, including 4x.
With 12 animals and 80 items, 1x and 2x keep up. At 4x the world reaches between 3.5 and 3.9 game seconds for every real second, which is close but not quite 4.
At 1920 by 1080 with the same crowd, 1x and 2x still keep up, but 4x only reaches about 2 to 2.9 game seconds per real second. A bigger picture takes more time to draw, which leaves the world less time to run.
The game uses about 75 MB of memory, plus whatever graphics memory the pictures need.
What we don’t know yet
That is one laptop. We haven’t yet measured anything weaker, a laptop running on battery or in power-saving mode, or a long session where the machine gets hot and slows down. The Windows version runs and builds, but a packaged Windows release is a job for later.