Hacker News new | comments | ask | show | jobs | submit login

What you are looking at is a classic problem in all of programming: making data machine-readable vs human-readable. Relying on file names for any sort of data is bad practice, IMO. This info should be contained within metadata within the file. So in the file system "object_0001.obj" might contain metadata like "label" "tags" etc - that said you may want two versions of the data - let artists organize their files according to a human-friendly system, but when they are imported into the engine the appropriate metadata must be filled out and the file gets automatically saved to a specific location determined by the engine or editor.



Doesn't that make it pain when debugging or heading down to the directory level? I think rememberable and commonsense file naming makes sense.


It totally depends on the scope of your project, IMO. If you are a one man team making a small indie game, then it probably makes the most sense just to use a simple file system with the naming convention you suggest. The reason I would avoid such a thing in a bigger project is that inevitably such a system will break or become complex if it is not managed by a machine (even I, as a one man team, have hit this problem and I had to go in and rename hundreds of files for a simple change). A simple analogy is an SQL database - you could depend on naming stuff precisely by certain key values to make sense of it, but it becomes more powerful if you provide it with some simple data for each entry and let the computer make sense of it (select all objects with tag "static" and "rock" and "desert" for example). A given convention will force organization inherently. Every time you need to update an object you simply look it up in the editor/engine and reload it from a file you select.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: