Game devs: how do you manage merge conflicts in your projects? A colleague and I were both independently working on the same Godot project, stored in Git, and so we inevitably had a merge conflict when we each modified the same scene. The scene format is plain text so after a bit of trial & error I resolved the conflict. Are there better tools for this in industry? Or is the tool “don't edit scene X, I'm working on it”?
(I have tried using godot-git-plugin but its SSH key support is documented to be flaky and in practice just hung my editor, so I gave up. And reading the source shows that when it hits a conflict it just tells you to resolve it by hand.)
Summary of answers:
• Use a VCS that supports file locking (e.g. svn, p4, git-lfs (!))
• Make your scenes smaller to minimise conflicts
• Get real good at hand-merging Godot scene files
• Unity has a merge tool that can sometimes resolve simple conflicts (someone should write one for Godot!)
• Sometimes someone has to throw their work away
• (my favourite & what I hoped the answer would be) Only the person wearing a special hat is allowed to edit the main scene
So next question: in a totally-remote team, how can we replicate the industry-standard special hat locking technology? Wrong answers only.
@wjt hat on mastodon avatar. what could go wrong
@wingo ship it
@wjt
save the current owner to the blockchain and give them an NFT they use to edit the file on a Big Data cloud-native filesystem. If someone else wants the hat, they need to give their reason to an AI which will evaluate whether or not they deserve it first and, if so, switch it via smart contract, immediately cutting off any other access to the file with "something went wrong".
@wjt miniature star gates, naturally
@wjt whoever lives closest to HQ is currently wearing the hat. If you need to take the hat, you must move your family.
@wjt I don't use scene based engines, and this is one of the main reasons.
@wjt I encountered the same issue multiple times. I really wish the #Godot scene file format would be more human editable. Other formats with similar functionality like #GTK XML/Blueprint have that. They are actually only editable by hand. And still provide mostly just nodes with properties and references to external resources. Just like scenes in Godot.
@wjt Usually split scenes into smaller scenes can help. But I have no tools
@wjt blocking assets while working on them is one of the reasons I've heard some people still prefer Perforce or Subversion for game development. Usually accompanied by comments saying they would very much prefer Git if it could handle the locking, please and thank you
@wjt
Not familiar with godot specifically, but unity has a specific merge tool that would automatically try to merge the YAML files together, which is useful for when the actual objects inside don't conflict, only the textual structure. (But if the objects actually conflicted, lol time to hand merge like 15 conflicts glhf)
@wjt back in the day we had the "scene hat", where whoever was editing the main scene got the hat & no-one else was allowed to touch it
@wjt for Unity - sometimes stuff merges fine (now that you can switch to text-based encoding), sometimes you can manually fix it, sometimes someone just has to throw some work in the bin. a lot of bigger studios still use perforce, just because it has file locking built in.