What's the latest on including ASCII Art

Good evening everyone (or at least in time zones adjacent to mine).

For an extra dash of nostalgia I want to put an ascii picture in my game. I’ve read through some posts here and there but I’m having trouble finding a definitive list of characters Inform7 will accept. I’ve tried doing a check and eliminate but it’s taking a long time.

I was hoping a resource existed that I might be able to reference or even a code set that’s safe. I’m trying to put this one in and getting shut down time and again for the characters.

I’ve read I can substitute characters for [unicode ##] but I’m hoping someone can give me a steer on which character set applies to Inform7?

____
          .-" +' "-.    __,  ,___,
         /.'.'A_'*`.\  (--|__| _,,_ ,_
        |:.*'/\-\. ':|   _|  |(_||_)|_)\/
        |:.'.||"|.'*:|  (        |  | _/
         \:~^~^~^~^:/          __,  ,___,
          /`-....-'\          (--|__| _ |' _| _,   ,
         /          \           _|  |(_)||(_|(_|\//_)
         `-.,____,.-'          (               _/
1 Like

I7 can print any Unicode character. You can specify a monospace font, and then you should ideally get good character art.

However, when the interpreter displays Unicode characters, the results are are dependent on the OS and what fonts are available. Even with the monospace font setting, the result may not form a perfect character grid.

Strict ASCII – characters 32 through 127 – should always work. Those have been around since the 1980s. If you try to use Unicode block characters (▀▄ ━┃┏┓), or other forms of character art (ツ), you’re gonna have to test on different interpreters.

Thank you.

I’m trying to get it to print as part of the closing message. Does being a part of the ending preclude the use of ascii art somehow? It’s throwing a lot of errors but looks perfect here.

What are the errors?

I really appreciate the help.

Problem. Some source text ended in the middle of a verbatim passage of Inform 6 code: main source text. This probably means that a ‘-)’ is missing.

Because of this problem, the source could not be translated into a working game. (Correct the source text to remove the difficulty and click on Go once again.)

image

This means that you have (- somewhere in your source code that you shouldn’t. Since you’re talking about ASCII art, that probably means that you’re trying to print a string that has embedded quotation marks. Like, from your example art:

When play begins:
	say fixed letter spacing;
	say ".-" +' "-.";
	say variable letter spacing;

The quoted string accidentally gets ended in the middle of the line, and everything after that is a compiler error.

To make this work, you have to use [quotation mark] for " in strings. Also ['] for a single quote, and [bracket] and [close bracket] for square brackets.

When play begins:
	say fixed letter spacing;
	say ".-[quotation mark] +['] [quotation mark]-.";
	say variable letter spacing;

This looks messy in the source code, but it comes out right on the screen.

1 Like

You’re the best. Thank you.

Do you know of a list of [what to call punctuation] ? I think you’re saying it is basic ASCII but just in case I misunderstood.