Game’s PCK file encrypted

Once you have compiled Godot export templates with encryption key, you can export your project’s PCK file encrypted with the same key.

When exporting a game from Godot, there are 2 ways to add the encryption key.

  1. Adding an environment variable with the key.

  2. Uploading your export_credentials.cg file.

Adding Environment Variable

A very simple way to Encrypt your game resources, is to add an environment variable. In order to do this

  1. Visit the Matrix Blueprints page.

  2. Click Create Game Matrix.

  3. Click the cog icon to configure the matrix.
    Godot Modal
  4. Click Advance Settings
    Advance
  5. Enable Environment Variables by clicking the corresponding button.
    Enable vars
  6. Click the Add + button to add a new environment variable.
    Add env var
  7. Set the variable name to:

    GODOT_SCRIPT_ENCRYPTION_KEY

  8. On the value field, use the same KEY as the one used when compiling Godot,

    Var name

The form should look like this

Full form

Click Save

Warning

Make sure to click Save! If you don’t, the variables will not be added.

To validate the variables were added, the Game Matrix should look like.

Full form

Uploading export_credentials.cfg

Whenever you configure a password or key on your godot project, all of these values are stored in a file .godot/export_credentials.cfg. In order to upload this file you do:

  1. Visit the Matrix Blueprints page.

  2. Click Create Game Matrix.

  3. Click the cog icon to configure the matrix.
    Godot Modal
  4. Click Advance Settings
    Advance
  5. Under export_credentials.cfg drop down, click “+ New” button
    Advance
  6. Select your project export_credentials.cfg file.
    Advance

The form should look like this

Full form

Click Save

Warning

Make sure to click Save! If you don’t, the variables will not be added.