I’m experimenting with using AI agents for developing games / libraries / scripts / UIs / etc with Defold, and I’ve stumbled upon a problem: these agents need access to the actual dependency files to be useful. Without that, they start hallucinating fake APIs or file references.
A simple workaround could be to copy all dependencies into the local project (Defold supports local dependencies, which then override the remote ones). But this approach has a few drawbacks:
- It requires a lot of manual work if a project has many dependencies.
- It’s not clear which version of each dependency is stored locally.
Has anyone already solved this? Maybe with an editor script that could automatically download all dependencies, unpack them locally (i.e. their include_dirs), and store a version info file?
Or maybe it’s even better to ditch the built-in “dependencies” section in game.project and instead create a custom dependency manager - something that can check for updates, keep everything locally, and maintain a lock file (similar to how npm, cargo, and other systems work)?
Would love to hear if anyone’s tried something like this or has tips on how to approach it.
2 Likes
In my Defold In-Editor Asset Store, which currently have dependencies management, I also have a “assets” management (not public), which is designed for distribute just folders (widgets, particles, shaders etc)
When download, currently I have a solution that version file is created and stored in this asset folder to check for future updates
Seems it can be modified in the way to manage dependencies in the same way, where instead of game.project dependencies links will be downloaded folders with a version to manage them for future. Everything will be stored locally, free to update that code (but all this changes will be lost after update in future seems) and build & load project faster (no network checks).
Sound like a good option to have in future and for this case also with LLM
About manual copy dependencies folder - you can just select a dependency folder at Assets Pane, use copy/paste and it will create a real folder for you. Sometimes it’s pretty convenient
3 Likes
Yes!
Ah, and you’re thinking of pushing the dependencies files into the project’s git repo? That wouldn’t work well for me, since we have a dependency that’s over 200 MB - it includes its own asset library, which we’ve started reusing across multiple projects. So my plan was for the custom “dependency manager” to download the assets into the project, while adding all those folders to .gitignore.
On the other hand, if all dependencies are stored directly in the project, it makes it easier to see what exactly changed when authors update them - that’s a nice advantage, too. Hmm (just thinking out loud here)
Yes yes, that’s exactly what I’m doing right now!
1 Like
I also often use symlinked folders (ln -s) to override my game.project dependencies (without removing them) while I’m updating or working on them. It seems to work well with an LLM, and they are able to read or change these linked folders as well
1 Like