ID:2648436
 
Applies to:DM Language
Status: Open

Issue hasn't been assigned a status value.
This request stemmed from a discussion in discord today inspired by Kuro about how resources are loaded on the client.

This syntax is still in flux, and is open to suggestions.


Reasoning:

Some resources are large and take Dream Seeker time to load, and as Dream Seeker only loads resources on demand, this can cause stuttering on the client. It would be nice if we could have control over when some of this happens by demanding that Dream Seeker load something, and so that we could clue it into how long it should hang on to specific resources.

//tell a list of clients to load specific resourcess for a specific duration
users << preload_resource(resource1[,resource2...,],duration=0)
users << preload_resource(resource_list,duration=0)

//tell a list of clients that they can unload resources
users << unload_resource(resource1[,resource2...])
users << unload_resource(resource_list)


By default, BYOND keeps resources loaded for 5 minutes so long as they are not currently in use. preloading them with a set time frame would change this behavior by allowing items to be left preloaded for longer than normal (passing a specific number of minutes), the normal duration (passing 0), or indefinitely (passing -1).

Telling the client to unload resources would not instantly unload them. Instead, it would trigger a check for whether the resources were currently in use, and clear any longer than normal loading times that had been applied. If not currently in use, the resources would then be unloaded.

It would also be nice to move resource loading to a background worker, so that it doesn't cause stuttering, and it would also be nice to be able to query the loading progress of the client for demanded resources so that users could build their own loading screens/animations, but that'd just be a nicety.
+1
Thanks for doing the heavy work and submitting the request.
To clarify, is this talking about the actual loading of icon/sounds/etc into dreamSeeker's memory from disk, and not the networking side of fetching it from dreamdaemon?
In response to MrStonedOne
MrStonedOne wrote:
To clarify, is this talking about the actual loading of icon/sounds/etc into dreamSeeker's memory from disk, and not the networking side of fetching it from dreamdaemon?

Yes. This is about preloading so for example a big icon doesn't hit performance badly when it loads, or a large sound/music file plays right on cue without a load delay.
Implemented for 514.
Would be even +1'er if
list << Function()
called that function on everything inside of list

Login to reply.