u/Sewbacca

loreload: a hot-reloading library for love2d and lovr
▲ 12 r/love2d

loreload: a hot-reloading library for love2d and lovr

Hello there,

I've made a hot-reloading library (called loreload) that I've used and enjoyed for quite some time now. It watches all loaded Lua files and if it detects a change, it then will softly restart your game (firstly calling love.quit then reloading main.lua after which it will call love.load). If you have state that needs to be preserved either use the global table, or do some custom logic in loreload.onreload and loreload.onreloaded.

Check out the README at http://codeberg.org/sewbacca/loreload

I quite enjoy the fast iteration time. I have no idea though, how well it integrates into larger projects that load a ton of assets ahead of time. As mentioned earlier you can probably find a way to cache your asset files, but that would depend on your architecture.

Any feedback and questions are welcome. Let me know how well (or badly) it works for you!

u/Sewbacca — 2 days ago