-
Notifications
You must be signed in to change notification settings - Fork 57
Description
Describe the problem you're trying to solve in your project
Our world scenes tend to get quite large with complex node hierarchies that can be hard to manage, especially when working as a team using git. The octree resource trees take up very, very large chunks of the .tscn files they belong to which makes it challenging to investigate other changes to the scene tree, and makes it more difficult than necessary to handle merge conflicts.
Describe a feature you consider and how it will help you
The Octree resources could be saved as files in the filesystem, ideally one file per plant type (at least to start with). This would help declutter the scene trees and make it much simpler for us to resolve git conflicts, because they would be separated out to these more manageable files. We would be able to build fixed versions one at a time or just pick one version of the file to use and drop the other without impacting the rest of the scene.
Describe alternatives you've considered
Unfortunately there's not a great alternative that I'm aware of. The only way to fully prevent merge conflicts is to have team members work on specific map files one at a time and merge often, but it's not always practical to do that, especially for games with large open-world maps. One member might need to sculpt the terrain in one area while another member works on an unrelated system that needs to be integrated into the same scene file.
It's worth noting that part of the reason I bring this concern up is that, currently, Spatial Gardener updates the active_LOD_index of the octree node resources automatically when the developer moves their camera around the editor - this can easily create more git conflicts if the developer includes those changes in their commits inadvertently (it would be nice if the addon had a way to prevent this from happening too).
Describe how you imagine it would work. With code, pseudo-code, diagram or a drawing
When adding a new plant to the gardener, it would be assigned a new octree file corresponding with its index. These files could be saved in the same working directory as the greenhouse & toolshed files.
On a related note: I was able to create a partially working solution to save out each octree manager to its own file, but sadly there's a breaking bug I haven't been able to solve with my limited understanding of the addon; anytime after I save the scene, then click off the editor window and then back in, the Godot editor does a filesystem/resources refresh that subsequently breaks the gardener temporarily. From what I can tell, the existing octree meshes become orphaned and continue to exist in the background even when the original scene is closed, until the originating scene is either reloaded or Godot itself is restarted. I'd be happy to share this WIP solution if it would be helpful!