how to generate an IFID for browser-based IF

83 views
Skip to first unread message

Alice Grove

unread,
Feb 4, 2016, 1:54:31 AM2/4/16
to babe...@googlegroups.com
Hi everyone,

IFDB says "If you're the author, you're responsible for creating an IFID for your game." I've been trying to figure out how to do this with a browser-based game that doesn't have a built-in way of generating IFIDs. I share basically the same questions as the OP in this thread <http://www.intfiction.org/forum/viewtopic.php?f=38&t=13045
 
>, except that I'm not using Undum.

I don't know if there is (or ought to be) an "official" answer to all of these questions, or if it's simply a case of authors doing what makes the most sense to them. I don't have a firm grasp on exactly how important it is to follow a certain procedure here. But if there *are* official answers, I'd like to know where to find them.

Given that the treaty says

2.2.3. IFIDs for projects falling outside this agreement The IFID for a story file, or an executable program, not covered in
the rest of �2.2 above or in subsections below, is by definition its
md5 hash code, with hexadecimal characters a to f written in upper
case, A to F.

and given that there is conflicting advice elsewhere (on various threads and on IFWiki), here are my questions:

(1) Is generating a hash of the story file the only acceptable way to generate an IFID for a new web-browser game, or is it ok to use a randomly generated UUID? Does it matter how/where the UUID is obtained? (TADS IFID Generator is what's suggested on IFWiki.)

(2) When using a hash: in cases where there are several files involved, how do you determine which is the "story" file? (IF Wiki links to the entry for "story file," which describes it as "A file which contains a work of interactive fiction, in a compiled form. Such files are not (in general) human-readable, and are meant to be loaded with an interpreter program," which would suggest to me the javascript file in online games that use them. IF Wiki goes on to say that the UUID should be inserted in the story file, and then given an example of inserting it in the html file. I don't know that the html file would necessarily be what contains the story, so I'm not sure how to make sense of this.)

(3) When using a hash: does each new version of the game get a new IFID, or should you stick with with the hash of the earliest released version, as suggested on IFWiki?

(4) Is it helpful/necessary to insert the string "UUID://XXXXXXXXXXXXXXXX//" into your story file (assuming you can figure out which file is the story file?) as suggested on IF Wiki?

(5) Is it helpful/necessary to create a library card for a browser-based game? (I don't even know how this would be done.)

Thanks for any guidance you can offer.

--bg

Mike Roberts

unread,
Feb 4, 2016, 3:00:22 PM2/4/16
to babe...@googlegroups.com
Hi,

My advice would be to use a randomly generated UUID.  Hashing was only ever intended as a backwards-compatibility scheme that would let the IF Archive and other third parties come up with a unique ID for old games whose authors wouldn't ever be updating them to add the Treaty bibliographic information.  For anything new, a UUID is always preferable, because it's unambiguous that the UUID is actually intended to be the public identifier for the work for database indexing purposes.  

If you go this route, your thorny questions (2) and (3) become moot - more reasons to prefer a UUID!  

As for (4) and (5), if your game is distributed as a download for local installation, then the "story file" could probably be considered to be the ZIP file or whatever other type of container format you're using to distribute the underlying web assets.  In that case, I think the best approach might be to include a Babel.xml file with the bibliographic data.  That would necessarily include the UUID, and would also serve as the library card file.

(To the Babel folks: would it be worth adding something official like this to the spec?  It might not be a common enough case to warrant inclusion.)

If your game is deployed for on-line play only and isn't ever distributed for local installation, the question of embedding a UUID and library card data is basically not relevant.  The purpose of the embedded data is to allow tools working with your distributed files to mechanically extract the information.  If you don't distribute your files, this scenario never arises, so there's no need to embed anything.  

However, perhaps you could create the Babel XML file and provide a link to it on your home page (inconspicuously, as it would only be confusing to most people).

Or better yet,  maybe Babel should explicitly define a <link> type for this?  That seems like a logical extension of the embedded Babel data idea to on-line games - if you have Babel data, you put a <link type="interactive-fiction-babel"> in your game's front page.  That would create a well-defined way for tools to mechanically find the information, but create any visible clutter for users.

Regards,
Mike


From: greeng...@gmail.com
Date: Thu, 4 Feb 2016 01:54:11 -0500
Subject: [Babel-IF] how to generate an IFID for browser-based IF
To: babe...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "Babel-IF" group.
To unsubscribe from this group and stop receiving emails from it, send an email to babel-if+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mike Roberts

unread,
Feb 4, 2016, 3:00:32 PM2/4/16
to babe...@googlegroups.com
Hi,

My advice would be to use a randomly generated UUID.  Hashing was only ever intended as a backwards-compatibility scheme that would let the IF Archive and other third parties come up with a unique ID for old games whose authors wouldn't ever be updating them to add the Treaty bibliographic information.  For anything new, a UUID is always preferable, because it's unambiguous that the UUID is actually intended to be the public identifier for the work for database indexing purposes.  

If you go this route, your thorny questions (2) and (3) become moot - more reasons to prefer a UUID!  

As for (4) and (5), if your game is distributed as a download for local installation, then the "story file" could probably be considered to be the ZIP file or whatever other type of container format you're using to distribute the underlying web assets.  In that case, I think the best approach might be to include a Babel.xml file with the bibliographic data.  That would necessarily include the UUID, and would also serve as the library card file.

(To the Babel folks: would it be worth adding something official like this to the spec?  It might not be a common enough case to warrant inclusion.)

If your game is deployed for on-line play only and isn't ever distributed for local installation, the question of embedding a UUID and library card data is basically not relevant.  The purpose of the embedded data is to allow tools working with your distributed files to mechanically extract the information.  If you don't distribute your files, this scenario never arises, so there's no need to embed anything.  

However, perhaps you could create the Babel XML file and provide a link to it on your home page (inconspicuously, as it would only be confusing to most people).

Or better yet,  maybe Babel should explicitly define a <link> type for this?  That seems like a logical extension of the embedded Babel data idea to on-line games - if you have Babel data, you put a <link type="interactive-fiction-babel"> in your game's front page.  That would create a well-defined way for tools to mechanically find the information, but create any visible clutter for users.

Regards,
Mike

From: greeng...@gmail.com
Date: Thu, 4 Feb 2016 01:54:11 -0500
Subject: [Babel-IF] how to generate an IFID for browser-based IF
To: babe...@googlegroups.com

Mike Roberts

unread,
Feb 4, 2016, 3:01:05 PM2/4/16
to babe...@googlegroups.com
Hi,

My advice would be to use a randomly generated UUID.  Hashing was only ever intended as a backwards-compatibility scheme that would let the IF Archive and other third parties come up with a unique ID for old games whose authors wouldn't ever be updating them to add the Treaty bibliographic information.  For anything new, a UUID is always preferable, because it's unambiguous that the UUID is actually intended to be the public identifier for the work for database indexing purposes.  

If you go this route, your thorny questions (2) and (3) become moot - more reasons to prefer a UUID!  

As for (4) and (5), if your game is distributed as a download for local installation, then the "story file" could probably be considered to be the ZIP file or whatever other type of container format you're using to distribute the underlying web assets.  In that case, I think the best approach might be to include a Babel.xml file with the bibliographic data.  That would necessarily include the UUID, and would also serve as the library card file.

(To the Babel folks: would it be worth adding something official like this to the spec?  It might not be a common enough case to warrant inclusion.)

If your game is deployed for on-line play only and isn't ever distributed for local installation, the question of embedding a UUID and library card data is basically not relevant.  The purpose of the embedded data is to allow tools working with your distributed files to mechanically extract the information.  If you don't distribute your files, this scenario never arises, so there's no need to embed anything.  

However, perhaps you could create the Babel XML file and provide a link to it on your home page (inconspicuously, as it would only be confusing to most people).

Or better yet,  maybe Babel should explicitly define a <link> type for this?  That seems like a logical extension of the embedded Babel data idea to on-line games - if you have Babel data, you put a <link type="interactive-fiction-babel"> in your game's front page.  That would create a well-defined way for tools to mechanically find the information, but create any visible clutter for users.

Regards,
Mike

From: greeng...@gmail.com
Date: Thu, 4 Feb 2016 01:54:11 -0500
Subject: [Babel-IF] how to generate an IFID for browser-based IF
To: babe...@googlegroups.com

bg

unread,
Feb 5, 2016, 9:15:46 AM2/5/16
to Babel-IF

My advice would be to use a randomly generated UUID.  Hashing was only ever intended as a backwards-compatibility scheme that would let the IF Archive and other third parties come up with a unique ID for old games whose authors wouldn't ever be updating them to add the Treaty bibliographic information.  For anything new, a UUID is always preferable, because it's unambiguous that the UUID is actually intended to be the public identifier for the work for database indexing purposes.  

If you go this route, your thorny questions (2) and (3) become moot - more reasons to prefer a UUID!

Oh, good. It's simpler that way. I just got the impression from the treaty that it is Not Correct to use something other than the hash.
 
As for (4) and (5), if your game is distributed as a download for local installation, then the "story file" could probably be considered to be the ZIP file or whatever other type of container format you're using to distribute the underlying web assets.  In that case, I think the best approach might be to include a Babel.xml file with the bibliographic data.  That would necessarily include the UUID, and would also serve as the library card file.

So to be clear: to do that I would basically create a plain text file, paste in one of the examples from the treaty (for example):

<?xml version="1.0" encoding="UTF-8"?>
<ifindex version="1.0" xmlns="http://babel.ifarchive.org/protocol/iFiction/">
	<!-- Bibliographic data from www.tads.org/howto/gameinfo.htm -->
	<story>
		<identification>
			<ifid>TADS-C15B8633FF25B25DB1E61DE870D19D68</ifid>
			<format>tads2</format>
		</identification>	
		<bibliographic>
			<title>Ditch Day Drifter</title>
			<author>Michael J. Roberts</author>
			<language>en-US</language>
			<headline>An Interactive Fiction</headline>
			<firstpublished>1990-08-10</firstpublished>
			<genre>Collegiate Fiction</genre>
			<group>TADS</group>
			<description>You're an undergraduate at Caltech, where you
			wake up to find it's Ditch Day, the day when the seniors ditch
			classes and leave "stacks" for the underclassmen to
			solve.<br/>The original TADS sample game.</description>
		</bibliographic>
		<tads2>
			<version>1.0</version>
			<releasedate>1990-08-10</releasedate>
			<htmldescription>You're an undergraduate at Caltech, where you
			wake up to find it's Ditch Day, the day when the seniors ditch
			classes and leave &ldquo;stacks&rdquo; for the underclassmen
			to solve.<p><i>The original TADS sample game.</i></htmldescription>
			<presentationprofile>Default</presentationprofile>
		</tads2>
	</story>
</ifindex>

...replace the info with my own, save as .xml with a file name like "babel library card," and include it in the zip?
 

Or better yet,  maybe Babel should explicitly define a <link> type for this?  That seems like a logical extension of the embedded Babel data idea to on-line games - if you have Babel data, you put a <link type="interactive-fiction-babel"> in your game's front page.  That would create a well-defined way for tools to mechanically find the information, but create any visible clutter for users.


I'm not sure I follow...would I add something like this

<link rel="something" type="interactive-fiction-babel" href="library-card.xml">
to the head of the front page? What would the value of the rel attribute be? (I'm not familiar with this but I'm reading here that "rel" is required with a "link" tag.)

Thanks for your help!

Mike Roberts

unread,
Feb 5, 2016, 1:06:59 PM2/5/16
to babe...@googlegroups.com
> So to be clear: to do that I would basically create a plain text file, 
> paste in one of the examples from the treaty... replace the info with 
> my own, save as .xml with a file name like "babel library card," and 
> include it in the zip?

Right, that's exactly what I had in mind.

> I'm not sure I follow...would I add something like this
>
> <link rel="something" type="interactive-fiction-babel" href="library-card.xml">
> to the head of the front page? What would the value of the rel attribute be? (I'm 
> not familiar with this but I'm reading here that "rel" is required with a "link" tag.)

Sorry, I really meant "rel=" rather than "type=" - my thinking was that we'd invent a relation type specifically for IF bibliography purposes.  The "type=" would probably just be "text/xml".  Otherwise, right, that would just be in the <head> section of the front page HTML file.  

I want to emphasize that both of these (the Babel.xml file and the <link>) are news idea I'm raising here, not anything in the spec.  There aren't any existing tools that will make consume either of these.

Regards,
Mike



Date: Fri, 5 Feb 2016 06:15:46 -0800
From: greeng...@gmail.com
To: babe...@googlegroups.com
Subject: Re: [Babel-IF] how to generate an IFID for browser-based IF

bg

unread,
Feb 5, 2016, 1:47:12 PM2/5/16
to Babel-IF
I want to emphasize that both of these (the Babel.xml file and the <link>) are news idea I'm raising here, not anything in the spec.  There aren't any existing tools that will make consume either of these.

Ok. I'll wait and see what you all think would be most useful, then.
Reply all
Reply to author
Forward
0 new messages