I'm starting a relatively large game project, so to make sure I can iterate efficiently I spent a few days setting up some tooling for automated asset building and reloading in-game. I did a write-up on my blog here, with some code samples.
I recommend reading the post, but here's the gist of how it works if you don't want to read the whole thing:
- An optional module loads
inotify
and watches my asset dirs for file change/move/rename events (move & rename are used by some applications for safe saving/exports) to trigger reloads in my asset manager
- Rather than returning loaded assets directly, my asset manager wraps them in a Lua table. That wayI can safely hold onto refs across reloads.
- In order to keep data from DCCs that require export (right now, just Tiled) up-to-date, I have a separate asset exporter built with C# that watches & re-exports source files similarly to the ingame asset manager
I figured this could be interesting to anyone here who isn't working in a graphical engine, keeping your iteration speed high is highly important in gamedev after all!
If anyone else has built similar tech for their games, or you have your own methods for efficient asset production, it'd be cool to see what you came up with!