DavidGriffith / frotz

Infocom-style interactive fiction player for Unix and DOS (moved to https://gitlab.com/DavidGriffith/frotz)
GNU General Public License v2.0
209 stars 64 forks source link

Output doesn't mark italics, bold, monospace #49

Open Roadcrosser opened 6 years ago

Roadcrosser commented 6 years ago

As dumbfrotz purely outputs to console, I would assume stylings for italics, bold and monospace would be stripped.

Given its uses in places where such stylings are possible (e.g. IRC, Discord, Slack), it would be useful if there were a flag that caused outputs to include them.

Formatting could use the characters used in most IRC clients or ANSI escape codes (although the latter does not seem to have any support for monospace styling, given the nature of CLIs).

DavidGriffith commented 6 years ago

I'm not sure what you're suggesting here.

Roadcrosser commented 6 years ago

IF games can use formatting styles like bold, italics and monospace that don't seem to be included in dfrotz's output.

I am suggesting that there be a flag that, when enabled, causes dfrotz to output formatting markers to identify bold, italics and monospace stylings for a script reading cout to format for other platforms.

DavidGriffith commented 6 years ago

I see now. I think I can do that.

DavidGriffith commented 6 years ago

What sort of formatting markers are you expecting? Something like this?

[ITALIC]This text is in italics.[/ITALIC]
Roadcrosser commented 6 years ago

Like I said in the first post, the same ones used by IRC would suffice. That is, ASCII 0x02 for bold, ASCII 0x1D for italics and ASCII 0x11 for monospace. These characters would be used as toggles, and so wouldn't need closing.

Roadcrosser commented 6 years ago

To clarify, I feel that tags like [ITALIC] may at some point clash with any game that might, for some reason, decided to print those kind of strings. In addition, using a string that long may affect the display of lines that use it because it may be significantly long enough that it affects the perceived length the line.