ID:195036
 
If you use a lot of graphics on your browser-based interfaces, you'll appreciate this method. Instead of calling browse_rsc 50 times with individual resource files, use this simple method to quickly pre-load all your browser dependency files.

client
New()
..()
send_resources()

proc
send_resources()
for(var/F in flist("BrowserResources/"))
F = file("BrowserResources/[F]")
src << browse_rsc(F, "[F]")


Simply place all your dependency files (pictures, music, etc.) in a new "BrowserResources" folder in your project directory.

This technique may not be suitable for distributed games as you will have to include the package of raw image files in the distribution. I made this for games that have a central server hosted by a trusted party.


~Polatrite~