Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Japanese characters (font)?

Author
Message
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 10th Jul 2015 09:15
Hi,

Does anyone have any experience with using Japanese text in AppGameKit? Or at least have a suggestions as to how best to employ it?

For most languages we can use SetTextExtendedFontImage() but that is no use for Japanese or indeed any double byte character set.

My only thought (and I don't like it) is to take a screenshot of every line of text that I want to use and then create a bitmap image of the complete string instead of just the characters.
Of course, that doesn't solve the problem of how to handle user input for Hi-Scores etc.

Anyone?

AGK V2 user - Tier 1 (mostly)
Zwarteziel
13
Years of Service
User Offline
Joined: 22nd Jan 2011
Location: Netherlands
Posted: 10th Jul 2015 10:13 Edited at: 10th Jul 2015 10:15
I have no experience with Japanese fonts in AppGameKit, but I studied Japanese when I was young. Do you plan to use all the three alphabets? If you only use Hiragana and/or Katakana, the amount of font-images remains limited. You can use these characters to phonetically spell the words for which you'd normally use Kanji.
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 10th Jul 2015 10:57
I will have to use all three alphabets for the main text in the game but user input does allow me to be less flexible.
I am considering sticking to English for user names because Japanese people still have their names Anglicised in their passports, so that would certainly make things easier. But if I do use Japanese input then I would stick to Katakana so that at least I 'only' have to worry about 50 characters.
But the question still remains of how to implement the text.

AGK V2 user - Tier 1 (mostly)
Lucas Tiridath
AGK Developer
16
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 10th Jul 2015 20:14
Are you using Tier 1 or Tier 2 for this? I encountered this problem in a Tier 2 project a while back and got around it by using the FreeType2 libraries to support TrueType fonts. Obviously you can't do that from Tier 1 though..

David Gervais
Retired Moderator
19
Years of Service
User Offline
Joined: 28th Sep 2005
Location: Montreal, Canada
Posted: 10th Jul 2015 21:49
Question..

If I took this font..

http://www.dafont.com/japanese.font

and created a bitmap font by inserting the characters in the matching ascii code slots, would it help?

I'd be willing to give it a try at least.

Let me know what you think.

Cheers!

Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 10th Jul 2015 22:12
Thank you David, that's a very generous offer.
But I don't know anything about Japanese, so I don't know if that would be OK or not. I don't want you to do something that might turn out to be a waste of time.
I will speak to one of my Japanese colleagues when I get to work on Tuesday and see what they think.

Thanks

AGK V2 user - Tier 1 (mostly)
David Gervais
Retired Moderator
19
Years of Service
User Offline
Joined: 28th Sep 2005
Location: Montreal, Canada
Posted: 10th Jul 2015 23:07
NP, as far as a bitmap font goes (or making one) there is no difference in a Capital 'A' or a Japanese character, what's important is if the correct ascii codes correspond to the right Japanese characters so that the code can use them.

Let me know what your colleagues say, and if they think it'll work, I'll go ahead and make the Japanese bitmap font.

Cheers!

Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 15th Jul 2015 23:48 Edited at: 16th Jul 2015 00:17
Unfortunately I don't see any way to use Japanese text in AppGameKit, it just isn't compatible.
AGK has been written to use ASCII only which is quite an antiquated method of using text. As the name suggests, It only really works for American text or non-accented English as I prefer to call it.
There are workarounds to use ASCII for accented characters and AppGameKit also uses a workaround with the ExtendedFontImage commands but even that is no use if you want to use the 'correct' method of encoding instead of ASCII.
So unless Paul adds support for unicode I don't think Japanese is an option.

There is of course the option of creating my own bitmap font system that supports unicode but I don't think I'll be doing that for this game. I'll probably just drop the idea of Japanese for now and look at it again when I've finished my current project

This article explains why ASCII has had its day and really shouldn't be used to reference characters.

AGK V2 user - Tier 1 (mostly)
Alex_Peres
AGK Master
15
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 23rd Jul 2015 15:07
I did this part of the engine by my self. But I works only for Windows, maybe for Mac and iOS too, but android doesn't support the UNICODE characters with NDK...
P.S. I was talking about tier 2

Login to post a reply

Server time is: 2024-11-25 19:35:10
Your offset time is: 2024-11-25 19:35:10