-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
area:assetsAsset managementAsset managementarea:pluginPlugin infrastructurePlugin infrastructuretype:epicLarge feature umbrellaLarge feature umbrella
Milestone
Description
Overview
Create a centralized asset management system for loading, caching, and lifecycle management of game resources. Handles textures, audio, models, animations, and custom asset types.
Why Asset Management?
Currently, each plugin loads resources directly:
- Graphics:
graphics.CreateTexture(path) - Audio:
audio.LoadClip(path) - Animation: Load clips manually
Problems:
- Duplicate loading (same texture loaded twice)
- No reference counting (when to unload?)
- No async loading (frame hitches)
- No hot-reload support
Architecture
KeenEyes.Assets/ # Single project
├── Core/ # AssetManager, handles
├── Loaders/ # Type-specific loaders
├── Caching/ # Reference counting, LRU
└── Pipeline/ # Async loading, streaming
Design Principles
- Opaque handles - Assets identified by handles, not paths
- Reference counting - Assets stay loaded while referenced
- Async loading - Non-blocking loads with callbacks
- Pluggable loaders - Register loaders for custom types
- Hot-reload ready - Watch for file changes (dev mode)
Key Types
| Type | Purpose |
|---|---|
AssetHandle<T> |
Type-safe reference to loaded asset |
IAssetLoader<T> |
Loads specific asset type |
AssetManager |
Central loading and caching |
AssetRef<T> |
Component-friendly asset reference |
Deliverables
- #TBD - Create KeenEyes.Assets project
Success Criteria
- Load assets by path, get handle back
- Reference counting (auto-unload when unused)
- Async loading with progress callbacks
- Built-in loaders: textures, audio, models
- Custom loader registration
- Asset bundles for packaging
- Hot-reload in development mode
- No duplicate loads (caching)
Metadata
Metadata
Assignees
Labels
area:assetsAsset managementAsset managementarea:pluginPlugin infrastructurePlugin infrastructuretype:epicLarge feature umbrellaLarge feature umbrella