[size=5]Introduction[/size]
Currently the file format for a ROBLOX place is one of two options: An XML file or a compressed binary format. Neither of these formats is consistent with best practices of software development regarding version control.
[size=5]Rationale[/size]
Programming best practices require the use of a version control system (VCS). Some of the reasons why use of a VCS is vital are:
Version control enables multiple people to simultaneously work on a single project. Each person edits his or her own copy of the files and chooses when to share those changes with the rest of the team. Thus, temporary or partial edits by one person do not interfere with another person's work.
Version control integrates work done simultaneously by different team members.
Version control gives access to historical versions of your project. This is insurance against computer crashes or data loss. If you make a mistake, you can roll back to a previous version. You can reproduce and understand a bug report on a past version of your software. You can also undo specific edits without losing all the work that was done in the meanwhile. For any part of a file, you can determine when, why, and by whom it was ever edited.
Version control permits the practice of reviewing changes before publishing them. This practice safeguards against inadvertent release of unintentional code (debug and testing code, for instance).
[size=5]Problems with current formats[/size]
The proprietary binary file format is, of course, useful for what it was designed for, namely reduction of file size and loading/saving time. When it comes to development, however, some considerations surpass those benefits in desirability. The ability to store a project in a VCS and take advantage of all the benefits of the VCS is far more important than a reduction in file size and even than improved loading speeds. As a non human-readable format,the binary format is of course unworkable with regards to version control.
The xml format option that is available to developers comes nearer to allowing the benefits of a VCS but we have been admonished not to rely on the format. It isn’t intended to be used as anything other than a generated, binary-like file. Additionally, if a user does attempt to use the xml format within a VCS, multiple pain points are manifest. Primarily, inserting or moving an object in the hierarchy can result in massive disruption to thefile making it difficult to compare to the previous version when submitting changes. This and other file modifications make comparing before and after versions of the xml file a time-consuming challenge.
The benefits provided by a VCS regarding collaboration among multiple developers is absent from both formats.
While it’s true that ROBLOX does provide version history for reverting to previous versions, this is only one aspect of the full VCS picture. More and more people are beginning to work in teams to develop games on ROBLOX and would benefit greatly from a full VCS.
To be clear, I think it would be a bad idea for ROBLOX to attempt to expand the current versioning system to provide the functionality of a full VCS. There are existing VCSs that do everything required (as evidenced by the popularity of github).
Version control is arguably more important than even a good code editor. ROBLOX has been promoting the idea of working in teams to develop games. I imagine that experience to be either tedious or poorly managed given the existing file formats.
[size=5]Proposal[/size]
I propose that an option be provided to save ROBLOX places as a project containing multiple files and directories. Generally speaking, each object in the workspace would be stored as a separate file/directory. Similar structures are in use by modern development environments like Microsoft Visual Studio. Each object then becomes a distinct element of the project under version control. Modifications to the lua code in a script file would not affect any other files in the project. This self-containment is essential to version control interoperation.
A starting point for an implementation of this would be to have each object stored as a directory. The directory would be given the name of the object. Inside the directory would be a file containing the properties of the object. The directory may also contain additional subdirectories representing child objects. The project could be compiled to the binary format as part of the publishing process before transmitting to ROBLOX, thus providing the benefits of the binary file format. This implementation has flaws that would require addressing (objects with the same name at the same level in the workspace hierarchy pose a problem, for instance) and is intended as a discussion point.
[size=5]Conclusion[/size]
ROBLOX is training the next generation of software developers.It is important, then, that good practices are promoted. Use of a VCS in software development is an essential part of the development process. Making ROBLOX more compatible with a tried and true software process is of significant consequence.
[size=2]Note: My original proposal for this feature appeared here over a year ago, but gained little traction there.[/size]