godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.16k stars 97 forks source link

Expose "Download Project Source" option on platforms other than HTML5 #227

Open noidexe opened 5 years ago

noidexe commented 5 years ago

Describe the project you are working on: I am teaching Godot to students of a video game art and animation course.

Describe the problem or limitation you are having in your project: Beginners are confused by the fact that if they want to copy the project somewhere else, they need to find the folder where it was created and copy the whole folder. They try to do this using the export option since they are used to having a "Save to.." or "Export to.." option available. Other times they just save the .tscn file somewhere else and find the whole project is missing when they arrive home. Engines like Construct and GameMaker which by default work using a project folder structure also offer a single file, compress format, usually a .zip with renamed extension.

Describe how this feature / enhancement will help you overcome this problem or limitation: Godot already implemented importing projects from .zip files by dragging them to the Project Manager ( https://github.com/godotengine/godot/pull/19693 ) but it doesn't offer a way to generate said .zip files without the need of external tools. Having a "Save to.."/"Export to.." option within the engine will allow them to use a workflow they are used to while they familiarize with the engine. It also works as a buckup/versioning system for people not still familiar with VCSs.

Show a mock up screenshots/video or a flow diagram explaining how your proposal will work: image

Describe implementation detail for your proposal (in code), if possible: I guess it'd be similar to how EditorExportPlatform::save_zip is implemented in editor_export.cpp but without excluding any files, compiling any scripts, or replacing files by the imported version. It'd just zip the whole project folder as is.

If this enhancement will not be used often, can it be worked around with a few lines of script?: The same end result can be achieved with an external tool and probably with a plugin but not the same user experience.

Is there a reason why this should be core and not an add-on in the asset library?: Not being a feature that's available out-of-the-box would defeat the purpose of being a beginner-friendly feature.

Usability is one of the core pilars of Godot and this feature makes the learning curve less steeper for new users, providing them with a familiar workflow without disturbing in any way the workflow of experienced users. It is also relatively simple to implement, being mostly a variation of EditorExportPlatform::save_zip

aaronfranke commented 5 years ago

I don't think there is much use in making a game engine have such features. Game engines are meant to be used by game developers, who are expected to know how things like folders work. Perhaps it would be better for these students to take a computer literacy course first.

Calinou commented 5 years ago

If this is added, it should be very clear that this option cannot export projects that can be run, but only the raw project files. "Save as ZIP file" is probably clear enough, but we should still add a tooltip just in case :slightly_smiling_face:

Also, it's a good opportunity to remove the .import/ folder from the generated ZIP archive to decrease the file size. Maybe .git/ (and other VCS directories) should be excluded as well if present…

noidexe commented 5 years ago

@Calinou Yeah I'd at least exclude .import by deafult. It'd be a plus if you had an exclusion list in project settings with sane defaults since I don't know if hardcoding a bunch of vcs directory names would be ok.

@aaronfranke Of course the students know how folder works, they are just new to Godot. If you read https://github.com/godotengine/godot/issues/19296 the inability to import projects compress as a zip file was not solved by displaying a message suggesting users to take a computer literacy course but by automatically handling zip file decompression and project folder generation. In the same way, my proposal aims at giving users a way to generate said .zip files in an easy an standardized way, without depending on external tools, especially since Godot already supports zip i/o capabilities.

golddotasksquestions commented 5 years ago

If this is added, it should be very clear that this option cannot export projects that can be run, but only the raw project files.

I would actually welcome an optional "zip exported files? checkbox" for the actual game export as well. 99% of all times the Godot user will have to zip their exported game files anyway to upload it to a server or hosting site like itch.io, to send it via email to friends or conveniently archive them in a small package. Why not just do right from the Editor then?

nobuyukinyuu commented 4 years ago

@golddotasksquestions zipping a project is different from zipping the exported project. With the latter, you can make your own custom build script.

I personally think this feature could probably be implemented as an editor plugin. As of 3.1 we should have straightforward access to the Tools menu (I believe this was broken in 3.0). This may be less than ideal in a school environment, but only because we can't specify plugins to be automatically added to every new project. I wouldn't mind having the feature, but its uses for normal developers would be limited, especially after the git integration support is mainlined.

nathanfranke commented 4 years ago

Since this is semi-related, maybe there should be support for both Loading and Saving projects purely in the zip format. I find it tedious after downloading a zip project to have to make a random folder to extract it to. Maybe it should use a /tmp directory instead, and use this for saving too.

image

This will generally improve the entire issue reproduction workflow

Calinou commented 3 years ago

This is now implemented in the web editor as Project > Download Project Source. It could likely be made available on other platforms too. Source code

aaronfranke commented 3 years ago

Even though I originally wasn't in favor of this since it didn't seem useful, if the code already exists in the engine, may as well make it available for all platforms.

aXu-AP commented 1 year ago

The bug report template then could be updated to include or change the first bullet point under MRP title: kuva