GMS 2 Advice for packed resources?

Tsa05

Member
I'd like to be able to take a number of sound files, combine them all into one single resource file package, and use them in GameMaker. Lots of games seem to do this kind of thing with media files; it makes it much easier to supply updates and downloadable extra content.

I could obviously pack everything in a zip and extract on download, but....

It seems as though GameMaker has the utilities to lad up a buffer and designate sound resources based on buffer position. This seems much faster than extracting each asset and adding a new sound resource using the regular functions--the manual indicates that the buffer is used in-place instead of copying each sound file's data into a new sound resource.

It caught my attention as a potentially interesting and beneficial way to pack resources, but I've been unable to determine what needs to be done to get a sound file into a suitably formatted buffer in the first place. The manual's examples show how to have GameMaker record audio to a buffer (and then assign to sound resources), but what if I've got external files?

Has anyone poked into loading files into buffers? Turning an mp3 or ogg into a buffer?
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
If you group sounds into an "audio group" it'll be packed into a separate file just as you describe.
 
Top