-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This repository contains the code for the plugin which allows to register games on GX.Games and upload them. It also contains some simple game code for testing the plugin.
The plugin is written for Godot 4.3 dev 5 Standard. Note that the .NET version of the editor does not support export for Web.
You need to install Godot version 4.3 dev 5 or higher. Here is the link to download Godot 4.3 dev 5: https://godotengine.org/download/archive/4.3-dev5/. Note that you need "Standard" version, not ".NET":
Install and open Godot. Go to "Editor -> Manage Export Templates". Keep the default settings and click "Download and Install":
Download this repository.
Open the folder with your own project. Copy the folder addons
from this package into your project. If you already use other packages you should copy the folder addons\opera_sdk
into the folder addons
inside your own project:
To enable the plugin, open Project > Project Settings at the top of the editor then go the Plugins tab. You should see it in the list of plugins. Click the "On" checkbox to enable the Opera plugin:
Now you can see the new panel "GxSettings" on the right:
You will see the message box which proposes to reload the project. It is necessary to apply the changes in the export presets. You may agree or make it later manually. To reload the project manually, go to "Project -> Reload Current Project":
You need to authorize on GX.Games to fetch all the data from the cloud. Click "Update". You will be authorized, and the data will be downloaded for you.
Let's upload your project as the new game. First, enter the name in the field "Game Name". Then, select the group which will own your game. You may select it from the dropdown list "Select Group":
Optional step: you may press "Register on GX.Games". It will only register the game without uploading the bundle to the cloud. It's not necessary because it will be done automatically during the next steps.
Now you need to export the project. Go to Project -> Export...:
You will see the export window. In the left panel, select "Opera GX" preset:
If you do not see it, make sure that you reloaded the project after the plugin installation.
Press "Export Project". You will need to enter the name of the main page file. Please verify that it is index.html
. A main file with another name is not correct and such a bundle will be declined before uploading.
Press "Save". Godot will build your project for Web. If it is successful you will be prompted to upload it to GX.Games. Press OK:
You will be informed by the message box whether the uploading was successful or failed. If it failed, the errors will be logged in the console.
The process is similar. But before exporting the project you need to select it from the "Select Game" dropdown list in GXSettings tab:
Note that the most of the settings will be blocked. It is not allowed to change the game's parameters from the game editor (e.g., name, group etc). But it may be done in the browser. You can click "Edit game on Opera" to go to the game's settings page:
Just download this repository, open this project and start working. The repository contains the very basic project for testing. It is a good idea to commit changes in "addons" folder only if it is not absolutely necessary to commit something else.
If you are on Mac, there could be errors on the first start: https://github.com/opera-gaming/opera-godot-sdk-4/wiki#errors-on-opening-the-sdk-project-on-mac.
The editor silently crashes on opening scene GxSettings.tscn
. It started after I switched from version 4.2.1 to 4.3-dev5, the same happens in 4.3-dev6 as well. If you need to edit this scene, disable the plugin in the project settings. Looks like an editor's bug.
If you open the project with SDK itself, there could be problems on the first start. If you open it for the first time you may get a ton of errors like this that Godot cannot find the types:
Just restart the editor and the errors will be gone. It was investigated and it looks like a problem inside the engine.
Godot games suppress the most of the hotkeys. But there are two combinations (or maybe more) which are protected from disabling. This is Ctrl+W
and Ctrl+Shift+W
which close the tab and the browser correspondingly. There is a way to disable them, but this method requires to show the warning popup which is also not acceptable. So it looks like the only way to disable them is to rearrange these key combinations in the browser itself, and it should be done by the user. As for Opera GX, it is possible to rearrange the hotkeys directly in the browser settings.
These hotkeys are not invoked in the fullscreen mode so it's not a problem here.