SoftLEASH game engine logo

WIKI

LUA / LÖVE

SOFTLEASH / DOCUMENTATION

Asset Manager

Load resources deliberately and keep them in one predictable place.

A working outline. The snippets below use plain LÖVE and Lua, not the final SoftLEASH API.

Overview

An asset manager helps organize images, audio, fonts, and other resources. Loading an asset once and reusing it keeps ownership and resource paths easier to follow.


Describe the supported resource types, cache keys, loading rules, and release behavior here. This small example loads and reuses a LÖVE font without requiring an external asset file.


LÖVE example

A small, plain LÖVE example for the draft. Replace this snippet with the documented SoftLEASH API and a focused use case later.


local g = love.graphics
local assets = {}

function love.load()
    assets.font = g.newFont(18)
end

function love.draw()
    g.setFont(assets.font)
    g.print("Loaded once.", 24, 32)
end
local g = love.graphics
local assets = {}

function love.load()
    assets.font = g.newFont(18)
end

function love.draw()
    g.setFont(assets.font)
    g.print("Loaded once.", 24, 32)
end
local g = love.graphics
local assets = {}

function love.load()
    assets.font = g.newFont(18)
end

function love.draw()
    g.setFont(assets.font)
    g.print("Loaded once.", 24, 32)
end


What to document next

  • Resource paths, keys, and supported types.

  • Caching and reusing loaded assets.

  • Missing resources and cleanup.

SOFTLEASH / A GO DOG! TOOL

DOCUMENTATION IN PROGRESS

DOCUMENTATION IN PROGRESS