Hello,
Our studio, All Out Games, has something of a unique use-case. There's gonna be a lot of backstory for context so please bear with me 🙂 Some of the team is working on a 2D, multiplayer-first, custom engine; and we have other sub-teams making games using that engine. One of our games is shown here:
VIDEO
The engine is specifically made to be able to produce these kinds of games quickly, so there is specific support for this player character built in to the engine and the game teams can do whatever they want with this common base.
For each new game the animators will clone the base Engine Rig and then add whatever animations and such that the game is calling for, for various abilities and effects, this produces the Game Rig. On our website we sell cosmetics and unique emotes. The goal is that when we release a new emote or cosmetic we don't want to have to do through our back-catalog of games and add that emote/cosmetic to all the previous Game Rigs.
For this I have implemented a rig merging algorithm that reads the JSONs of the Engine Rig and the Game Rig and merges the Engine Rig into the Game Rig. Now when we want to release a new emote or cosmetic the animators only have to add it to the Engine Rig and then it will automatically get added to all the Game Rigs. Basically how it works is we traverse the ASTs produced by reading the JSON files and appending anything that exists in only the Engine Rig into the AST of the Game Rig. This AST is then reserialized to JSON and that's what we give the Spine runtime to use. There are many concerns here to do with attempting to preserve draw order so when merging Slots it tries its best to put it in the right spot, as opposed to naively appending it to the end.
At this point most things work perfectly and I'm quite happy with it. However, there are some things about Constraints that I'm not totally sure on. First off, constraint order matters. So I can't just naively append to the end when merging. I could do the same "smart" insertion that the Slot merging does where it tries to put it in the right index, but constraints also have this "order" field on them and I'm not sure exactly how that affects things. I'm looking for some guidance on how I could merge constraints properly, taking into account whatever this "order" field is meant to encode. I know this is quite an esoteric (😉) use-case, but hopefully somebody will be able to help me out here. I'd be more than happy to hop in a call and go over this in more detail.
Thank you,
Joshua