Game Development Community

Supporting Double-Byte character

by Samme Ng · in Torque Game Engine · 12/22/2003 (2:40 am) · 59 replies

Hi all,

I am developing with the TGE for Asia market. That is, it is required to show Chinese, Japanese or Korean.

I have already hack into the source code with a quite stupid method. Normally TGE create 256 characters bitmap for each font type, and I changed to use 128 alphabet character and with 0x8000 ~ 0xfffe double character, that is, the table has changed from 256 to 65536.

But with this method, there is lot of bitmap to pack. With only 256 characters, it is only one sheet, however, with 65536 charactes, it is around 53 to 73 sheets.

My question is, will those sheet consume 3D display card's RAM?
Moreover, due to there are so many sheets, drawing a string will have so many time of:

< in dgl.cc >
if(newObj != lastTexture)
{
if(currentPt)
{
glBindTexture(GL_TEXTURE_2D, lastTexture->texGLName);
glDrawArrays( GL_QUADS, 0, currentPt );
currentPt = 0;
}
lastTexture = newObj;
}

Will it cause too much performance drop?

Samme
Page«First 1 2 3 Next»
#41
03/29/2005 (2:15 am)
Hi,Samme.you do the good job.i eager to play your game.:)
does this one developed with TGE?

i haven't changed the project's properites.
the new build torque_demo_debug.exe will arose memory leak every time.

Vincent,can u send these files to my mailbox:02master@163.com;many thanks.
#42
03/29/2005 (3:21 am)
Just keep in mind that you will put more than 8K content into memory, so the size will be changed so many.
#43
03/29/2005 (3:48 am)
Vincent,can u send these files to my mailbox : ch5848@ms4.hinet.net ; many thanks.
#44
03/29/2005 (7:16 am)
I have changed many codes in gFont.cc,and compiling all night long.but the warning LNK4075 still occurs ,the torque_demo_Debug.exe still arose the memory leak.
i am quite mad, vincent,please do me a favor!!! many many thanks.
#45
03/29/2005 (1:51 pm)
Have you tried this resource, which may help you find memory leak:
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=6552
#46
03/29/2005 (2:04 pm)
@Samme Ng, that is very nice game, how many players the game can support in
one zone ? i assume you divided the whole game into zones.
#47
03/29/2005 (2:25 pm)
@Samme niiiice that looks like Ragnarok ONline O-o I'm a bit rusty on my chinese (>_<) So i can't really read it...Is this being built with torque?
#48
03/29/2005 (5:03 pm)
Http://www.1001game.com/adventurer/
That's our game.
I can't give you the codes because my engineers' work is included. Yanling Wu, you should be happy that your job is more easier than mine.
#49
03/29/2005 (7:43 pm)
Woh!Vincent you do good job!admire~~
i am working for a university to build a game-liked visual lab.it's nonprofit .
and i am just really suffer how to input/output GB2312 in the game.
if you approve,can i purchase your solution about chinese i/o personally?
#50
03/29/2005 (8:27 pm)
@Kefan Xu: I haven't test how many players in a zone, that the job of server. Since it is only 2D sprite, I think it is not really limited. However, it is really some zones (maps) and transport from one to one.

@Josiah Wang: It is build with TGE, with some modification and addons.

@Vincent Yang: That game look great! Is it using TGE also?

Woo...I found here quite number of Chinese people. ^^ (I am in Hong Kong)
#51
03/29/2005 (9:31 pm)
To Yanling Wu,
Are you kidding me? My company will not allow this behavior. Don't push, just be patient.

To Samme Ng,
Haha, I am in Shanghai. Will you please give me some VIP accounts of your game? We can exchange accounts of our games :)
My Email is: hermitbab@citiz.net
I desire to play your game.
#52
03/30/2005 (7:41 am)
@Samme Ng, I am in new york, also creating a online game, i have tried about more than
100 bots in one zone, but put them in different interiors, and the game ( both server, and
client) still runs good.
@Yanling Wu, i think garagegame is also working on unicode support, here is the link:
http://www.garagegames.com/mg/forums/result.thread.php?qt=25754
so just do the other stuff first, once you done your stuff, then maybe unicode support is
ready.
#53
08/24/2005 (12:55 am)
To Vincent Yang,
With your help, we can display chinese. Thanks a lot! But, how can i input chinese?
This is a very intractable problem. Could you give me some advice?
Thanks in advance!
#54
01/09/2006 (1:44 am)
Harry Chow,
I follow your steps,but it still can't display Chinese Fonts in TGE 1.3.0.
What's the problem?Could you give me some advices?
Thanks very much!
#55
01/09/2006 (1:47 am)
Use TGE 1.4. It's got the full unicode support.
#56
01/09/2006 (2:00 am)
Paul,I have saw the TorqueUnicode in TDN,
tdn.garagegames.com/wiki/TorqueUnicode
but i have problem to use TGE 1.4 for displaying Chinese Fonts:
In TGE,after setting the TORQUE_UNICODE and the UNICODE define in the build settings of VC,
when i change the script,it still can't display it?
I don't know why and in Forum, I post bugs of TGE 1.40 in "How to use Unicode Font in TGE 1.4.0? "
www.garagegames.com/mg/forums/result.thread.php?qt=36935

and till now, no one answer!
I do need help!
Thanks!
#57
01/09/2006 (2:16 am)
// --- Three BUGs about Torque Render Unicode Chars such as Chinese Words --- //

I found three bugs in Torque 1.40 when it render Unicode Chars such as Chinese Words:
[Bug 1] Using UniCode Chars in *.gui Files
I use Microsoft PinYin IME 2003 to type in Chinese Words,
and I saw the article in TDN about "TorqueUnicode", I build the TGE 1.4.0 in WindowsXP Chinese Version SP2 and use the FLAG "TORQUE_UNICODE",but when I modify "mainMenuGui.gui",
the problem is still ON!

new GuiButtonCtrl() {
      profile = "GuiButtonProfile";
      horizSizing = "right";
      vertSizing = "top";
      position = "36 413";
      extent = "110 20";
      minExtent = "8 8";
      visible = "1";
      command = "quit();";
      text = "&#38463;&#20462;&#32599;";
      groupNum = "-1";
      buttonType = "PushButton";
         helpTag = "0";
   };

1) the char i type in "Microsoft PinYin IME 2003 " is "a 1" & "xiu 2" & "luo 1", this may create "阿修罗"!
2) when I type in this words,i use UltraEdit to save the file "mainMenuGui.gui" to UTF8 or UTF16 Format.
3) and when i test to run Torque.exe, it gave me a black Screen because the mainMenuGui.gui
is not Loaded correctly!

[Bug 2] Typeing words in GuiTextCtrl
when i ceate user name in torque,i get the string of "a 1阿xiu 2修luo 1罗" in GuiTextCtrl, but when i log in Player.GUI,the name is display normally such as "阿修罗"!

[Bug 3] You can't use IME in MessageHud for talking in Player.GUI, only what you can type are english words!

Hope your help!
And Thanks very much for you and your Team that fix these BUGs!

and Ben, I send you a email for showing the correct Chinese Words!
#58
02/07/2006 (1:34 am)
To Skanda...(USE TGE1.4)
1.open fps DEMO
2.type some chinese words in button control
3.apply and save GUI file

If I use VS.net 2003 to open XXX.UI
I can see the chinese words
but wordpad,ultraedit 9,notepad can't show current words
#59
02/07/2006 (1:50 am)
Ccljyc, Thanks very much!

Now when using TGE 1.4.0, i can show Chinese Chars!
Page«First 1 2 3 Next»