Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

XY Text experts? Where are you? Im starting a project to map the Korean Alphabet

Fire Centaur
Creator
Join date: 2 Nov 2006
Posts: 149
02-12-2008 02:01
Hi there everyone,

Do you understand XY text well? I have been examining the script, and would like to talk with some experts, as I want to take on a project of mapping the Korean alphabet in the same way the XY text works.

It actually shouldnt be that hard, as the matrix of all possible korean letters is only about 400 entries. I am not Korean, but live in Seoul, and can type Korean, so creating this matrix is not a problem, just need some help in understanding the script and how to go about mapping my matrix onto the 6 sided prims...

anyone interested in lending a hand?
_____________________
Second Life to your Facebook Profile!
http://www.facebook.com/p.php?api_key=00b8153d7f12a4c7228b6c927fb2c537
Kahiro Watanabe
Registered User
Join date: 28 Sep 2007
Posts: 572
02-12-2008 02:30
XyText and XyzzyText can work in two ways:

With only one texture containing all chars, one char per face.
With many textures containing a set of chars, two chars per face:

a1,a2,a3,a4,a5,a6,a7,a8,a9,a0,a',a¿,aa,ab,ac,ad

The last one is for showing two chars in one prim face, so you can have more text in less prims.

I would recommend you to go from small to big, start with the simplest one:

b2e7394f-5e54-aa12-6e1c-ef327b6bed9e

If you want so see apply textures in a prim, in case you don't know, use this little program:

default
{
state_entry()
{
llSetTexture("textureID",ALL_SIDES);
}
}

Wikis:

XyText wiki: http://wiki.secondlife.com/wiki/XyText_1.5

XyzzyText wiki: http://wiki.secondlife.com/wiki/XyzzyText


If you need more help IM me in world.
Fire Centaur
Creator
Join date: 2 Nov 2006
Posts: 149
Korean hangul matrix
02-12-2008 09:14
Thanks Kahiro,

I think I will stick with your advice, and try the easiest implementation first.

I spent the evening tonight typing all the possible hangul korean text character combinations into an excel spreadsheet. and Ive uploaded it here:
http://www.eslteacherlink.com/files/hangul.xls
And here it is pasted below.

1)What would I have to do to modify the xy text to use these characters?
2) can I resize and shift textures separately on each face? Or when I shift a texture, does it shift all faces?
Thanks again for your help!
ㄱ ㄲ ㄴ ㄷ ㄸ ㄹ ㅁ ㅂ ㅃ ㅅ ㅆ ㅇ ㅈ ㅉ ㅊ ㄲ ㅌ ㅍ ㅎ ㅏ 가 까 나 다 따 라 마 바 빠 사 싸 아 자 짜 차 카 타 파 하 ㅐ 개 깨 내 대 때 래 매 배 빼 새 쌔 애 재 째 채 캐 태 패 해 ㅑ 갸 꺄 냐 댜 랴 먀 먀 뱌 뺘 샤 / 야 쟈 쨔 챠 캬 탸 퍄 햐 ㅒ 걔 / / / / / / / / 섀 / 얘 쟤 / / / / / / ㅓ 거 꺼 너 더 떠 러 머 버 뻐 서 써 어 저 쩌 추 꺼 터 퍼 허 ㅔ 게 께 네 데 ㄸㅔ 레 메 베 뻬 세 쎄 에 제 쩨 체 께 테 페 헤 ㅕ 겨 껴 녀 뎌 뗘 려 며 벼 뼈 셔 쎠 여 져 쪄 쳐 껴 텨 펴 혀 ㅖ 계 꼐 녜 데 떼 례 메 볘 뼤 셰 쎼 예 졔 쪠 쳬 꼐 톄 폐 혜 ㅗ 고 꼬 노 도 또 로 모 보 뽀 소 쏘 오 쪼 쪄 쳐 껴 텨 펴 혀 ㅘ 과 꽈 놔 돠 똬 롸 뫄 봐 뽜 솨 쏴 와 좌 쫘 촤 꽈 톼 퐈 화 ㅙ 괘 / 놰 돼 뙈 뢔 뫠 봬 뽸 쇄 쐐 왜 좨 쫴 쵀 꽤 퇘 퐤 홰 ㅚ 괴 꾀 뇌 되 뙤 뢰 뫼 뵈 뾔 쇠 쐬 외 죄 쬐 최 꾀 퇴 푀 회 ㅛ 교 꾜 뇨 됴 뚀 료 묘 뵤 뾰 쇼 쑈 요 죠 쬬 쵸 꾜 툐 표 효 ㅜ 구 꾸 누 두 뚜 루 무 부 뿌 수 쑤 우 주 쭈 추 꾸 투 푸 후 ㅝ 궈 꿔 눠 둬 뚸 뤄 뭐 붜 뿨 숴 쒀 워 줘 쭤 춰 꿔 퉈 풔 훠 ㅞ 궤 꿰 눼 뒈 뛔 뤠 뭬 붸 쀄 쉐 쒜 웨 줴 쮀 췌 꿰 퉤 풰 훼 ㅟ 귀 뀌 뉘 뒤 뛰 뤼 뮈 뷔 쀠 쉬 쒸 위 쥐 쮜 취 뀌 튀 퓌 휘 ㅠ 규 뀨 뉴 듀 뜌 류 뮤 뷰 쀼 슈 쓔 유 쥬 쮸 츄 규 튜 퓨 휴 ㅡ 그 끄 느 드 뜨 르 므 브 쁘 스 쓰 으 즈 쯔 츠 그 트 프 흐 ㅢ 긔 끠 늬 듸 띄 릐 믜 븨 쁴 싀 씌 의 즤 쯰 츼 긔 틔 픠 희 ㅣ 기 끼 니 디 띠 리 미 비 삐 시 씨 이 지 찌 치 기 티 피 히

