ID:1077132
 
Keywords: ascii, textmode
As I've been messing about with text-mode in BYOND, I discovered that not all of the oldschool ascii characters are supported. In order to figure out which ones display correctly I ran a simple program to iterate through all 256 ascii codes and this is what I got:

/*
145: ‘
146: ’
161: ¡
162: ¢
163: £
164: ¤
165: ¥
166: ¦
167: §
168: ¨
169: ©
170: ª
171: «
172: ¬
173: ­
174: ®
175: ¯
176: °
177: ±
178: ²
179: ³
180: ´
181: µ
182: ¶
183: ·
184: ¸
185: ¹
186: º
187: »
188: ¼
189: ½
190: ¾
191: ¿
192: À
193: Á
194: Â
195: Ã
196: Ä
197: Å
198: Æ
199: Ç
200: È
201: É
202: Ê
203: Ë
204: Ì
205: Í
206: Î
207: Ï
208: Ð
209: Ñ
210: Ò
211: Ó
212: Ô
213: Õ
214: Ö
215: ×
216: Ø
217: Ù
218: Ú
219: Û
220: Ü
221: Ý
222: Þ
223: ß
224: à
225: á
226: â
227: ã
228: ä
229: å
230: æ
231: ç
232: è
233: é
234: ê
235: ë
236: ì
237: í
238: î
239: ï
240: ð
241: ñ
242: ò
243: ó
244: ô
245: õ
246: ö
247: ÷
248: ø
249: ù
250: ú
251: û
252: ü
253: ý
254: þ
255:

*/


It appears that this pattern also applies to dreammaker, and text output in dream seeker. I believe it is just because of the fact that most fonts only support these characters, and no longer have those crazy lines and filled-in blocks :)

Anyway, I just figured I would post this in case anyone wants to use them...even though I might be the only person developing a text-mode game for byond :P
A DM file is simply a text file. I believe you can still use ASCII characters but you just need to open your DM file in a different program.
Actually, BYOND does not strictly use ASCII. It looks more like BYOND ues Windows-1252 (ANSI), because it's legacy software. Though, it doesn't exactly follow ANSI completely either, apparently. This simple code gives me some strange results for some ascii values on this particular computer. Maybe another encoding all together for the Dream Seeker richtext control altogether?
mob
verb
Ascii_test()
for(var/i=0 to 255)
world << "[i] - [ascii2text(i)]"
In response to Red Hall Dev
Red Hall Dev wrote:
A DM file is simply a text file. I believe you can still use ASCII characters but you just need to open your DM file in a different program.

I was able to copy and paste the characters above into my code with no problems, but other ascii characters (like the filled in blocks and the faces) just show up as a question mark. Also, I had tried to keep the list as a dm file in my project but when I re-opened the environment half of them would disappear :/ very strange

Super Saiyan X wrote:
This simple code gives me some strange results for some ascii values on this particular computer. Maybe another encoding all together for the Dream Seeker richtext control altogether?

Would you mind posting the result here? I'd love to compare and see if it is different from what I got - most of the values below 145, other than the numbers and letters, just came out as little rectangles :D
In response to Magicsofa

Super Saiyan X wrote:
This simple code gives me some strange results for some ascii values on this particular computer. Maybe another encoding all together for the Dream Seeker richtext control altogether?

Would you mind posting the result here? I'd love to compare and see if it is different from what I got - most of the values below 145, other than the numbers and letters, just came out as little rectangles :D

There's something strange with DS's encoding. Whenever I try to save (or log) the data and open it in some kind of other file - some of them don't appear, or are different. So, I'm kind of unable to post my results, unless I take a screen shot of each one. But, here's an example, all of these show up blank in IE (saved it via the right-click log function), but appear as characters in DS.
This is the second computer I'm on with these results

Left is IE, right is DS.

hmm - I'm unable to get a lot of those characters, like the right angles and T-lines, in DS....
I'm on another computer now, and this one shows those as just unfilled rectangles.
Well as long as the map displays things in text-mode uniformly across all systems, my game won't be broken :P
BYOND currently uses latin1 (aka ISO/IEC 8859-1), last I checked. Although it seems to have some special characters in the control character section.
In response to Magicsofa
Magic, just to put another idea out there. I've been working on a text game but I don't use map-text. Instead I just got a PNG image of all the characters of a certain font I liked, then I turned those into icon_states. It's more lengthy than using map-text but it gives you the benefit of being able to add color and animation etc.

Just an idea but that works really well.
Yeah, I heard a similar idea from Vrocaan. This would be a great way to achieve the ascii feel without being limited by certain issues, such as the one this thread is about.

Another issue is that you cannot change the font used by the map in text-mode. Oh well!

Anyway, for my current project I decided to use text-mode partially to reduce development time, and partially just to explore this rather unused feature. If I were to embark on a more ambitious text-game project, I would probably use the method you described.
In response to Magicsofa
Oh right yeah, for just building something quickly it's great. I managed to do in 3 days what might of taken a week or two just by eliminating the time it takes to work on graphics.