4ian / GDevelop

🎮 Open-source, cross-platform 2D/3D/multiplayer game engine designed for everyone.
https://gdevelop.io
Other
10.83k stars 849 forks source link

Rules and structure to get your assets in the Assets Store #2146

Closed Entr0py404 closed 3 years ago

Entr0py404 commented 3 years ago

A community managed Trello board is available here to submit assets to the asset store.

Guidelines and acceptable content are explained in the link you can find in the next message 👇

4ian commented 3 years ago

Click here for the guidelines to submit assets to the assets store

tristanbob commented 3 years ago

How are we going to deal with file-name collisions? I am working on a large project now and have experienced the frustrating problem when you have two objects that use the same file name.

arthuro555 commented 3 years ago

(⚠️ Advanced!) To make an object from scratch, for example particle emitters

Maybe we could add an option to export an object to the asset store format from the IDE in the future?

4ian commented 3 years ago

How are we going to deal with file-name collisions? I am working on a large project now and have experienced the frustrating problem when you have two objects that use the same file name.

It's handled by GDevelop itself. When an asset is added, GDevelop looks for all resources:

In other words: no worries :) If there are 100 objects in 100 different folders that are all named "Player.png" (generating an object called Player), you'll still be able to search and import all of them without clashes - and without clashes with your own existing resources.

Maybe we could add an option to export an object to the asset store format from the IDE in the future?

Totally. By lack of time I've not added it already, but if someone wants to do that, it should be doable to have an option that would export the object in a .asset.json file, with the resource (images basically) next to it.

tristanbob commented 3 years ago

It's handled by GDevelop itself. When an asset is added, GDevelop looks for all resources:

Does GDevelop beta102 currently handle name collisions when importing assets? This is the second time I've run into this problem on this project.

Screenshot 2020-12-31 170957

Screenshot 2020-12-31 165936

Entr0py404 commented 3 years ago

I'm trying to make it a bit easier for my self to make the files for the time being but is this the right format? https://www.youtube.com/watch?v=XfVbTVCW8rs

Where is the description shown in the UI of GDev ?, I think I'm getting confused by the automatically generated ones.

"an empty filed called IGNORED_FOR_IMAGE_ASSETS.md so that the importer will ignore the images and won't try to create objects automatically"

What would be a example of when to use this? Is it only for when making a asset.json? Does the importer automatically ignore image files based on its existence?

The files I used had an extra underscore in them and don't contain the asset name, file names don't matter for asset.json right? But probably should use the same naming conventions though.

4ian commented 3 years ago

I'm trying to make it a bit easier for my self to make the files for the time being but is this the right format?

This looks mostly correct! Only thing I could spot is that the resource files in the json are have a relative path with a sub folder (NinjaAdventure/Slide001.png, etc...) while they should be referred to without this sub folder (Slide001.png, etc...).

Wrong filename

Is it only for when making a asset.json? Does the importer automatically ignore image files based on its existence?

Yes and yes. If you had a file called IGNORED_FOR_IMAGE_ASSETS.md, the importer won't try to automatically create object from the images found in this folder. It's only useful for your folder containing a .asset.json file

The files I used had an extra underscore in them and don't contain the asset name, file names don't matter for asset.json right?

Yes, there is no convention for the .asset.json file, but as with others the filename should be in plain English: My Super Ninja.asset.json (will be used to create an asset called My Super Ninja). The name of the resource files (the images) are not important because they won't be used to create objects... but still try to use similar name/same convention so that the creator that uses the asset does not have weird file names in its resources :)

Does GDevelop beta102 currently handle name collisions when importing assets? This is the second time I've run into this problem on this project.

Can you post the steps to reproduce this? Thanks!

tristanbob commented 3 years ago

Edit 4ian: this was fixed :)

In this video, I start from a new project and add two sprite objects with multiple frames each. Source files for both objects have the same names, which GDevelop doesn't handle properly.

https://user-images.githubusercontent.com/8879811/103448259-34b25b80-4c54-11eb-9f96-3a0cd06e2d5b.mp4

4ian commented 3 years ago

@tristanbob Ok I see, this is not related to the assets store so let's continue the discussion on a new issue :) There is no check for existing files made when you add a resource from another folder. The solution for now is to copy by yourself the images in your project folder. The asset store does not have this issue as images are compared to existing resources :) To fix your specific issue, we would need when copying assets that are to be added from a folder outside of the project, to check the content of each overwritten file.

Eliathx commented 3 years ago

While working on the assets, there is this question I have:

image

In this one, they came as spritesheets, but since they are all the same size (32x32px) in Aseprite there is a quick way of having them ready in different frames that can later be saved as .png's and will have a number indexed for every frame. This sounds pretty quick. However, this might cause confusion as it may be seen as an animated object. But the problem here is: would we have to name every single icon/item with its name (like "IconGrape.png, IconWatermelon.png, ...")?

Notice that in this example there are 96 icons, all of them different. They could be counted and named as a group (let's say "RPGIcon") and then indexed, but I am not sure. On the other hand, naming 96 icons sounds very time consuming and make the process slow. Taking into account that there are many of these "collections", this would take quite a long time. Any suggestions/guidelines?

Eliathx commented 3 years ago

A second question, I might be a bit silly or missed something, but I didn't notice until I was working on them:

"In the future, we'll support one _METADATA.json file for each animation. For now, just one is supported for all animations of the object."

Does this mean the frame rate in the .json applies to all animations in the object? If so, wouldn't it bring some problems, since not all animations have similar frame counts?

For example, in one object, some idle animations have about 4 to 6 frames and go at 100ms, but in the same object, they have a running, attacking, or any other animations with a higher frame count, meaning a different speed.

4ian commented 3 years ago

Hey @Eliathx thanks for asking :) The short answer is: yes and no ;) I push for naming individual objects as such, but you can also use a generic name (see below)

This sounds pretty quick. However, this might cause confusion as it may be seen as an animated object. But the problem here is: would we have to name every single icon/item with its name (like "IconGrape.png, IconWatermelon.png, ...")?

It's indeed pretty quick, but also this would not give a satisfying enough result for the users of the asset store, as the idea is to allow them to search directly by the name of the object or its tags. It's true that depending on your game, if you're searching for an asset, you might want only some specific looking assets from a pack (to keep a visual coherency), so you'll probably filter the assets by this pack. But still, the idea is to things able to be searched by name :)

Of course, this takes time, but not that much when you consider that you can open the folder with the PNGs in a file explorer/Finder, use the shortcut to rename the first file, look at what it is in the preview, type the name, press Enter, and go to the second file :) This will take you only a few minutes for a few dozen/hundred assets and will give a far superior search experience to people browsing the assets (especially if you put the assets in proper folders with TAGS.md files).

Taking into account that there are many of these "collections", this would take quite a long time.

In this specific case, it might be ok to just take all the files and rename them to Generic RPG icon (1).png, Generic RPG icon (2).png... You can also name them Generic RPG icon 1.png, Generic RPG icon 2.png, ... - just be sure NOT to use an underscore (Generic RPG icon_1.png) otherwise they would be considered as the same object with multiple frames.

Let me know if that sounds ok to you? It's not as good as going ahead and renaming each file as "Key.png", "Map.png", "Blue gem.png" - but still fine enough!

Does this mean the frame rate in the .json applies to all animations in the object? If so, wouldn't it bring some problems, since not all animations have similar frame counts?

Yes that's a limitation. But as I wrote "In the future, we'll support one _METADATA.json file for each animation", so I suggest that if you have an object like this, to this convention. For example:

Does that sound ok to you too? Let me know :) Trying to find a good balance between enough flexibility and good convention so that we don't have to author an entire software just to import assets :)

4ian commented 3 years ago

I've edited my post about the rules to make these two things clear :)

Bouh commented 3 years ago

SVG files are supported in icons of extensions, but not for texture in objects, that's why we can see an empty folder with Icons>Glyphster Pack> Halloween, and so on, in the asset store. As you can see in the asset database request, if you search for "Halloween" you can see icons with svg file.

Silver-Streak commented 3 years ago

Just to add to this here, around the above message from @Bouh

The IDE absolutely allows you to add SVG as sprite animation images right now. Not sure if it's intended or not.

It appears to render them via rasterization, so there's no huge benefits to the SVG itself, but they load and work in preview, too.

Unsure if this is intended by @4ian as I can't find this anywhere in the update history.

Bouh commented 3 years ago

In fact GDevelop take the texture file and give it to PixiJS, textures for a sprite can be in theory HTMLImageElement | HTMLCanvasElement | SVGElement | HTMLVideoElement. Because PixiJS allow that.

SVG should not be supported in the resource tab, scan and remove useless SVG files shouldn't work. And yes PixiJS pixelize the SVG in a buffer texture before rendering it.

4ian commented 3 years ago

A bit off topic but yeah to confirm that 1) some categories are empty, I would need to remove them on the server side I think and 2) SVG seems to work because PixiJS does some magic under the hood to render them but for now I prefer not to officially support them, because it would need a commitment from us to support them more or less indefinitely in the future... and if we switch later to another internal rendering engine (Haxe, Cocos2d, whatever...) it's unsure a lot of them can do this. I would almost prefer something in GDevelop itself that would take your SVG and render them as pngs on the fly so that it's more portable.

tristanbob commented 3 years ago

I want to add some additional guidance on audio files, based on conversations and testing with @4ian.

Summary:

Convert your audio files to the AAC format using fre:ac, with a quality setting of "3".

Details:

A great tool to convert audio files to AAC format is fre:ac. fre:ac is free, opensource, and cross-platform. It can process batches of files, with many options on how they are named and put into folders.

This will create high-quality audio files, but using a variable bit rate that won't exceed 96 kbps (assuming stereo input).

Related Discussion: https://github.com/4ian/GDevelop/issues/2378

Screenshot 2021-03-11 112608

Screenshot 2021-03-11 112527

4ian commented 3 years ago

Thanks! This was added to the wiki page with the rules to submit to the assets store. I think we could almost close this issue and have conversations on the relevant card of the Trello board?

Bouh commented 3 years ago

When adding an object via the asset store there are empty lists because they refer to sounds, there is no sound object.