Red Sweater Forums
It looks like you're new here. If you want to get involved, click one of these buttons!
Feature Request -- Support for acrosslite text format files
edited March 2007
I'm surprised this isn't already there... How hard could it be to implement?
See here for the file format:
Hmm - thanks turtlboy, I'm kind of new to this, so I have to admit I hadn't heard of the "text" format until you pointed to that document. It looks like the format is mostly intended for authors who are using Litsoft's software to generate AcrossLite binary files. Are you familiar with any sources of "text" format puzzles that Black Ink could be used with?
I'm new, too. When I saw Blank Ink on the Linked List for Daring Fireball, I thought it looked interesting. I looked around to see if the syndicated crossword in my local paper is available in some kind of digital format. It is... sort of.
They basically want you to use their java applet, but the information is also available in a text format if you poke around. I wrote a quick Perl script to convert it to the Across Lite text format, and opened it in Black Ink, but no dice. It does work in Across Lite v2 for Mac, though.
Anyway, since my last post, I looked at the binary format for Across Lite files in a hex editor, and it seems pretty straightforward. I could probably just write something slightly more complex than my previous script to convert my files to the binary .puz format. The text format just makes things easier if a person wants to create or convert other crossword puzzles.
Wow, that's pretty adventurous hacking you did :) It sounds like it "wouldn't be a bad idea at all" if Black Ink were to support this text format. I will definitely put it on the list of things to look into for future updates. The binary format is pretty easy to decipher (for the most part!) as you discovered, but no doubt the text format must be easier.
Sorry things didn't work out so easily on the first try but let me know if you think I can help in figuring out the binary format.
edited March 2007
Tell me where I'm wrong on this:
At offset 0x2, the ascii string "ACROSS&DOWN".
At offset 0x2c, the width and height of the grid as one-byte ints.
I'm not sure what else is in the "header". It doesn't really appear to matter, as I can change every other byte besides those above to 0s and it still seems to work fine.
At offset 0x34, the solution to the puzzle with capital letters and ascii '.'s for black cells. Nothing to indicate the end of a grid row; just a description of each cell.
Immediately following the solution there is a duplicate version of the solution, but this time with ascii '-'s for solvable cells and '.'s for black cells. (So not a solution this time, but a description of the grid.)
Immediately following is the title, author, and copyright notice. After each of these is a 0 byte.
Immediately following are the clues, primarily ordered by clue number, secondly by direction (across, down). The numbers for the clues are not actually included in the file, though. Each clue is followed by a 0 byte.
The end of the clues is followed by an additional 0 byte.
If I generate a small crossword, such as the example here:
It works fine in Black Ink, but not Across Lite.
If I try to generate a larger crossword, based on the text file I talked about earlier, it crashes Black Ink, and Across Lite won't open it.
Console says: Black Ink found unknown coded section "foo" in puzzle file
where 'foo' is a piece of a clue.
I'm clearly missing something... probably in the header that describes the length of clues or something...
A couple things:
1. It sounds like you've missed the 1-byte int at 0x2e, which identifies the number of clues in the puzzle.
2. Across Lite will not open any puzzle you create manually (or even edit in Black Ink), because they have a proprietary "checksum" of some kind, that Black Ink is not able to generate. Presumably you're not able to generate it either :)
So if you create the binary format yourself, you'll be able to load it into Black Ink, but not Across Lite.
Hope this helps,
edited March 2007
I'm still having problems. Adding that int didn't change anything, and as far as I can tell, it doesn't seem to affect whether existing "good" puzzles work or not. (If I download the NY Times classic, close Black Ink, change that byte to 0, save, re-open in Black Ink... it still appears to work fine.)
Everything else looks like it should work, but it doesn't. Trying to open the .puz file I generate will crash Black Ink.
I just read a different post about a crash problem, and downloaded the accompanying pre-release build. It fixes my problem. Hooray!
FYI, my puzzle was 11x13.
Heh! Glad to know that the updated version fixed the problems. Please let me know, because it's not totally clear, if there are remaining problems after the fix. I will follow up. Thanks...