Programatically deploy a game from your godot project (creating a custom game engine using godot)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By blurymind

Is godot’s api capable of allowing one to create a custom game engine purely via gdscript?
My idea is basically to make my own game engine which uses godot and lets the user deploy to web target.

My engine would be an editor that was written in godot and uses godot’s runtime and is capable of deploying the edited game to web target without need to open in godot.

How does one do that in gdscript? Is there an example somewhere that shows for example a level editor made in godot that has an “export game” button and exports the edited level as a playable game?

I’ve never tried anything like this, but one problem I see is performance. GDScript is great for writing games, but it’s not as good performance wise as c++ for example, so it might fall short in making an engine. I may be wrong though, (it’s worth noting that it is very possible to code in c++ in godot)

Millard | 2021-04-06 15:57

You could have a look a the engine source code and see how the builtin editor handles export. Since it’s all open source, what you’d like to do is certainly possible, but I don’t think there are any prebuilt solutions, and I don’t think HTML5 export is currently scriptable via GDScript. I may be wrong, though.

What you could try is to use the command line export option. Once you know how to export from the command line, you can script that with GDScript using OS.execute.

archeron | 2021-04-06 22:07