Archived

This topic is now archived and is closed to further replies.

Gammastrahler

unicode compatibility

Recommended Posts

Gammastrahler    150
hi, is it really neccessary to make my game unicode-compatible? that is, every char is of type TCHAR, and i assign text with the macro TEXT("..."). and using two versions of routines dealing with chars, for example xxxxcallA and xxxxcallW... are there other things to take into account? how do you manage your games? or do you ignore unicode completely?

Share this post


Link to post
Share on other sites
Blaster    124
I use TCHAR everywhere, never assume a character is 1 byte (I always use sizeof( TCHAR )) and I use a templated (with TCHAR) string class.

I guess that''s enough, especially since I don''t use any text-related Windows functions.

----------------
Blaster
Computer game programmer and part time human being
Strategy First - http://www.strategyfirst.com
BlasterSoft - http://www.blastersoft.com

Share this post


Link to post
Share on other sites
Elixir    122
Unicode is nice but depending on how many languages you will support, a unicode font can be upwards of 25 megs.

This is probably an error on my part but no matter what I do I cannot get wide Japanese characters to translate to MCBS. I know there are functions for this, but I mean when I actually read it. On another note, unicode does a lot of work which I personally find might not be worth it if your target audience doesn''t include most eastern audiences.

I honestly don''t know how I could handle unicode input in a fullscreen game. The actual input method for something like Japanese is terribly complex because it need to rebuild hira/kana in to kanji, and then there are MULTIPLE kanji it can build. I''m honestly more concerned with my framerate and content that supporting complex languages =P Just my opinion though. =]

If there was a simple library for it, I would probably add unicode support to the projects I use.

NOTE: Mildy off topic, but does anyone know if Unicode support is possible in a console window somehow? =]

Share this post


Link to post
Share on other sites
Michalson    1657
quote:
Original post by Elixir
NOTE: Mildy off topic, but does anyone know if Unicode support is possible in a console window somehow? =]



I doubt it. To the best of my knowlege even in NT the console window is an optimized emulation of mode 3h as far as programs are concerned. That means all characters are represented by 2 bytes, one for character and the other for color (background,foreground and blink).

Share this post


Link to post
Share on other sites
DrPizza    160
NT's console windows are, I believe, Unicode aware -- certainly cmd.exe uses Unicode throughout, and I'm not sure it'd bother if it were ANSI.

quote:
hi, is it really neccessary to make my game unicode-compatible?

No, it's not. However, using TCHARs and the various TCHAR macros doesn't hurt, so one might as well.

Now that MS has finally (June 2K1 or so) released the Unicode layer for Windows 9x (it's absurd it took so long; NT was Unicode since day 1, but one hasn't been able to ship Unicode apps to both OSes until six *years* after 9x's release), one can even use Unicode as the default.


[edited by - DrPizza on May 1, 2002 6:56:03 PM]

Share this post


Link to post
Share on other sites