RscPackage() proc
Format:
client << RscPackage(url)
This will download the resource package located at the specified url.
The url can only be a web address, listing to any media file supported by BYOND,
(.png, .jpg, .bmp, .ogg, .mid, .wav, .zip)
Where the zip contains the files which will be extracted into the recipients cache for the specified game.
BYOND/cache/Author/GameName/File.ext
When prompted to download the file again, it will check to see if the new file is different from the old.
If not, then it will skip downloading.
Why would this be a good idea?
Authors who want to provide a higher-sound quality for players can do so by using .ogg files.
However, with the increased quality comes increased file size. Which will scare away the dial-up or low bandwidth users.
I have tested this: http://www.byond.com/developer/forum/?id=744098
But did not get it to work, so I am asking for something similar to this be implemented.
2.) On top of this new suggestion. I would like to see
Code.dm:1:error: 'file.ext': cannot find file
be set to run-time, just in case it is included in a resource package which will not be compiled with the actual game.
mob
var/quality=null
Login()
if(!quality)
switch(input("Would you like High Quality or Low Quality sounds?\nLow Quality is recommended for dial-up users.\nHQ: 49.6 MB\nLQ: 412 KB") in list("High Quality","Low Quality"))
if("High Quality")
src<<"This will take some time to download."
client<<RscPackage("http://www.example.com/HQ.zip")
//Contains files: musicname.ogg, superawesome.png
quality="High"
if("Low Quality")
src<<"This will take some time to download."
client<<RscPackage("http://www.example.com/LQ.zip")
//contains files: musicname.mid, superawesome.jpg
quality="Low"
if(quality=="High")
src<<sound('musicname.ogg')
if(quality=="Low")
src<<sound('musicname.mid')