Post subject: Text / Binary Formats - Same or different filetype?
Brandon
He/Him
Editor, Player (191)
Joined: 11/21/2010
Posts: 914
Location: Tennessee
As you are probably well aware, I really hate the .tas filetype for BizHawk. As such, I've been trying to convince adelikat using various tactics to change it. After my bribe failed, I decided to raise a legitimate question: Considering that you have plans for a binary movie format to be supported by BizHawk to complement the current text format, why not keep .tas, or as I'd like to call it, Text Annotated Screenplay, as the text format and use some other name for the binary format, which would be what non-TASers would use for movie recording anyway? He responded by saying that he's pondered this for several years throughout various projects that would implement this, and that I should start a thread on it. Here's my case, external of my disdain for .tas, for having a separate file type for the binary format. Aside from the obvious issues with identifying how to parse the file (This is quite trivial and easy to answer), I think the major issue is with file type associations. People like choosing a default program to use for a file type; for example, when I double click .tas files, I have it so that Notepad++ opens it. Well, let's say we introduce a binary format with the same filetype. Disregarding the confusion about being able to decide which format is which (This could be easily noted by calling it .bin.tas), I would now be forced to open the binary file in Notepad++ when I'd prefer to open it with Hex Workshop by default. Everything else being equal, I think this is a sufficient reason to have the binary format as a different name, perhaps .bkm, which obviously would stand for Binary Kool Movie. Right...
All the best, Brandon Evans
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3573)
Joined: 11/3/2004
Posts: 4754
Location: Tennessee
To summarize Brandon's post: If an emulator had both a binary and a text file format. Would you want them to be the same extension and freely convertable? Or a different movie extension.
It's hard to look this good. My TAS projects
Brandon
He/Him
Editor, Player (191)
Joined: 11/21/2010
Posts: 914
Location: Tennessee
adelikat wrote:
To summarize Brandon's post: If an emulator had both a binary and a text file format. Would you want them to be the same extension and freely convertable? Or a different movie extension.
Explain what you mean by freely convertable please. If you mean that an emulator would be able to open either one without knowing what it is up-front, then yes, that's the other option as I understand it. Is there something more?
All the best, Brandon Evans
Joined: 8/7/2006
Posts: 344
If the emulator had both, different extensions would be the most sensible thing to do. Requiring the emulator to be installed to switch between them so you can open them in whichever program you wanted to sucks, imo.
Editor, Emulator Coder, Site Developer
Joined: 5/11/2011
Posts: 1108
Location: Murka
Brandon wrote:
adelikat wrote:
To summarize Brandon's post: If an emulator had both a binary and a text file format. Would you want them to be the same extension and freely convertable? Or a different movie extension.
Explain what you mean by freely convertable please. If you mean that an emulator would be able to open either one without knowing what it is up-front, then yes, that's the other option as I understand it. Is there something more?
Well, unless you're directly editing it with external tools of your own creation, the two formats should behave identically right? So why should they have different extensions?
RachelB
She/Her
Player (129)
Joined: 12/3/2011
Posts: 1579
What exactly is the purpose of having both as an option?
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3573)
Joined: 11/3/2004
Posts: 4754
Location: Tennessee
Well, a lot of people prefer binary movies, due to filesize. But there are also other advantages, like loading faster (which matters in the case of very long movies), smaller savestates, and faster loading of savestates.
It's hard to look this good. My TAS projects
Brandon
He/Him
Editor, Player (191)
Joined: 11/21/2010
Posts: 914
Location: Tennessee
natt wrote:
Brandon wrote:
adelikat wrote:
To summarize Brandon's post: If an emulator had both a binary and a text file format. Would you want them to be the same extension and freely convertable? Or a different movie extension.
Explain what you mean by freely convertable please. If you mean that an emulator would be able to open either one without knowing what it is up-front, then yes, that's the other option as I understand it. Is there something more?
Well, unless you're directly editing it with external tools of your own creation, the two formats should behave identically right? So why should they have different extensions?
But I'm saying that many people, myself included, would like to edit these files with external programs. Why would the external tool have to be of my own creation? Plenty of these tools already exist.
All the best, Brandon Evans
Post subject: Re: Text / Binary Formats - Same or different filetype?
Editor, Experienced player (570)
Joined: 11/8/2010
Posts: 4036
Brandon wrote:
perhaps .bkm, which obviously would stand for Binary Kool Movie. Right...
I like your shout-out to the original suggester of that extension. Do you mean an external program included with BizHawk would be able to edit the same file in binary or text? That would sound like a useful tool.
Editor, Emulator Coder, Site Developer
Joined: 5/11/2011
Posts: 1108
Location: Murka
Brandon wrote:
But I'm saying that many people, myself included, would like to edit these files with external programs. Why would the external tool have to be of my own creation? Plenty of these tools already exist.
Not quite what I was getting at. Change that phrase to mean "external tools that aren't BizHawk". All I'm trying to say is that if the text and bin formats both load identically in BizHawk, and both function identically in every way inside BizHawk, then why shouldn't they have the same extension? The external tools can sort it out amongst themselves which "subtype" they are.
Editor, Expert player (2073)
Joined: 6/15/2005
Posts: 3282
Brandon wrote:
Why would the external tool have to be of my own creation?
Of course not. Just associate one external tool (say, Notepad++) with the extension, and load a file into the second external tool if need be. There exist things like shortcuts and menus to help with this. Also, any well-designed external tool should be able to load any file you wish, no matter what its name is. All open file dialogs should have the "All types (*.*)" option in there. And there are probably easier ways to go about it, such as drag-and-drop.
Post subject: Re: Text / Binary Formats - Same or different filetype?
Brandon
He/Him
Editor, Player (191)
Joined: 11/21/2010
Posts: 914
Location: Tennessee
CoolKirby wrote:
Brandon wrote:
perhaps .bkm, which obviously would stand for Binary Kool Movie. Right...
I like your shout-out to the original suggester of that extension.
Wasn't intentional. :P
Do you mean an external program included with BizHawk would be able to edit the same file in binary or text? That would sound like a useful tool.
I'm sure tas-movie-editor will adapt to us eventually. No, I'm not proposed a packaged program to do this, but you'll be able to convert between the two formats by definition.
natt wrote:
Brandon wrote:
But I'm saying that many people, myself included, would like to edit these files with external programs. Why would the external tool have to be of my own creation? Plenty of these tools already exist.
Not quite what I was getting at. Change that phrase to mean "external tools that aren't BizHawk". All I'm trying to say is that if the text and bin formats both load identically in BizHawk, and both function identically in every way inside BizHawk, then why shouldn't they have the same extension? The external tools can sort it out amongst themselves which "subtype" they are.
I'm not even necessarily talking about one external tool loading a file; I'm talking about filetype associations as well (As in, having Windows decide which program to open a file with based on the type). Can you even create filetype associations with subtypes? From my understanding, subtypes are completely disregarded by Windows. Even if you had a program that could differentiate the loading via the subtype, there are a lot more text / hex editors out there that wouldn't have any knowledge of BizHawk to implement this.
FractalFusion wrote:
Brandon wrote:
Why would the external tool have to be of my own creation?
Of course not. Just associate one external tool (say, Notepad++) with the extension, and load a file into the second external tool if need be. There exist things like shortcuts and menus to help with this.
This seems like unnecessary work considering that there will rarely be a case in which one program would be able to open both of them properly.
Also, any well-designed external tool should be able to load any file you wish, no matter what its name is. All open file dialogs should have the "All types (*.*)" option in there. And there are probably easier ways to go about it, such as drag-and-drop.
I'm not talking about filetype associations with various programs; again, I'm talking about the Windows dialog that says "Always used the selected program to open this kind of file."
All the best, Brandon Evans
RachelB
She/Her
Player (129)
Joined: 12/3/2011
Posts: 1579
Can you even create filetype associations with subtypes? From my understanding, subtypes are completely disregarded by Windows. Even if you had a program that could differentiate the loading via the subtype, there are a lot more text / hex editors out there that wouldn't have any knowledge of BizHawk to implement this.
You could create a program that determines whether the file is in a text or binary format, and then send it to the appropriate program for editing. This would be extremely silly, but it is possible.
Patashu
He/Him
Joined: 10/2/2005
Posts: 4043
Obviously the binary version should be left as .tas and the text version named .tast. Tasty!
My Chiptune music, made in Famitracker: http://soundcloud.com/patashu My twitch. I stream mostly shmups & rhythm games http://twitch.tv/patashu My youtube, again shmups and rhythm games and misc stuff: http://youtube.com/user/patashu
Post subject: Re: Text / Binary Formats - Same or different filetype?
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
Brandon wrote:
.tas, .bkm
Will people finally stop using three-letter file name extensions? They make no sense and haven't been relevant for over 15 years. They only make the file type more obfuscated and cause association collisions (because most systems, most prominently Windows, distinguish between file types solely based on the extension). (Kudos to lsnes for daring to break the pattern and use a 4-letter extension. Slightly better, although still needlessly small.) </rant>
Post subject: Re: Text / Binary Formats - Same or different filetype?
Lex
Joined: 6/25/2007
Posts: 732
Location: Vancouver, British Columbia, Canada
Warp wrote:
Brandon wrote:
.tas, .bkm
Will people finally stop using three-letter file name extensions? They make no sense and haven't been relevant for over 15 years. They only make the file type more obfuscated and cause association collisions (because most systems, most prominently Windows, distinguish between file types solely based on the extension). (Kudos to lsnes for daring to break the pattern and use a 4-letter extension. Slightly better, although still needlessly small.) </rant>
Worms Armageddon replays (and therefore, TAS input files) use the ".WAgame" file extension and have since 2004-02-09 when they were introduced! :) I agree that file extensions definitely don't need to be limited to 3 characters. I've been working with ".WAgame" files for years and never even considered its length as an issue.
Brandon
He/Him
Editor, Player (191)
Joined: 11/21/2010
Posts: 914
Location: Tennessee
Well, this 3-letter extension debate is pointless, as adelikat has made it clear that he doesn't want to change the .tas extension. Furthermore, it is off-topic; the only thing that should be debated on this thread is whether or not text and binary formats for the same emulator should use the same extension.
All the best, Brandon Evans
creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
Different extensions, because 1. you can have movie.tas and movie.tas.txt in the same directory 2. tools and the emulator don't have to implement detection and conversion routines 3. you can associate .tas with a binary editor and .tas.txt (or whatever) with a text editor. (Btw. the size argument doesn't really apply these days. A file format with 64 bytes of button state per frame at 60 fps would only amount to ca. 13 MB per hour.)
AnS
Emulator Coder, Experienced player (728)
Joined: 2/23/2006
Posts: 682
One extension obviously. Look how elegantly it works in FM2: http://www.fceux.com/web/FM2.html Even though it was like this from the very beginning (FCEUX 2.0.0), I bet not many people knew FM2s can be in binary too. Text format is just the consequence of underdeveloped tools at our current disposal. Ultimately, movie editing tools should be embedded into emulator, allowing seamless editing/watching. Actual implementation of movie protocol should be irrelevant to TASer. All those problems about having to associate .tas with Notepad and .bin.tas with HexWorkshop are ridiculous. The only program associated with emulator's movie extension should be the emulator itself. Notepad++ is not good program for editing movies. It was made for editing text, and attempting to adjust TASes to follow limits of text is short-sighted.
Joined: 10/20/2006
Posts: 1248
Different extensions for different file formats. Maybe .tas for binary, if it's the same for all supported systems it should be a good extension. Why not use xml and .xml for the text files? A benefit to using the same extensions and formats for different systems is that it could make it possible to create movie files that complete two games on different systems at the same time, so I like that idea a lot.
AnS
Emulator Coder, Experienced player (728)
Joined: 2/23/2006
Posts: 682
Kuwaga wrote:
Why not use xml and .xml for the text files?
The only reason behind storing TASes in text format was to allow "easy splicing". If you open .fm2 or .tas file in Notepad++, you will notice that text is tabbed into a grid, so it's a bit easier to find specific frame (row) or button (column). So, in the essence, the movies aren't in text format, they are in "table" format. XML doesn't really work here.
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
Kuwaga wrote:
Why not use xml and .xml for the text files?
XML is really verbose for such repeating data as a keypress recording file. What would be the benefit? In theory XML makes it easier to parse the file from a third-party program, but in practice this is not the case when the data is as simple as a keypress file (there isn't much variation nor data types, nor is there any need to have an abstract way of encoding unicode characters). A simpler and easy-to-parse text format probably doesn't require significantly more code in the average programming language than embedding a full-fledged XML parser and then traversing its resulting data tree. A data file akin to CSV would be the diametric opposite of XML. Compact, easy to parse, still text-based. OTOH it's less flexible (because if in a future version more types of data is stored in the file format, a program parsing the CSV-like keypress file is probably going to break). OTOH, the latter problem can be partially solved by versioning the file format (iow. make it have a header section that tells the version of the format so that programs reading it can see if they support it).
Noxxa
They/Them
Moderator, Expert player (4124)
Joined: 8/14/2009
Posts: 4090
Location: The Netherlands
Personally, I don't see any reason for the two different formats to have different file extensions. If the emulator can easily parse both types (exactly like a number current formats such as .fm2, .pjm, etc.) then there's hardly a disadvantage to it. No need to complicate it further with different file extensions.
http://www.youtube.com/Noxxa <dwangoAC> This is a TAS (...). Not suitable for all audiences. May cause undesirable side-effects. May contain emulator abuse. Emulator may be abusive. This product contains glitches known to the state of California to cause egg defects. <Masterjun> I'm just a guy arranging bits in a sequence which could potentially amuse other people looking at these bits <adelikat> In Oregon Trail, I sacrificed my own family to save time. In Star trek, I killed helpless comrades in escape pods to save time. Here, I kill my allies to save time. I think I need help.
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
Mothrayas wrote:
Personally, I don't see any reason for the two different formats to have different file extensions.
The reason was stated in the original post: Windows can't change the file type association based on its contents, only on its name extension.
Brandon
He/Him
Editor, Player (191)
Joined: 11/21/2010
Posts: 914
Location: Tennessee
AnS wrote:
Even though it was like this from the very beginning (FCEUX 2.0.0), I bet not many people knew FM2s can be in binary too.
I had no idea about this. Probably because I assumed an extension for a text file would always store text.
Text format is just the consequence of underdeveloped tools at our current disposal. Ultimately, movie editing tools should be embedded into emulator, allowing seamless editing/watching. Actual implementation of movie protocol should be irrelevant to TASer. All those problems about having to associate .tas with Notepad and .bin.tas with HexWorkshop are ridiculous. The only program associated with emulator's movie extension should be the emulator itself. Notepad++ is not good program for editing movies. It was made for editing text, and attempting to adjust TASes to follow limits of text is short-sighted.
One day, perhaps there will be perfect TAS editing tools that beat Notepad++ in every way, all embedded in the emulator. Until that day, people like myself are going to use Notepad++ to edit their text formatted files whenever it appears to be the most convenient option. There's no reason to over limit the user.
All the best, Brandon Evans