Yes, mainly perf reasons. First and foremost, rendering anything in software and then putting it in a 3d scene requires constant VRAM access which in turn causes constant pipeline stalls. Secondly things get weird when you use native windows font rendering because of antialiasing and sub-pixel smoothing, accessibility, DPI scaling, etc.Performance reasons, maybe, or the ability to ensure the font travels with the game.
Japanese Text Support
#21
Posted 09 October 2010 - 02:18 AM
#22
Posted 17 October 2010 - 11:55 PM
As far as current Japanese support: Many games don't really need full kanji support. Only super text-intensive games like RPGs would need more than a few screenfuls of text. For the rest, saving those few screens full of text and onscreen bits of text like "Score", "Lives", "Hospital", etc as images will probably work just fine. A high scores list might be tougher, but a Kana solution would be OK since thats what most current games do. So, before you try to implement full kanji support make sure you really really do need it. Unfortunately I will need it for my game.
~~~ KANJI SPRITES ~~~
I made a quick test program in game maker that can randomly diplay any of 2048 kanji. It displays a whole screen full of them and each one randomly changes to another kanji every step at 712 frames per second. The whole thing took me about 20 minutes to write.
First I got a Heisig kanji list off the internet and pasted it into Babel Pad (substitute whatever unicode editor you prefer). I broke the list into lines of 16 characters each. Then I opened up the GIMP graphics editor, made a new image that is 56*16 wide by 56*128 tall (56 is the dimensions in pixels of a single square kanji sprite). I made my GIMP grid have 56x56 dimensions and turned on snap to grid. I drew 8 adjacent text boxes that filled the whole image in 16x16 sections. For the font I picked a square monospaced font that had all the kanji (MS PMincho). I changed the font size to 56 pixels and turned off hinting and antialiasing. I pasted 16-row sections of the kanji list from Babel Pad into each of the 8 text boxes. At that point I had the entire kanji list in 56x56 pixel squares in an image. I saved it as a PNG.
I opened up Game Maker and created a sprite. I clicked edit sprite, picked create from strip, found my PNG image, said 2048 (the number of kanji I had) for the number of images, 16 for images per row, 56 for image width and image height, and clicked OK. It thought for a minute and succeeded in making a kanji sprite with 2048 sub-images. Then I made an object for the kanji sprite. On create I set image_speed to 0. On step I set image_index to random(2048). I made a room with n by n grid, filled the room with kanji objects, set room speed to 712, showed FPS in the title bar, and clicked run.
The bottom line is, at least for my purposes on my machine, so far displaying Kanji is working fine.
Edited by Grouchy, 18 October 2010 - 12:01 AM.
#23
Posted 19 October 2010 - 11:59 AM
Yes, you're fine if you stick to the trivial part. But you're not displaying Japanese yet, you're just displaying random subimages of a sprite. This isn't the challenge.The bottom line is, at least for my purposes on my machine, so far displaying Kanji is working fine.
Now take a Japanese text and properly display that text in Game Maker using your custom bitmap font implementation, and then you'll find out where the problem is: Game Maker can't handle Unicode texts. If you want to create a solution in GML only, the best option you have is reading a Unicode text-file byte by byte and map the Unicode characters you get from there to the sub-images in your bitmap font. That is, if you know how they should be mapped at all.
I should also note that you have already spent anywhere between 24 to 32 MB of texture data, depending on how Game Maker stores its subimages. Using bitmapped fonts is fine for character sets that fit in the ASCII range, but is rather heavy on your memory resources for a fair few of the Eastern languages.
Edited by Smarty, 19 October 2010 - 12:02 PM.
#24
Posted 20 October 2010 - 08:16 PM
Yes, you're fine if you stick to the trivial part. But you're not displaying Japanese yet, you're just displaying random subimages of a sprite. This isn't the challenge.
Now take a Japanese text and properly display that text in Game Maker using your custom bitmap font implementation, and then you'll find out where the problem is: Game Maker can't handle Unicode texts. If you want to create a solution in GML only, the best option you have is reading a Unicode text-file byte by byte and map the Unicode characters you get from there to the sub-images in your bitmap font. That is, if you know how they should be mapped at all.
I should also note that you have already spent anywhere between 24 to 32 MB of texture data, depending on how Game Maker stores its subimages. Using bitmapped fonts is fine for character sets that fit in the ASCII range, but is rather heavy on your memory resources for a fair few of the Eastern languages.
In other programming languages at least parsing unicode and mapping it to image indexes isn't very hard. I should mention that someone in this thread has already posted a link to a program that does that. I don't need to read unicode for my game or I would write you an app.
I'm a bit concerned that a 500kb image showing 2048 kanji would turn into 24-32 MB worth of texture data. Is there a way I can verify what you are telling me?
~~~~~~~~~~~~~~~~~
Edit:
OK I did some research into this texture data thing. Game maker says exactly what Smarty did right there at the bottom of the edit sprite window, 24MB.
I ran some more tests too. I ran EVGA Precision on a blank game and the blank game used the same amount of video memory as the kanji test. Then I looked at regular RAM (not video ram) usage. The blank took up 11MB, the kanji test took up 71MB. Just for fun I added another 36MB sprite data and ram usage went up to 170MB. Does this mean sprites are constantly swapping from ram into the video card, and if so maybe those pipeline stalls GearGOD was talking about are happening anyway?
I still don't know what I'm talking about and I doubt this all would help anybody besides clueless old me know what's going on in there but I figured I'd try to answer my own question since nobody else wanted to.
Edited by Grouchy, 23 October 2010 - 03:35 AM.
#25
Posted 12 January 2012 - 09:01 PM
Again, is there any possible way of getting these characters into Game Maker 8.1?
ཉ ཊ ཋ ཌ ཌྷ ཎ ཏ ཐ ད དྷ ན པ ཕ བ བྷ མ ཙ ཚ ཛ ཛྷ ཝ ཞ ཟ འ ཡ ར ལ ཤ ཥ ས ཧ ཨ ཀྵ ཪ
ྐ ྑ ྒ ྒྷ ྔ ྕ ྖ ྗ ྙ ྚ ྛ ྜ ྜྷ ྞ ྟ ྠ ྡ ྡྷ ྣ ྤ ྥ ྦ ྦྷ ྨ ྩ ྪ ྫ ྫྷ ྭ ྮ ྯ ྰ ྱ ྲ ླ ྴ ྵ ྶ ྷ ྸ ྐྵ ྺ ྻ ྼ
Note this second set; the loops on top of each one is where another symbol can fit. Even three or more of these characters can be stacked beneath one of the characters in the previous set.
Edited by Agamer, 12 January 2012 - 09:01 PM.
#26
Posted 13 January 2012 - 07:35 PM
Unicode is a long term goal for Game Maker, but I think it may well be too painful for 8.x.
http://dailly.blogspot.com/2011/01/reading-gm-suggestions.html
#27
Posted 15 January 2012 - 06:40 PM
You need to have the languages installed on your machine other wise you will get the unknown character square.
#28
Posted 15 January 2012 - 08:13 PM
I checked out the extension in your blog; it's a pretty interesting concept. I suppose having the full vocabulary of language able to translate between just all 7 of those languages would be a feat, though.I have had Japanese characters working in 8.1 & HTML5 (haven't tried GM8), I even made an extension: S.L.U.T (simple localised universal text), this was mainly for GUI.
You need to have the languages installed on your machine other wise you will get the unknown character square.
And there's still the problem of Japanese having several thousand kanji characters that are commonly used, aside from the basic hiragana and katakana. Adding Japanese support to the extension would no doubt increase the memory of a game quite a bit.
#29
Posted 15 January 2012 - 09:10 PM
But most Chinese and Japanese, especially given those that GM is aimed at are young and ambitious, already know English (unlike vice versa) - it's probably not as prohibitive for them to not be able to write in their native language as it may appear. I'm all for other languages being supported, but while there are still performance issues with GM, whose improvement benefits everyone, I think that should be the priority.Not useful to a lot of users? There are 127 million people living in video game country Japan!
This doesn't seem like something that helps many users. I'm not saying its a bad thing, just that it doesn't seem that useful to lots of users.
It's not just support for Japanese we need, but support for Unicode. This would open the door to character sets in any language. You're basically ruling out pretty much all of Asia by saying it shouldn't be a priority.
EDIT: Realise Chinese not actually mentioned, but retained for argument's sake...
Edited by masterofhisowndomain, 15 January 2012 - 09:12 PM.
#30
Posted 15 January 2012 - 10:30 PM
Japanese culture(and probably other Asian cultures) doesn't necessarily translate well to English. For example, if you want to translate Onii-chan and Onii-san, both mean "Big brother", but the -chan honorific makes it a cute way of addressing your big brother, -san being more general. I doubt "Big brother" would make much of an impact on Japanese players.But most Chinese and Japanese, especially given those that GM is aimed at are young and ambitious, already know English (unlike vice versa) - it's probably not as prohibitive for them to not be able to write in their native language as it may appear. I'm all for other languages being supported, but while there are still performance issues with GM, whose improvement benefits everyone, I think that should be the priority.
Not useful to a lot of users? There are 127 million people living in video game country Japan!
This doesn't seem like something that helps many users. I'm not saying its a bad thing, just that it doesn't seem that useful to lots of users.
It's not just support for Japanese we need, but support for Unicode. This would open the door to character sets in any language. You're basically ruling out pretty much all of Asia by saying it shouldn't be a priority.
EDIT: Realise Chinese not actually mentioned, but retained for argument's sake...
Also, considering how Japan is pretty xenophobic, they generally wouldn't be compelled to make English games(big companies probably do, though not so much doujin devs AKA indie devs, which GM aims for).
Edited by daman123125, 15 January 2012 - 10:32 PM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











