Open ator-dev opened 2 years ago
This reminds me that there were talks earlier of creating a GDScript only VCS plugin that did the same thing as godot-git-plugin, but it would just shell out and execute commands on the Git CLI. Does the web interface allow tool GDScripts to execute commands?
If yes then probably users can just use that and get the job done. But it is dependent on if executing CLI commands through the browser is permitted.
@ChronicallySerious I didn't realise this was possible, sounds like it could be a good idea - unfortunately this is not possible for the use cases I'm thinking of though. Chromebooks given out by schools (and any Chromebook in its default state) do not have a terminal with which Git could be installed, and even if there is a different way of doing it, Linux apps cannot typically be installed on most/school Chromebooks. The JS implementation of Git is useful partly because it enables version control possibilities without needing to install anything third party; you just need to include it via a URL in your javascript.
Describe the project you are working on
Any game made (partially or wholly) in the Web Editor.
Describe the problem or limitation you are having in your project
As of yet, the Web Editor provides excellent Godot functionality but in my opinion has a few key failings. One of these is the absence of any out-of-the-box* support for either version control or some other backup/collaborative solution (e.g. syncing with a server); all files remain locally in an abstracted-away browser file system and are annoying to extract/import, making it highly likely that progress or even whole projects could be lost. Users are unlikely to want to constantly export files and upload them somewhere, especially when it's an unfamiliar process that also requires any version control to be done somewhere else on the system (and the file duplicates there having to be constantly overridden).
Describe the feature / enhancement and how it helps to overcome the problem or limitation
I propose that the Godot Git Plugin - or a new plugin designed specifically for this purpose, but might integrate with the main plugin - be provided with the ability to natively and efficiently perform version control (still with Git) directly from the browser for use in the Web Editor, no installs or terminal access required. This is especially useful for Chromebooks (the main target and purpose of the Web Editor), as in their default state and certainly when part of a school they do not provide any access to a real terminal and thus eliminate the possibility of using VCS for anything. Git cannot be installed and can certainly not be interacted with.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
There now exists a pure JS implementation of Git that is reputable and not overly slow (significantly slower than Git, but the Web Editor is intended for small projects anyway). This enables Git to be used purely in the browser with no additional installs or setup necessary, as should be one of the main features of a web-based editor.
If this enhancement will not be used often, can it be worked around with a few lines of script?
It can be worked around (as obviously it will be part of a plugin), but it would be very complex and long compared to how easy VCS should be to set up.
Is there a reason why this should be core and not an add-on in the asset library?
I think this should be an official addon (part of the Godot Git Plugin or otherwise a separate official plugin), but failing that it could be made as an unofficial one. The main purpose of this proposal is to outline my idea and hopefully gather feedback, including whether or not this is a good idea at all.