From: Kahiro Watanabe
XyText and XyzzyText can work in two ways:

With only one texture containing all chars, one char per face.
With many textures containing a set of chars, two chars per face:

a1,a2,a3,a4,a5,a6,a7,a8,a9,a0,a',a¿,aa,ab,ac,ad

The last one is for showing two chars in one prim face, so you can have more text in less prims.

I would recommend you to go from small to big, start with the simplest one:

b2e7394f-5e54-aa12-6e1c-ef327b6bed9e

If you want so see apply textures in a prim, in case you don't know, use this little program:

default
{
state_entry()
{
llSetTexture("textureID",ALL_SIDES);
}
}

Wikis:

XyText wiki: http://wiki.secondlife.com/wiki/XyText_1.5

XyzzyText wiki: http://wiki.secondlife.com/wiki/XyzzyText


If you need more help IM me in world.
_____________________
Second Life to your Facebook Profile!
http://www.facebook.com/p.php?api_key=00b8153d7f12a4c7228b6c927fb2c537
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
02-12-2008 09:29
You can do it independently on each face. You're going to have to know the coordinates of each character. Might be easiest to create a list of strings, one for row in your texture, and composed of the characters for that row in order. Then you can search for each character to find its coordinates. This would be the equivalent of:

CODE

list CHAR_ORDER =
[ "abcdefg",
"hijklmn",
"opqrst",
"uvwxyz",
];

// Returns the [ row, col ] indeces of parameter in map, with the origin in
// the upper left. Negative values indicate an invalid character.
list charCoords(string char)
{
if (char == "")
{
return [ -1, -1 ];
}
char = llGetSubString(char, 0, 0);

integer nRows = llGetListLength(CHAR_ORDER);
integer row;
for (row = 0; row < nRows; ++row)
{
integer col = llSubStringIndex(llList2String(CHAR_ORDER, row), char);
if (col >= 0)
{
return [ col, row ];
}
}

return [ -1, -1 ];
}
Kahiro Watanabe
Registered User
Join date: 28 Sep 2007
Posts: 572
02-12-2008 09:41
Well that's part of the xytext script. You should check the wiki to see what is the offset for each char. I can check it later in the script. xytext works pretty well so I suggest you not touch the script and make a texture that works with it.
Sheltered Ambassador
Registered User
Join date: 29 Jun 2005
Posts: 9
02-12-2008 10:23
The script will have to be edited, since right now it's a 10 x 10 grid of letters/numbers.

If the Korean alphabet has 400 characters, it's going to have to be modified somewhat to use a 20x20 grid.
FireEyes Fauna
Registered User
Join date: 26 Apr 2004
Posts: 138
02-12-2008 10:30
I just tried pasting the korean characters into a script and it doesn't seem to support them either, so I'm not sure if this project is possible?
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
02-12-2008 16:14
From: FireEyes Fauna
I just tried pasting the korean characters into a script and it doesn't seem to support them either, so I'm not sure if this project is possible?

That shouldn't make it impossible, even if it might make it more cumbersome. Simply compute the Base64 encoding of the characters, then paste the result into the script and decode them in the script using llBase64ToString().

(EDIT: You could probably use llUnescapeURL() too. Either way.)
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
02-13-2008 08:03
From: Hewee Zetkin
That shouldn't make it impossible, even if it might make it more cumbersome. Simply compute the Base64 encoding of the characters, then paste the result into the script and decode them in the script using llBase64ToString().

(EDIT: You could probably use llUnescapeURL() too. Either way.)

Far simpler and speedier method: feed the characters into your search string through chat and keep it in state memory.
_____________________
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
02-13-2008 10:09
From: Tyken Hightower
Far simpler and speedier method: feed the characters into your search string through chat and keep it in state memory.

Only if you plan on configuring every object that'll ever hold this data in it exactly the same way. Nice idea, but I don't think it fits this application at all.
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
02-13-2008 10:27
From: Hewee Zetkin
Only if you plan on configuring every object that'll ever hold this data in it exactly the same way. Nice idea, but I don't think it fits this application at all.

I'm not sure why this is so difficult, or why it would need to change given what he wants it to do. You only need to ever load the data after a compile or reset; the former should only happen during creation and the latter should never have to happen.
_____________________
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
02-13-2008 11:07
Or when you add the script to a new prim. I would think it far better to simply preload the data statically into the script and have the script be stand-alone. But I guess we can leave that up to the designer.
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
02-13-2008 12:58
From: Hewee Zetkin
Or when you add the script to a new prim. I would think it far better to simply preload the data statically into the script and have the script be stand-alone. But I guess we can leave that up to the designer.

Like I said, when you add the script to a new prim would be during creation. It'll also save you processing time.
_____________________