defun-games / claylib

A Common Lisp 2D/3D game toolkit built on top of Raylib 4.5.
zlib License
69 stars 4 forks source link

Support asset re-use across scenes #45

Closed mjkalyan closed 1 year ago

mjkalyan commented 2 years ago

Currently, unload-scene-* functions free both objects and assets associated with a scene. Typically, we'd have our *assets* somewhere globally and our make-scenes will reference that asset list. When we free one scene using something in *assets* we'd need to reload it for another scene to use it. Maybe we need to split %free into %free-assets and %free-objects. Same thing when scene parameters make their way into the mix.

mjkalyan commented 2 years ago

%free :later or %free :never would work, of course, but that would also keep the objects around.

shelvick commented 2 years ago

Sure, but let's keep :free as a convenience feature to hold onto everything.