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.