This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Y.Petremann's profile picture

Full ASCII support + codepage

Started by Y.Petremann, 03 December 2012 - 11:47 AM
Y.Petremann #1
Posted 03 December 2012 - 12:47 PM
Firstly I think that implementing unicode is not a good idea, since there is so many glyph and not created to be used in monospace

But I think that we must being able to use the full ASCII chart, and additionnaly, like old computer setting codepages.

If we don't change the actual character size, the codepage file would be 2ko
the graphical appearance of the characters would be defined in binary format like that by 64 bit :



00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000

01111110
10000001
10100101
10000001
10111101
10011001
10000001
01111110

01111110
11111111
11011011
11111111
11000011
11100111
11111111
01111110
...

When running a program could load a codepage or modify directly the character by setting directly codes

One implementation I have though could be :

term.glyph(char,line,value) -- to change the way a glyph is draw ( don't apply directly)
term.apply() -- apply modification make by glyph()
term.codepage(string or filename) -- directly change all glyph depending to the codepage

Firstly it could be good for somes person making programs that require special characters, but with glyph() it could be possible to animate without rewriting text, and finaly to make localized programs.
Edited on 04 December 2012 - 01:55 PM
ChunLing #2
Posted 04 December 2012 - 08:02 AM
This is actually rather intriguing. So you would actually make your own glyphs using 8 digit hexidecimal, and thus could display pretty much any two-color image that way.

On the other hand, I think that implementing some kind of standard language support is a good idea, it just hasn't been done yet. But I like this for custom graphics and games and such.
Y.Petremann #3
Posted 04 December 2012 - 02:48 PM
The first problem is simple, when you look at /font/default.png, there is so much unusable character because for a reason we don't really know ComputerCraft hasn't a full ascii support, ComputerCraft don't need to parse the special formating character §, and it don't need to convert core functions to things like unicode. ( I say that for those that have not understand that … )

For the second part, I have seen that changing /font/default.png don't affect ComputerCraft. I have seen somes people that have changed this image to correspond to what they want in computercraft. I think that not good.

I saw a real program ( "Schism Tracker" ) that use two color characters (Back/Front) and a codepage to create his interface. Since we have Advanced computers, we could make somes more fancy "graphical" interfaces without using something else than 256 diferent characters.
Y.Petremann #4
Posted 04 December 2012 - 02:54 PM
Do you want a full ASCII support :?
[indent=1]No[/indent]
Do you want codepage support ?
[indent=1]That's a priority[/indent]
Your responses are contradictory, codepage need support full ASCII (the type shown in defined / font / default.png) to work. Please change your answer for the first or the last question.