The Principia protocol
principia:// is used for the game to download and play levels from the community site.
The Principia protocol contains several arguments separated by slashes.
As of 1.5.2, if the first argument is not a valid action it is treated as a domain and the game will fetch remote levels from that domain.
There are three actions,
Play a level or package. It has three arguments:
namespaceis the namespace of the level/package. When playing levels from the community site this is
idis the level/package ID.
Open level for editing in sandbox. This is intended for players' own levels, as the community ID is preserved allowing for them to update existing levels on the community site.
Open level for editing in sandbox. This is intended for other players', as it puts the community ID into parent ID, making a level uploaded a derivative of the edited level.
For desktop platforms, you can always send a Principia protocol link directly to the game executable. This is useful if you are building from source and haven't installed the game. Right click on a play button on principia-web and paste it into a command prompt or terminal when calling the game.
Principia's installer writes an URL handler to the Windows registry. This will use the current location Principia is installed in, this will break if you move the game afterwards. An example of the registry export can be seen here:
[HKEY_CLASSES_ROOT\principia] @="URL:Principia" "DefaultIcon"="" "URL Protocol"="" [HKEY_CLASSES_ROOT\principia\shell] [HKEY_CLASSES_ROOT\principia\shell\open] [HKEY_CLASSES_ROOT\principia\shell\open\command] @="\"C:\\Program Files\\Principia\\principia.exe\" %1"
build-linux/ folder contains the
principia-url-handler.desktop file which implements the URL handler for a packaged Principia. You should install this file into the
applications folder when packaging.
If you do not want to install Principia to your root filesystem, you can put the URL handler .desktop file inside of
~/.local/share/applications/ and change the
Exec line to point to where your Principia is located.
An URL handler is registered by the Android system from the APK's manifest.
This page was last modified on 2022-12-20 22:12 by ROllerozxa