Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Manipulating metadata in files


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 3DModelerMan   Members   -  Reputation: 1022

Like
0Likes
Like

Posted 08 July 2013 - 12:11 PM

I'm working on an editor and content processing pipeline for my game engine and I need to be able to manipulate file metadata. Basically I need to track a few flags on the files used by the game so that the content processor knows what to do with them. The content processor needs to base it's decisions on the metadata because it's written as a seperate command line program from the editor. Are there any standard APIs to deal with file metadata? Or maybe something in Qt? (I'm using Qt for my editor).



Sponsor:

#2 Bregma   Crossbones+   -  Reputation: 5247

Like
2Likes
Like

Posted 08 July 2013 - 01:41 PM

Is this "file metadata" contained in the file byte stream or is it stored externally in another file's byte stream?  Or, are you using a forked filesystem like Macintosh System 6 or a rich filesystem VMS or PrimeOS or something?


Stephen M. Webb
Professional Free Software Developer

#3 3DModelerMan   Members   -  Reputation: 1022

Like
0Likes
Like

Posted 09 July 2013 - 09:22 AM

It would be nice if it was contained in the file's own byte stream. The only problem is I'm not sure how to do that without making the file impossible to open in other programs.



#4 SiCrane   Moderators   -  Reputation: 9626

Like
1Likes
Like

Posted 09 July 2013 - 10:05 AM

What kind of files are you working with? Some file formats contain sections that can be used to store metadata. Image formats commonly have specific metadata sections, mark up formats have comment tags, and so on.



#5 Servant of the Lord   Crossbones+   -  Reputation: 20304

Like
1Likes
Like

Posted 09 July 2013 - 10:12 AM

I'm kinda facing the same problem. The route I'm taking (and still implementing - working on it right now) is having the editor "import" the the resources, and then it manages the resources in its own folder, and has a metadata file alongside each file imported. Then, creating a package for the game will (ideally) be as simple as having the editor .zip the resource folder up. The added benefit is all files can then be referred to by a single 32 bit ID instead of a filepath, and I can have things like "images" which are really just metadata files that refer to a subportion of a spritesheet.

 

(Some of my 'metadata' files describe actual files next to them, and some are standalone but reference other metadata files by ID).

 

This route might lead me into tar pits later, I don't know.


It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal

[Fly with me on Twitter] [Google+] [My broken website]

[Need web hosting? I personally like A Small Orange]


#6 Paradigm Shifter   Crossbones+   -  Reputation: 5408

Like
1Likes
Like

Posted 09 July 2013 - 05:41 PM

Is it a binary file? If it is a text file and it supports comments you can embed metadata as specially formatted comments (put them at the end of the file and add dire warnings not to hand edit before the actual metadata).


"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

#7 3DModelerMan   Members   -  Reputation: 1022

Like
0Likes
Like

Posted 09 July 2013 - 06:52 PM

I looked at how Unity does it and they seem to have a pretty good system. Pretty similar to Servant of the Lord's idea.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS