Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
noidexe opened this issue Nov 13, 2019 · 10 comments · Fixed by godotengine/godot#99781
Closed

Comments

@noidexe
Copy link

noidexe commented Nov 13, 2019

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 ( godotengine/godot#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
Copy link
Member

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
Copy link
Member

Calinou commented Nov 13, 2019

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 🙂

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
Copy link
Author

noidexe commented Nov 14, 2019

@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 godotengine/godot#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
Copy link

golddotasksquestions commented Nov 14, 2019

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
Copy link

@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
Copy link

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
Copy link
Member

Calinou commented Aug 11, 2021

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
Copy link
Member

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.

@Calinou Calinou changed the title Add "Save project as .zip file" option Expose "Download Project Source" option on platforms other than HTML5 May 15, 2022
@aXu-AP
Copy link

aXu-AP commented Oct 28, 2023

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

  • You can create the zip file in editor via Project/Save as ZIP file.

@Calinou
Copy link
Member

Calinou commented Nov 26, 2024

Note that the editor itself doesn't use the ZIPPacker API (as this was implemented in the web editor before ZIPPacker existed). That said, it can still be made available on all platforms, even without rewriting it to use ZIPPacker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants