Folder structure for project

just for keeping things more organized. i think some folders in a new created project for different resources may be good.
for example folders for images, sounds etc.

1 Like

I second this, my project is just at its beginning and the main folder is already a mess.

1 Like

+1

Should be posted on trello?

I agree also. I had my game folder nice and organized by images, sounds, etc. When it was exported, the folders I made were included, but the files were also duplicated into the root folder. Surely that doesn’t help the overall size of the game. :\

1 Like

I added a card on trello:
https://trello.com/c/McgFVQiq/196-preserve-the-folder-structure-of-the-project-on-export

1 Like

Thank you.
But what i meant is predefined structure from beginning in the creation of project.
So we have a folder with project file( json) and some folders for images, music and… From start.

I think there is some confusion here:

  • You can already organize your images, sounds and fonts in folders inside your game folder. It’s a good idea to do it and I confirmed that I’ve already done this personnally for some games. Nothing is preventing this from being done - it’s already working. Just put image in a sub folder, add it to your object and you’re done :slight_smile:
    You can also move an existing image, but in this case remember to also update its file in the resource editor.

  • We could force putting images/sounds/fonts into specific folders, but I think it goes against simplicity and will create more confusion than anything else (even if it’s a good practice to use folders again, but it’s up to you to organize them according to your game architecture).

  • Export will gather all the resources in a single folder. This is not a problem in terms of game size.
    On the contrary, this could be helpful if at some point GDevelop start to put your images into spritesheets, to reduce loading time (by reducing the number of requests made to load images).

  • Finally, there is currently an option (if you right click on a resource) to automatically scan and insert images that are in your game folder. Same for removing extra images. Next versions of GDevelop will have it for fonts and audio files too :slight_smile:

Did I miss something?

1 Like

Thank you for answer. Your right. So i think maybe having “option” for making some folders in project creation be better than forcing users to do so.

Yeah, I’m not trying to force anyone to arrange their projects in a certain way.

When I first exported my project for the Web, it looked like it had not only included the folders I created, but also duplicated the images into the main folder - I thought there were two copies of every resource at the time. That’s what I meant regarding game size. But now, it’s only putting the resources into the main folder and not including my folders. I’m fine with this as long as my project folder stays in some kind of order.

Thanks for the taking the time to respond.

The big downside of it: Having two resources with the same name in different folders. This file structure:

Player Walk 0.png 1.png 2.png Attack 0.png 1.png 2.png
Fails as Walk/0.png and Attack/0.png are exported with the same name in the same folder (not sure if one of the images is still renamed as 0.png(1) or something like that). I think that GD should export the resources with the same file structure they have inside the project.

Please let me know if it’s already solved and I didn’t notice it :stuck_out_tongue: