1.6 C
New York
Sunday, December 14, 2025

Ask a Recreation Dev


On the planet of computer systems, it takes various quantities of time to learn knowledge from a selected supply. Sure knowledge sources are a lot quicker to learn from than others. Right here’s the overall hierarchy for learn occasions:

  1. Cache hit (1-20 nanoseconds)
  2. Not in cache, learn from reminiscence (15-20 nanoseconds)
  3. Not in reminiscence, learn from SSD (25-100 microseconds, i.e. 25,000-100,000 nanoseconds)
  4. Not in reminiscence, learn from onerous disk (5-10 milliseconds, i.e. 5,000,000-10,000,000 nanoseconds)
  5. Not in reminiscence, learn from blu-ray disc (100+ milliseconds, i.e. >100,000,000 nanoseconds)

As you’ll be able to see, cache and reminiscence reads are actually quick however studying from both SSD or HDD are extraordinarily gradual as compared. HDD reads are orders of magnitude slower than studying from SSDs, that are additionally orders of magnitude slower than studying from reminiscence. Studying from bodily media like a blu-ray disc is even slower than that. This time price is incurred every time the sport must learn knowledge that isn’t in reminiscence, e.g. when loading a brand new space, a brand new enemy, a brand new character, impact, and so forth. from the disk.

One of many methods for optimizing load occasions is to reduce the quantity of “search time” it takes for the slower units like HDDs and blu-ray discs by having redundant copies of the identical knowledge on the disk. That is like having a number of kitchens arrange across the workplace as a substitute of simply within the kitchen – employees don’t should stroll as far to get a snack. It isn’t essential if the workplace is small, however having just one kitchen when your workplace homes a thousand folks throughout ten flooring means a reasonably large bottleneck at mealtimes. A number of redundant kitchens will velocity issues up as a result of employees simply want a kitchen and they’ll usually want the closest accessible one. A number of redundant chunks of knowledge will make search occasions quicker as a result of they’re all the identical and the reader doesn’t should go as far to get what it’s in search of.

image

Having redundant choices comes at the price of disk area. Having a number of drink stations or kitchens implies that area can’t be used for a lounge or recreation stations or storage or extra workplaces or anything. Not each recreation does this as a result of they don’t at all times have that choice – if the sport options plenty of tremendous excessive res textures and top quality audio, these property will eat up a ton of disk area on their very own even with out duplication for entry velocity. This can be a alternative the Helldivers dev group made to assist velocity up entry time in decrease spec machines. It looks as if they determined that the velocity financial savings wasn’t definitely worth the disk area tradeoff as a substitute.

[Join us on Discord] and/or [Support us on Patreon]

Bought a burning query you need answered?

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles