ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Is there a way to display Ascii in Adrift?

This forum is the place to learn about and discuss ADRIFT 5. Feel free to mention any bugs you find here, but please also add these to the Bugs & Enhancements list.

Please also refer to the ADRIFT 5 Wiki for more information.

Is there a way to display Ascii in Adrift?

Postby DazaKiwi » Wed Apr 01, 2015 5:31 am

Can Adrift display ascii code? either using html tags or its not possible?

I have to methods i want to use it for;

1. Using an Ascii title creator like here...http://patorjk.com/software/taag/#p=display&f=Big&t=Type%20Something%20


2. I want to experiment with 2d array mapping using ascii code for walls, terrain types etc. The array part i have working, but the ascii isn't appearing.
User avatar
DazaKiwi
 
Posts: 472
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand

Re: Is there a way to display Ascii in Adrift?

Postby Campbell » Wed Apr 01, 2015 7:41 am

Yes - it's just a case of selecting the right font. If you take a look at Jacaranda Jim you'll see I did something similar.
ADRIFT Developer developer.
User avatar
Campbell
Site Admin
 
Posts: 4569
Joined: Sun Jun 23, 2002 11:05 am
Location: Edinburgh, Scotland

Re: Is there a way to display Ascii in Adrift?

Postby DazaKiwi » Wed Apr 01, 2015 10:10 pm

The Courier font shows the ascii title (i used this font for the same job in Twine) but in Runner it's all jumbled out of alignment you cannot make out any lettering at all. I tried centering the text but that didn't make any difference. The funny thing is, when I pasted the ascii code into the display area it does so correctly just as i had wanted it to display in runner.

Is there something else i need to add to the html code to make this work?
User avatar
DazaKiwi
 
Posts: 472
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand

Re: Is there a way to display Ascii in Adrift?

Postby saabie » Wed Apr 01, 2015 11:49 pm

You probably need to use a monospaced font such as "Lucinda Console" or "DejaVu sans mono".
Last edited by saabie on Thu Apr 02, 2015 12:50 am, edited 2 times in total.
saabie
 
Posts: 827
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia

Re: Is there a way to display Ascii in Adrift?

Postby DazaKiwi » Thu Apr 02, 2015 12:15 am

saabie wrote:You probably need to use a monospaced font such as "Lucinda Console" or "DejaVu sans mono".

Thanks for the suggestion. "Lucida Console" and the other one does improve it slightly, but still unreadable in Runner.

Im using:
adrift Code: Select all
 <font face="Lucida Console"><center> ascii title etc </center></font>


I've tried some other mono fonts too listed here http://en.wikipedia.org/wiki/Samples_of_monospaced_typefaces but no luck.

@Campbell, do you still have that game you linked earlier in this thread? would you be able to have a look at what font you used?

Finding out how to do this would be handy for others too who want to use an Acsii Title for their game.
User avatar
DazaKiwi
 
Posts: 472
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand

Re: Is there a way to display Ascii in Adrift?

Postby saabie » Thu Apr 02, 2015 12:51 am

"MS Gothic" looks the nicest on my system, as it is monospaced and does not have extra space between lines (so the block-drawing characters join up properly vertcally).
Note that "MS UI Gothic" is NOT the same thing, and is not monospaced.

It is also a full unicode font so you have access to hundreds of extra symbols to draw with.
These characters can be copy-pasted into a text box with microsoft's "Character Map" utility, which is under Accessories/System Tools on the windows menu.
saabie
 
Posts: 827
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia

Re: Is there a way to display Ascii in Adrift?

Postby Campbell » Thu Apr 02, 2015 7:24 am

For reference, I just used Arial, but the extended characters. They have all the ▀▄█▌▐░▒▓ block characters.
ADRIFT Developer developer.
User avatar
Campbell
Site Admin
 
Posts: 4569
Joined: Sun Jun 23, 2002 11:05 am
Location: Edinburgh, Scotland

Re: Is there a way to display Ascii in Adrift?

Postby DazaKiwi » Thu Apr 02, 2015 9:23 am

Thanks Campbell for your reply and the info. :)
User avatar
DazaKiwi
 
Posts: 472
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand

Re: Is there a way to display Ascii in Adrift?

Postby DazaKiwi » Fri Feb 17, 2017 9:14 pm

Coming back to this thread, just wanted to share something. In Runner using the font settings set to 'Ariel Unicode MS' this is good for standard ascii characters but doesn't work for special text ascii fonts (which is known as a figlet? i believe) that some websites you can find online can generate a text title for you like below;
http://patorjk.com/software/taag/#p=display&h=2&v=0&f=Small%20Slant&t=Example%0A%0A%0A%0A

So just use the font face markup code to change the font for the title as below to 'DejaVu sans mono' (which saabie recommended in this thread) which looks the best (for some styles like the one below- which right now looks a mess in the post here because of the websites font but looks as it should in Deja Vu font) also Lucida Console looks good too, with a very slight difference. I haven't tested this out with different style fonts from that website linked above but using the example below you can get a title text that is readable and looks good for your games if you want to use it. Copy and paste this into your game to see what it looks like **Update** <Note the ascii example below isn't displayed correctly because of the font in this forum, if you paste it in into Adrift even with the correct font it still wont display correctly. So just go to the link above to get the correct ascii title.>

<font face="DejaVu sans mono">
____ __
/ __/_ _____ ___ _ ___ / /__
/ _/ \ \ / _ `/ ' \/ _ \/ / -_)
/___//_\_\\_,_/_/_/_/ .__/_/\__/
/_/
</font>
Last edited by DazaKiwi on Tue Feb 21, 2017 9:04 pm, edited 1 time in total.
User avatar
DazaKiwi
 
Posts: 472
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand

Re: Is there a way to display Ascii in Adrift?

Postby Denk » Mon Feb 20, 2017 6:25 pm

DazaKiwi wrote:So just use the font face markup code to change the font for the title as below to 'DejaVu sans mono' (which saabie recommended in this thread) which looks the best (for some styles like the one below- which right now looks a mess in the post here because of the websites font but looks as it should in Deja Vu font) also Lucida Console looks good too, with a very slight difference. I haven't tested this out with different style fonts from that website linked above but using the example below you can get a title text that is readable and looks good for your games if you want to use it. Copy and paste this into your game to see what it looks like.

<font face="DejaVu sans mono">
____ __
/ __/_ _____ ___ _ ___ / /__
/ _/ \ \ / _ `/ ' \/ _ \/ / -_)
/___//_\_\\_,_/_/_/_/ .__/_/\__/
/_/
</font>

I could not get it to Work at first, but then I found out that I do not have "DejaVu sans mono" on my system. Thus, when publishing a game, one has to be careful which font to choose, so that the title doesn't become unreadable on other peoples computers. Thus, for mono-spaced fonts I have chosen "Courier New" since it is on this list: https://en.wikipedia.org/wiki/List_of_typefaces_included_with_Microsoft_Windows
-----------------------------------------------------------------------------------------
Out now: The Royal Puzzle, The Way Home & The Dragon Diamond
-----------------------------------------------------------------------------------------
Denk
 
Posts: 51
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark

Re: Is there a way to display Ascii in Adrift?

Postby DazaKiwi » Tue Feb 21, 2017 9:15 pm

Thanks Denk for pointing that out. I tried 'Courier New' and can confirm that does work, the lines are a little thinner than the Deja vu font, but that is no problem. So yeah, it would be a safer bet to go with the 'Courier New' in case a player doesn't have that other font installed. Also i found copying and pasting in the ascii title example i gave does not display correctly because its all out of whack due to the forum/site having a different font, so anyone wanting to try it out its best to go to the source which is the link in my other post above where you can get the proper acii title (click on Select and Copy below it) or generate another style or title. When you do paste it into your game, you will need to delete some empty space below it.
User avatar
DazaKiwi
 
Posts: 472
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 2 guests