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

Add resource loading tools extension

Open arthuro555 opened this issue 3 years ago โ€ข 3 comments

Example file: load-from-url.zip

Adds a few actions that have something to do with loading resources.

Points of importance for the review:

  • A private JS variable is being used in the action for audio resources, which is not acceptable. My implementation of the audio one is generally meh in my opinion, I think we probably would remove it unless you think it is essential to keep. Other actions are good.
  • The name is kind of bad.
  • The extension is maybe not focused enough.
  • It uses parameter types not officially supported by events-based extensions. They work just fine without hacks in JavaScript though, only real downside is that if you select another type for those fields while editing the extension you will be stuck unable to go back unless you modify the JSON directly or redownload the extension. I think that this is fine but you may think otherwise.

arthuro555 avatar Jun 04 '22 01:06 arthuro555

Is the video can be supported? I made a tiny tweak to be able to show to entropy how to do, by changing the object type in LoadURLIntoSprite function, it's maybe optimal but it works.

Nouveau dossier (4).zip

Bouh avatar Jun 05 '22 10:06 Bouh

Thanks for getting this moving :)

They work just fine without hacks in JavaScript though, only real downside is that if you select another type for those fields while editing the extension you will be stuck unable to go back unless you modify the JSON directly or redownload the extension. I think that this is fine but you may think otherwise.

I think that's fine!

A private JS variable is being used in the action for audio resources, which is not acceptable. My implementation of the audio one is generally meh in my opinion, I think we probably would remove it unless you think it is essential to keep

I would remove this yes, as this can be brittle.

The extension seems not to provide though:

  • error handling (what happens if something can't be loaded?)
  • conditions to check/know when something has finished loading or errored.

4ian avatar Jun 07 '22 15:06 4ian

The extension is not in the right folder.

D8H avatar Aug 27 '22 23:08 D8H

I separated it into two extensions: #626 and #627

arthuro555 avatar Oct 05 '22 15:10 arthuro555