Caching system for assets when switching/teleporting between games

As a Roblox developer, it is currently too hard to provide large games to players who have slow Internet connections.

If Roblox is able to address your issue, how would it improve your game and/or your development experience? Please be as specific as possible.

I would like to propose a system allowing developers to cache any assets loaded from the Roblox CDN (CSG objects, images, sound files, etc). The Roblox client would save any cacheable files onto the disk and keep an index of them. This would allow games to load much more smoothly and use less bandwidth. Communications with the CDN should be implemented with HTTP ETags or a similar system.

There may be concerns about this making it easier to spoof the loaded assets, especially animations. Of course, the client should never be trusted. To help combat abuse up to some degree, a check could be implemented on the client to ensure that the hashes of the files stored on the disk match those reported in the index. Should the hash in the index be outdated or mismatch the file, the cache will be updated.

Some developers might also be worried about the potential of their assets being stolen due to being easily accessible on the disk. While there are always ways to copy anything that is available to the client, it might be useful to provide a checkbox that controls whether an asset can be cached or not.

In conclusion, a caching system for multimedia assets would make the general playing experience much smoother for players, especially those using slow connections.


Please feel free to post any suggestions and criticism for this feature proposal.

6 Likes

Roblox already caches assets on disk. Check %TEMP%\Roblox\http on Windows. This folder is 900MB currently for me (~10k items), so that can store quite a few cached assets.

Could you explain more about the specific use case where you are running into trouble with assets taking too long to load? How many assets does your game use?

11 Likes

Frankly, I don’t actually have a specific use case for any game of mine. I was having trouble with Phantom Forces taking long to load and I saw that the HTTP Request Queue was slow to deplete (Shift+F3), so this idea popped to mind. I never actually realized that caching was actually implemented. So in the end, it turns out I have suggested a feature that alread exists! :- )

It would also be nice to have documentation on the asset caching feature. I don’t know about the general public, but it was a completely surprise to me, at least.

2 Likes

Pretty sure it doesn’t cache everything that’s necessary, as when I’m loading the game I download at least half my game when I join in the game. My game is currently around 600mbs in size, Roblox downloads at 2.8 mb/s for at least a minute everytime I teleport or join my game. However it’s way faster in studio when I just directly play the game.

1 Like

Do you have ReloadAssets checked in your studio settings?

image

I think this also has an effect in-game, not just in studio.

No I don’t have it enabled, just checked it.

1 Like