0
\$\begingroup\$

TLDR: what are the pros and cons of using a naming convention for tagging and sorting game assets?

  1. for the UI to search and handle it
  2. for devs and gamers to move files around

I am building a game that is designed to be moddable under UE4.

I am going to have tons of assets (clothes, hairs, jewleries and their textures materials and whatnot) to deal with.

This has to be organised well to avoid issues later on, and for the UI to be able to handle it in a user friendly way.

Eventually the game has to be localized for a bunch of non-latin character systems, too.

The easiest way would be to use a prefix/suffix system when naming the assets, which would come in the game in as Blueprints, containing the asset and some extra data as well. This would be a requirement for modders.

For example:

tag_othertag_clothname.uasset
tag          |name        

And then all I do is just search tru the name of the asset. I feed it the text the user typed for the name part, and the tags as strings for the tag part, and than hide the tag part from the user.

I set up a test scene and it does work ok with 500 assets, running the search every time you hit a button.

Later on I can store tag data in json or just as a plain string in the Blueprint.

The issue is that as the number of tags grow, the length of the string grows too, which can be a problem later on.

I thought about using strings and json files to store the tagging data in the Blueprint as well.

I would like to have 2 categories of tags by default

  1. region or body part: head, torso etc ---> makes searching and categorizing very easy but not as efficient, can be appied to nearly all asset types

  2. asset type: cloth, jewlery, armour, etc

My questions are:

In your experience

  • are there pitfalls of using a prefix suffix system, for example security, performance, ease of use etc? if yes what are they?
  • what are the alternatives - I thought of using databases, but I don't have much experience with them, not sure which one works best with a high number of Blueprints, I saw quite a few on the Marketplace...

I 'd like to make it as simple as it can be, no overcomplication or overengineering.
I just want it to be usable, user friendly and easily extendable as the project grows.

\$\endgroup\$
  • \$\begingroup\$ "I 'd like to make it as simple as it can be, no overcomplication or overengineering". It looks to me like you have a system that makes intuitive sense to you, that has stood up to all the tests you've thrown at it so far. If your goal is simplicity, then I'd say these points speak very well of this solution. What concrete problem have you encountered that has convinced you that more engineering is needed here, beyond what you have already? If you don't have a problem yet, can you not go with this system until you can prove such a problem actually exists and matters? It might not! \$\endgroup\$ – DMGregory Oct 17 at 12:01
  • \$\begingroup\$ @DMGregory True. Worst case scenario, I build something on top of the system, and I lost 1 day of work . \$\endgroup\$ – formatc2013 Oct 17 at 16:16
  • \$\begingroup\$ I generally advise against asking "is this a good idea / would this work?" in the Q&A format we use here. They just draw hearsay, when you can get much more trustworthy information about what's working for your needs by trying it. \$\endgroup\$ – DMGregory Oct 17 at 16:25
0
\$\begingroup\$

Conventions like that will tend to become very long 'sentences'. Naming conventions like that, within a filename, will tend to be nasty for the users too. Also filenames have a maximum size, on Windows 10 I believe it is 260 (by default). On Linux it is 256.

About non-latin characters, I know nothing about other then they exist.

Maybe a consideration for you could be to pack the hair and cloth items in their own zip-file. For curly_blond_hair.zip it would need a mesh file, texture and a small simple configuration textfile. For other game objects, whatever they are, too.

Or to ignore zip-files, just use a folder. Thus curly_blond_hair and i_dont_like_to_name_files (see example below) are folders too and you search the directories for the files: mesh, texture.png and config.txt.

Since you have a config file, tags won't be a problem. It's not unlimited but more then enough. A filename is limited in size.

Users, or gamers, you can't control - they can destroy the application entirly, I know as I did way back. So having folders with some files will invite a mess made by users. From within your application or editor, let users pick a folders and pack it into the zip (or your own format) and it is for the user very clear they belong to eachother. This way you force them to work along with the application.

Next is just an example. If you apply the above you could get:

  • Application path\
    • Resources\ // your default items
      • Hair\
        • lame_hair.zip // it is default, right?
    • Modding\
      • Hair\
        • curly_blond.zip
          • mesh
          • texture
          • material // if they need to make these
          • config.txt // for body part, size, location, rotation
        • brown_grease.zip
          • idem
        • black_long_loose.zip
          • idem
      • Jewelry\
        • readme.txt // ignored by your program as it is looking for zip-files or folders
        • Rings\
          • golden_with_diamond.zip
            • mesh
            • texture
            • material
            • config.txt
          • i_dont_like_to_name_files.zip
            • idem
          • who_cares_for_a_name_when_we_have_configfile.zip
            • idem
        • Necklesses\
          • silver.zip
            • idem
| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ These were my worries all along: file name lengths, user generated mess, and slow search times. But I decided to use a folder system with a simple 6 character suffix, to see if it works. \$\endgroup\$ – formatc2013 Oct 19 at 7:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.