Hello Godotters! It's-a me, Fabio! In the last few months, thanks to the great sponsorship ofMozilla I've been working on a big surprise for Godot 4.0, namely making the editor available as an HTML5 application.
This DOES NOT mean that we will move completely to the Web like other engines did. It will only be provided as a complementary option to the native editor, as a way to lower the entry barrier. Let me explain further.
Godot Engine supports exporting games to the HTML5 platform (i.e. browsers). Given that the editor itself is written using the Godot Engine API it should be possible to run the editor in browsers as well.
The reason why the editor wasn’t able to run in browsers up until now was due to some historical Web browsers limitations, mostly lack of support for threading, but also file system access.
This will be beneficial in many ways to the engine itself for multiple reasons:
This DOES NOT mean that Godot will move completely to the Web, nor that the Web browsers version will be the recommended way for professional development, but it will be an additional option for cases where it might be useful (again, pick the education sector as an example).
To stress this out again: The good-old native editor will always be our main focus .
After this necessary preface, let’s get to the news: a Godot Editor prototype running in browsers is being presented atthis address .
Note:As of this writing, this prototype requires a recent Chromium-based browser or Firefox Nightly .
This is a very early stage version, but it allows to run the editor (including the project manager), and make simple projects, while storing the files in either your browser local storage, or an external cloud service (Dropbox is currently supported, but not recommended due to speed limitations. In the future, standard WebDAV support will allow for more providers and better speeds.) See the "Known limitations" section below.
When opening the URL you will be asked how to load the engine, specifically, selecting the persistence support. There are 4 options available:
You can also opt to preload a zip file to the chosen virtual file system, allowing you to quickly test demo projects and load your offline projects inside the editor browser. Once the project manager starts, you will need to scan the virtual file system for new projects via the “Scan” option when preloading a zipped project. The editor config with the available projects list and other options will be stored according to your persistence method.
Once you have imported a project, or after creating a new one, you will be able to edit it, create new scenes, create new scripts, and upload assets via drag and drop. You will also be able to run your editor project inside the editor via the play button. Extra HTML UI allows you to close the game and the editor, and switch between them.
As stated above, this is a very early stage prototype, and there are some known limitations:
print()output or errors will not be raised in the editor. They are however accessible from the browser console.
Getting this far required quite a bit of time (I've been working on it since February), but a lot of this work will greatly improve the HTML5 export too. Here are a few nice things that you will see in Godot 4.0:
get_tree().quit()will work as expected in HTML5 exports, freeing up the memory in the user machine (this could for example be useful if you present more games in the same page, and allow the user to switch among them, so you don't have to reload the page to free up memory).
Enginecode that gives you more control over the game lifecycle.
There are still quite a few improvements that I will work on in the HTML5 platform, some of which will also benefit other platforms. Here is a sneak peak:
The prototype branch (still based on 3.2).