Tool to organize different types of content.

Hi, good afternoon!

I’m sorry if someone has asked this question before. I admit I tried to look for similar answers in this forum (and Google, Stackoverflow and some places more) but I haven’t seen any. Maybe I didn’t try enough so I’m sorry about that.

The thing is I’m trying to develop a game and the nightmare comes when I have to organize hundreds or thousands of textures plus audio plus scripts and so on.

So, after trying to find some kind of asset manager (or maybe resource manager or perhaps file manager) I haven’t found anything suitable for SDL. I know for example that MonoGame has their MonoGame Content Builder and the Editor (Tools | MonoGame)

So I wonder if SDL has something similar or is there any alternative to this.

Thank you so much in advance!

what kind of work do you expect a solution to do? remove unused assets from final build? pack textures together? compress audio automatically? compress textures and models so that the game configured in low quality downloads less? encrypt everything for some reason, such as protecting IP?

it’s nice that you have come to this point. I have not dealt with such problem yet, but I think about this sometimes. I will probably roll out something using this ancient macro processor called m4.

First of all, thank you so much for your answer. It’s nice to see other people doing their best to help others.

Those are really good questions and I admit I haven’t thought enough about those questions. The only thing I think about is just put all assets into a big file so those files are sorted by type and I Just need to open one file using something like a resource manager.
I thought too about pack textures together like does TexturePacker but right now that’s not a problem because I’m using that tool to do that task.

Regarding on the other questions I haven’t thought about those.

I just asked about this question because I don’t want to waste my time doing the same thing if someone has done something similar in the past and that software is FOSS so I can reuse it, but, if that’s not the case, I’ll try to think about how to solve this problem because I have found this problem in the past quite a lot and it’s a nightmare to deal with.

uuuuuh

this is what I think

I don’t think you really archive files together. you just keep them separate, then call e.g. SDL_LoadFile for whatever you need during initialization or e.g. while loading a new level.

different platforms have their specific way of packaging game stuff, and specific ways of delivering them to players via network, but in the end, everything becomes a bunch of files inside a bunch of folders, so that you use ordinary file operations to read them. think of Steam, Play Store, MSI installers etc.

you can see for yourself by looking files installed by your games, or decompressing app packages.

even for HTML5 builds, Emscripten emulates a filesystem, so you can use options --embed-file or --preload-file to add files, and use ordinary file operations to access them without kludges or workarounds.

anyway. you can embed assets inside the executable using e.g. xxd -i or C23 #embed thing.

so, I can’t really see what are the shortcomings… as I said, I don’t have experience yet.

I agree with you.

Is just I don’t want to deal with too many files one after one (like you said in the case of folders). I thought that maybe I could find something where you pack everything in just one single binary file and you could access those files using some kind of API instead of dealing with all of them usin IMG_LoadTexture (In deed, right now I’m using IMG_LoadTexture_IO instead).

The problem with the my approach right now is that, to be able to pack everything in one file.

After reading your post, I think I’ll do some research about how could I use virtual filesystems.

Thank you so much for your help.!

My program uses just a few files (images, sounds, texts, and fonts).
I keep them all in the same folder and maintain a text file with
the names of all these files.
A program reads this text file and generates a single file containing all
the files listed.
The main program will read the files in the same order they were saved.
When adding a new file, I copy it to the folder and add it to the text file
in the desired location. Now I just need to reflect the order in the program.