This is an interesting challenge that is not easy to solve… so let me tell you how our team solved it!
For our Incubator project, Polymoprhic, sk3let0n and I are creating a massive explorable RPG composed of many places with a shared codebase. We brainstormed a lot of potential ways to have this shared codebase… here’s what we ultimately did:
Have a “template” build testing place
Create a place within your game that is dedicated to testing your code base BEFORE you sync it with the rest of your game. This is super important for two reasons:
- it prevents un-tested bugs from impacting your game
- it allows you to preform rapid-fire playtesting
Save children of each service as a model
Instead of saving the entire game into a single model and then re-parenting everything, which would take a lot of time, we instead save the children of each service into their own model:
Instead of grouping up each service into a model, which would again take time and would disrupt the hierarchy of our place, we literally right-click the service that we want to save, click Select Children and then immediately Publish to Roblox without grouping them.
Load it all from a LinkedSource script
Finally, to be able to “insert” your game into a place and then never have to edit that place again, write a script that inserts your entire game into whatever place you are in. Save it as a LinkedSource within your game so that if you ever need to edit the script, you don’t have to re-open every place to do so.
“But won’t inserting 10 models into your game be worse than just inserting 1??”
This was a concern of ours too, but some engineers assured us that InsertService is the same way that the client loads in games normally, and there isn’t much overhead in loading several models at once.
There’s also some other hacky stuff you need to do to get this working, like disabling character auto-loading until everything is packaged in, clearing the children of StarterPlayerScripts (if you need to override default Roblox scripts), locally parenting the contents of StarterPlayerScripts into PlayerScripts for the first player or two to join, etc.
Overall, once you get a system like this set up though, it makes game development a thousand times easier. We’re able to efficiently deploy updates to dozens of places instantly now, and it makes our team way more efficient.