PCPOWERPLAY

Deceptivel­y small

How HITMAN 3’ s developers cut the trilogy’s install size in half

- Wes Fenlon

Hitman 3 is an enormous PC game – at least if you own Hitman 1 and 2, which Hitman 3 can import to bring the entire trilogy into a single package. That sounds like a recipe for an install size big enough to make an SSD cry, because Hitman 2, with the first game’s levels imported, is currently 149 gigabytes. Hitman 2 is one of the mightiest storage hogs on PC, second only to Call of Duty. But Hitman 3 will actually shrink instead of grow, retroactiv­ely optimising the first two Hitman games into a dramatical­ly smaller package. How did IO Interactiv­e manage to halve the install size? We asked the developer to break down the technology and techniques it used to cut 80 gigabytes out of the trilogy.

“With all content installed, including the locations from Hitman 1 and Hitman 2, we’re expecting Hitman 3 to clock in at approximat­ely 60-70 GB and we’re really happy with that,” IO Interactiv­e’s chief technology officer Maurizo De Pascale says.

Even without the older games bundled in, Hitman 3 is a leaner install than IO has managed to pull off with its last two games. As De Pascale explains to me, the answer is simple: more compressio­n. But why Hitman 3’ s compressio­n is so effective, and why they didn’t use the same techniques last time, is where it gets more complicate­d (and more interestin­g).

Hitman 3 uses a technique called LZ4 compressio­n that’s been around for about a decade. Almost everything in the game runs through this compressio­n algorithm, which is especially efficient. Here’s how De Pascale explains it, “Almost all lossless compressio­n techniques exploit the fact that data often has repeating sequences. For example, ‘HITMAN’ or ‘IO Interactiv­e’ will likely appear frequently in an article about IOI.

“Those duplicated sequences don’t need to be stored multiple times and can be omitted, as long as you embed some informatio­n in the compressed stream about where they appeared originally, so that you can still perfectly reconstruc­t the initial data. The super simplified descriptio­n of LZ4 is that it replaces those lengthy sequences with a reference to a sequence that has previously appeared in the decompress­ed stream.

“So instead of storing the word ‘compressio­n’ as-is, the algorithm can store the equivalent of ‘the word that appeared X words ago’, which can be very efficientl­y encoded with few bits. Of course that’s not exactly how it works, but it’s sufficient­ly close to convey the idea.

“This is actually a pretty common technique, which other compressor­s employ as well, but LZ4 has a very performant implementa­tion that provides a good trade-off

between reasonable disk compressio­n and great decompress­ion speed, which makes it a common choice for videogames.”

COMPRESS GANG

With Hitman 1 and 2, IO didn’t apply compressio­n as broadly “to avoid performanc­e issues on low-spec hardware”. The game only has so much CPU power to work with, so decompress­ing data has to be weighed against everything else it’s doing, like running the AI and processing inputs. The trade-off is to skip compressin­g some files, resulting in a larger install but better performing game. By Hitman 3, engine improvemen­ts have lightened the load in other areas, freeing up more processing cycles to spend on compressio­n.

Another big improvemen­t comes from how IO is importing the data from Hitman 1. Because the game was built episodical­ly, every episode had to have all the code and assets needed to work standalone. “In Hitman 3, we’re handling the way we give access to the legacy titles in a different way, which makes it easier for us to aggressive­ly de-duplicate these shared resources,” De Pascale says.

The drawbacks of that DLC model actually mirror an older cause for bloated game install sizes: hard drive seek times. Inside a hard drive, an arm with a tiny read/write head has to move to the physical location of the data on the magnetic disk to read it. This means hard drives are way better suited to sequential reads than they are random reads – imagine how much more difficult it would be for you to read a book if a paragraph was split up between pages 1, 13, 46, 118 and 253, for example.

To compensate, game developers “end up carefully storing meshes and textures in the order that you can predict they’ll be loaded in memory,” De Pascale says. “Sometimes you might even duplicate the same resource, just to avoid having to seek around and break a potentiall­y longer sequential read.”

SSDs are also faster at sequential reads than random ones, but because they don’t rely on moving parts, the performanc­e hit is nowhere near as severe as it is on a hard drive. Games designed purely for SSDs today don’t have to employ those tricks. But IO Interactiv­e has developed all three Hitman

games to run on consoles, too, and the PS4 and Xbox One use 5400 RPM hard drives made a full decade ago (with measly 8MB caches, to boot). De Pascale says that IO Interactiv­e still uses technology that the studio built for when its games were loading directly from DVDs, which are even slower than hard drives.

Now that the PlayStatio­n 5 and Xbox Series X are here with next-gen SSDs, that technology is hopefully soon to be obsolete, and any game developers who still duplicate resources for faster load times can follow IO’s lead in slimming down their games. Will Call of Duty: Warzone

manage to shave off some dead weight in 2021? Even if it does, it’s going to be hard to upstage Hitman 3’ s 80 gigabyte diet. Agent 47’s definitely going to need a new tux.■

EVERY EPISODE HAD TO HAVE ALL THE CODE AND ASSETS NEEDED TO WORK STANDALONE

 ??  ?? Just look at this place. No wonder Hitman2 was so big!
Just look at this place. No wonder Hitman2 was so big!
 ??  ?? FAR LEFT: First stop for Agent 47 in Hitman3: the tailor, obviously.
FAR LEFT: First stop for Agent 47 in Hitman3: the tailor, obviously.
 ??  ??
 ??  ?? LEFT: I assume this is the vault where IO keeps all its fanciest compressio­n tech.
LEFT: I assume this is the vault where IO keeps all its fanciest compressio­n tech.

Newspapers in English

Newspapers from Australia