I am working on my first multi-place game and I need a way to share code between places and if my game is successful enough eventually between multiple games. I’ve see references to the Packages feature in the Roblox Studio UI for a while but didn’t really know what it was. So I read the documentation and it looks like it might be what I need but I have a few questions:
Can code in one package make use of code in another?
I stumbled upon some instructions that said packages must be entirely self-contained. Whether it was official documentation, someone’s advice based on personal experience or was someone speaking from ignorance I’m not sure. I’m certain I read it but I can no longer find find where. It could have been outdated advice based on an older version of the feature.
Can packages be monetized?
I noticed in the documentation that packages are published in much the same way that other assets are. If I decided that a package would be useful to other developers and wanted to sell it through the marketplace is this an option? If so, is it a one shot deal or will buyers have access to future package updates?
Are there any downsides to using packages?
This one is best answered by someone with experience using packages. What problems did you experience? Did you later abandon packages in favor of something else?
I’m sure some of these questions must have come up before but when I searched the forums for posts about packages the majority were about working with third party package managers created by other Roblox developers rather than working with Roblox’s own package system.
I prefer scripting the entire game into 1 place, sure it will take bit time to setup a single-script architecture but at the end i can have multiple levels + the main menu taking place on 1 place, also using TeleportService’s reserved servers for new servers and pass teleportData for how the game should load (or what level)
Can code in one package make use of code in another?
Yes: packages are mostly reusable assets. Besides being saved in the cloud and the ability to pull changes on packages in new places, they don’t differ heavily from other assets. Packages can reference each other and their contents and can also be nested.
Can packages be monetized?
No: this could change in the future (not based on anything, don’t get your hopes up) but you shouldn’t go in with monetisation in mind for packages. You can also write a feature request if you think you would benefit from package selling on a development-level or search for similar requests and potential replies about the idea of selling packages.
Are there any downsides to using packages?
They’re still sort of rough. They encompass a lot of sync abilities which are great to have but there are some express issues with using them especially for more specific tasks: reference developer complaints on package announcements for some idea of what kind of trouble you may face with them. The issues some developers face may not be issues to others though.
What problems did you experience? Did you later abandon packages in favor of something else?
Never experienced any problems. I mostly use packages to share models and data configurations for non-programmers across my experience. For the codebase and anything that non-programmers don’t realistically need, my team favours Rojo over packages. This allows us to work on better external code editors like Visual Studio Code and incorporate powerful tools into our workflows which we then sync in to Roblox on each place in the experience.
Can you explain a little more on how you organize the rojo project with different places? So you have the main folder then in there sub-folders for each places? How would you sync?