A LÖVE asset manager that exposes project directories as Lua tables for lazy-loaded, cached asset access.
Cargo is a LÖVE asset manager that maps project directories to Lua tables, enabling automatic, lazy-loaded access to game assets like images, sounds, and fonts. It solves the problem of manual asset loading and boilerplate code by allowing developers to reference assets directly as table properties without explicit load calls.
LÖVE game developers who want to streamline asset management, reduce repetitive loading code, and improve project organization in their Lua-based games.
Developers choose Cargo for its intuitive directory-to-table mapping, lazy loading with caching, and flexible configuration options, which together simplify asset workflows and reduce runtime overhead compared to manual asset management.
LÖVE asset manager
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Maps project directories directly to nested Lua tables, allowing assets to be accessed without manual load calls, as demonstrated in the example where assets.images.player is used in love.graphics.draw.
Assets are loaded on-demand and cached, reducing initial load times and memory usage, which is highlighted in the lazy loading and caching feature description.
Supports custom file extension loaders, enabling integration with any LÖVE asset function, shown in the advanced configuration with the loaders table.
Allows pattern-based processors for tasks like setting image filters, as illustrated in the processors option example for images.
The loader for .ttf and .otf files returns a function that requires a size parameter, making it less intuitive than direct asset access, as noted in the README.
For .fnt files, the image file path must be set within the file itself, since Cargo doesn't pass it to love.graphics.newFont, limiting flexibility for some use cases.
Cargo is designed solely for file system directories and lacks native support for assets from sources like networks or databases, requiring workarounds for dynamic loading.