GDevelop-extensions icon indicating copy to clipboard operation
GDevelop-extensions copied to clipboard

New extension: Supabase save state

Open github-actions[bot] opened this issue 2 years ago • 20 comments

Description

This extension adds support to save the game state to Supabase.

How to use the extension

Use the login or signup actions to log in the user. When the user is logged in, you can use the Get data and Save data actions.

Checklist

  • [X] I've followed all of the best practices.
  • [X] I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
  • [X] I am aware that the extension may be updated by anyone, and do not need my explicit consent to do so.

What tier of review do you aim for your extension?

Community (Unreviewed)

Example file

game.zip

Extension file

SupabaseSaveState.zip

github-actions[bot] avatar Oct 26 '23 10:10 github-actions[bot]

The tests failed because I use GDJS.__SupabaseSaveState. I need to store the Supabase client somewhere. This extension is still experimental, but Supabase is the best Firebase alternative. Since I'm creating this extension for me and for my family, I'm happy to share it with the community.

romw314 avatar Oct 26 '23 10:10 romw314

#1070 needs to be merged before merging this.

romw314 avatar Oct 26 '23 10:10 romw314

#1070 is ready

romw314 avatar Jan 04 '24 09:01 romw314

Thank you for submitting an extension.

Can you use a version of the library that is not minified? Because, otherwise, reviewers can't check the code for ill intents.

D8H avatar Jan 04 '24 09:01 D8H

!update SupabaseSaveState.zip

romw314 avatar Jan 04 '24 11:01 romw314

Can't update the extension, as it doesn't pass automatic tests:


❌ 1 Error found in extension 'SupabaseSaveState':

  ⟶ ❌ [JavaScript disallowed properties]: Found disallowed properties in extension 'SupabaseSaveState':
{
  allowedProperties: [
    'makeUuid',           'rgbToHex',
    'rgbOrHexToRGBColor', 'rgbToHexNumber',
    'hexNumberToRGB',     'hexToRGBColor',
    'copyArray',          'staticArray',
    'staticArray2',       'staticObject',
    'toDegrees',          'toRad',
    'random',             'randomFloat',
    'randomFloatInRange', 'randomInRange',
    'randomWithStep',     'evtTools',
    'Variable',           'RuntimeObject',
    'Logger'
  ],
  disallowedProperty: '__SupabaseSaveState',
  objectName: 'gdjs'
}
{
  allowedProperties: [
    'keys',
    'create',
    'assign',
    'is',
    'values',
    'entries',
    'fromEntries',
    'defineProperty',
    'getOwnPropertyNames',
    'getOwnPropertyDescriptor',
    'defineProperties',
    'prototype'
  ],
  disallowedProperty: 'getOwnPropertySymbols',
  objectName: 'Object'
}
{
  allowedProperties: [
    'keys',
    'create',
    'assign',
    'is',
    'values',
    'entries',
    'fromEntries',
    'defineProperty',
    'getOwnPropertyNames',
    'getOwnPropertyDescriptor',
    'defineProperties',
    'prototype'
  ],
  disallowedProperty: 'getPrototypeOf',
  objectName: 'Object'
}


❌ 1 Error found in extensions - please fix it before generating the registry.

github-actions[bot] avatar Jan 04 '24 11:01 github-actions[bot]

Hi, @D8H, as you can see, in the comment from GitHub Actions, I need you to merge #1070 before updating the extension. Then, I'll retry to update it.

romw314 avatar Jan 04 '24 11:01 romw314

!update SupabaseSaveState.zip

romw314 avatar Jan 04 '24 15:01 romw314

✅ Successfully updated the extension.

github-actions[bot] avatar Jan 04 '24 15:01 github-actions[bot]

Added with the client library that is not minified.

This PR is ready to merge after you review it.

romw314 avatar Jan 04 '24 15:01 romw314

Any news about this? It's in review or it's awaiting review? It's the Extension Review project OK? There are no extensions marked as In Review.

romw314 avatar Jan 11 '24 12:01 romw314

The example project seems not to be up to date. Please attach a new one with the latest version.

D8H avatar Jan 13 '24 23:01 D8H

Updated example: Click, Click!.zip

@D8H, Supabase's free tier pauses project after one week so if the Supabase project is down, tell me and I'll activate it.

romw314 avatar May 24 '24 17:05 romw314

@romw314 Thanks for this contribution! I am a Supabase user and would be interested in trying this in my games. I have a few questions:

  1. What version of the Supabase SDK is included? (Perhaps document this in the extension somewhere)

  2. Would anonymous logins be useful in games? This is a relatively new feature for Supabase. Most players don't like setting up accounts, so this could make a frictionless cloud save (with the risk that they will lose access if they change browsers or delete browser cache) https://supabase.com/docs/guides/auth/auth-anonymous

tristanbob avatar May 24 '24 20:05 tristanbob

Thank you for submitting an extension.

I have a few suggestions:

  • Supabase is not dedicated to game saves. As there will only be 1 extension for Supabase, it should be rephrased in a more general manner.
  • The extension should not make any pop-up. Errors should be given back to extension users to let them handle the errors as they want.

D8H avatar May 26 '24 18:05 D8H

@tristanbob, @D8H, I'll try to meet your needs with my extension.

Supabase is not dedicated to game saves. As there will only be 1 extension for Supabase, it should be rephrased in a more general manner.

I can rename the extension to "Supabase" only, but it seems very hard for me to rephrase it in a more general manner.

The extension should not make any pop-up. Errors should be given back to extension users to let them handle the errors as they want.

I'll try to fix this.

romw314 avatar May 29 '24 19:05 romw314

Hello @romw314, sorry for pinging. I have tried to use the extension early. It signs in properly but this pops up when I save data and nothing gets saved... image

EyadMahm0ud avatar Jul 06 '24 16:07 EyadMahm0ud

Maybe you have not set up your database properly, @EyadMahm0ud

romw314 avatar Aug 11 '24 13:08 romw314

@romw314 I read the help page for the extension and it turns out that I need to apply a specific configuration. I might add some functions (like filtering and OTP authentication) with some flexibility so that there is no need for configuration. I might fulfill D8H demands and upload the extension here too.

EyadMahm0ud avatar Aug 26 '24 16:08 EyadMahm0ud