Binary Archive Module

Hello folks! I’m making an official post about a current project for bundling and using assets in an archive/bundle.

This is a Lua approach and not part of the Solar2D Core, it comes in the form of a Lua module.

The archive works without extracting assets to disk, but in usage of this fashion is limited to images via the existing Bytemap plugin, and common data.
Audio files can also be used via SoLoud plugin, which was recently released by StarCrunch, his post has a working Win32 sample I quickly bundled together.

I’m looking for devs to test it out and provide feedback, issues, suggestions, requests, etc.

Samples, documentation, and source available here:

Thanks!

6 Likes

Like we’ve talked about, this is some really cool stuff.

Have you considered simply overwriting the associated original Solar2D API with the one’s in the module? That way, if someone loads up this module, then they wouldn’t need to make any changes to their API usage in their existing projects.

Have not considered it, but on a quick thought I came up with more reasons not to do it. :grinning_face_with_smiling_eyes:

I would leave the ball on their court if they are brave enough, but they would need to keep in mind that baseDir is not used in the module as they are in Solar2D’s API. :slightly_smiling_face:

Yeah, my thinking was along the lines of:

local _newImage = display.newImage

function display.newImage( ... )
    -- do binary archive stuff
    return _newImage( ... )
end

I guess I’ll get a better idea of that this week when I’ll (hopefully) have some time to get better acquainted with the module.

2 Likes

Funny, my thought was display.newImage = bin.newImage.

But that actually sparked something else to shorten the code for newImage and newImageRect. I’ll look into it tomorrow. :+1:t3:

1 Like

Great module! We already use it in our games.

3 Likes