gemot encubed  

Go Back   gemot encubed > Gemot > Technical Issues

Technical Issues For bug reports, problem solving, and help running Japanese software.

Reply
 
Thread Tools Display Modes
  #1  
Old 2007-08-19, 02:03
KnightBaron
Guest
 
Posts: n/a
Default Will onscripter support unicode in the near future?

I'm translating narcissu into local language but the problem is onscripter can't read the script in my language. (ANSI and UNICODE) I have to remake the font that replace english character with my local character (Thai) and that is a load of work and the output isn't good enough. I'm also trying to port everything into Ren'Py (which support my language) but that is too much work too.
So, the question is will onscripter support unicode in the near future?
Well, sorry for my bad english though.
Reply With Quote
  #2  
Old 2007-09-09, 05:46
Asceai's Avatar
Asceai Asceai is offline
Posts way too much
 
Join Date: Mar 2007
Posts: 1,413
Default

I wonder how much trouble it would be to hack the ` command thingy to support UTF-8.. I haven't looked at onscripter's source, but I wouldn't think it would take too much work.
Reply With Quote
  #3  
Old 2007-09-09, 07:46
Agilis's Avatar
Agilis Agilis is offline
Obsessive
 
Join Date: Jan 2006
Location: #denpa@irc.synirc.org
Posts: 405
Send a message via AIM to Agilis
Default

I'm not much for reading source, but a long time ago, talking to someone that worked with onscripter a great deal, it was described as "the worst mass of spaghetti code he's ever seen".

If I remember, making it so that the number-pad enter key would advance the text became a non-trivial task...
__________________
www.neechin.net @aginyan Narcissu 2 Eng #denpa@synirc.org
Shares of bridge for sale: $590 a share. Funded by: "did you really say that just now?"
Reply With Quote
  #4  
Old 2007-09-10, 01:54
Asceai's Avatar
Asceai Asceai is offline
Posts way too much
 
Join Date: Mar 2007
Posts: 1,413
Default

Well, I went and had a peek at onscripter. Hacking this in may be fairly trivial afterall--what I'm going to try is throwing out shift_jis support and replacing that stuff with utf-8.

Last edited by Asceai; 2007-09-10 at 02:06.
Reply With Quote
  #5  
Old 2007-09-10, 02:01
Asceai's Avatar
Asceai Asceai is offline
Posts way too much
 
Join Date: Mar 2007
Posts: 1,413
Default

Well, it was pretty easy to get it to display 2-byte UTF-8 characters. Thai is probably in the 3-byte range though, and this would take some more work.
Reply With Quote
  #6  
Old 2007-09-10, 12:37
pbsaffran pbsaffran is offline
Local
 
Join Date: Feb 2007
Location: Germany
Posts: 101
Send a message via AIM to pbsaffran Send a message via Skype™ to pbsaffran
Default

Woot?
You know, a build with that would be of high interest to most EU fans.
Good job!
Reply With Quote
  #7  
Old 2007-09-10, 17:54
Unregistered
Guest
 
Posts: n/a
Default

Hm... if you can display 2-byte characters, why not just use UCS-16.
Reply With Quote
  #8  
Old 2007-09-10, 19:12
Roto
Guest
 
Posts: n/a
Default

The problem with UCS-16 is that everything (even the basic ASCII set) is a two-byte character. NScripter uses single-byte characters for its commands. You'd have to modify ONscripter to take its commands as UCS-16 strings (and it's all implemented with C strings, not some fancy string library, so you'd probably be looking at a significant rework of the script parser.)

The variable character length of UTF-8 works fine with the existing script parser in terms of commands. Unfortunately, the variability means that text display routines must be altered to handle this variability. As Agilis mentioned earlier, the ONScripter code is *not* a prime example of well-organized, modular code, so there are several different places you have to modify the script parser and text display routines. Tracking down and dealing with edge cases is a bit of a pain; getting basic UTF-8 support working is fairly straightforward but you'll find it breaks on menu choices, fast forwarding, log mode, and other similar cases.

Another factor that must be considered is that ONScripter uses fixed-width fonts. Roman characters are rendered exactly half as wide as Japanese characters, on a fixed grid. It determines whether to use full-width or half-width based on whether a character is one or two bytes. That approach does not work for UTF-8; many multi-byte characters, even in a fixed-width font, are half-width; and some (accents) don't advance the cursor at all. To really provide full Unicode support, it also becomes rather necessary to implement variable-width (proportional) font spacing, especially for languages that don't work with fixed-width characters as well as English or Japanese.

I've done a little bit of experimental work on both areas (see here and here) but it's based on an old version of ONScripter, highly experimental, and I haven't been able to work on it in quite some time.

Last edited by Roto; 2008-03-23 at 23:19.
Reply With Quote
  #9  
Old 2007-09-11, 08:58
-
Guest
 
Posts: n/a
Default

If ONscripter doesn't come around, I guess the second best thing would be to port the whole thing over to KiriKiri (which supports UTF-16 just fine), especially if you don't have branching anyway like in Narcissu. KiriKiri's syntax is close enough to ONscripter's to make it possible with just a few regular expressions. Well, you'd probably have to redo the menus, but that's not THAT much work.
Reply With Quote
  #10  
Old 2007-10-03, 07:52
KnightBaron
Guest
 
Posts: n/a
Default

The problem is how could I learn how to use Kirikiri? I don't know japanese language at all.
Reply With Quote
  #11  
Old 2007-10-03, 08:20
PyTom's Avatar
PyTom PyTom is offline
Regular
 
Join Date: Nov 2005
Posts: 91
Default

I would be willing to help people port games over to Ren'Py, if they think that's the way to go.
Reply With Quote
  #12  
Old 2007-10-03, 11:49
Asceai's Avatar
Asceai Asceai is offline
Posts way too much
 
Join Date: Mar 2007
Posts: 1,413
Default

An automated nscripter->renpy tool might be a fun idea. How feasible do you think it would be?

Then we just need to have similar tools for blade and kirikiri, just in case anyone forgets what the best open visual novel engine is! =p
Reply With Quote
  #13  
Old 2007-10-03, 20:37
PyTom's Avatar
PyTom PyTom is offline
Regular
 
Join Date: Nov 2005
Posts: 91
Default

I don't think it would be terribly hard to do, at least for a basic translation of the dozen or so commands that are most used in a game. I'd consider doing this if someone was quite serious about a translation.
Reply With Quote
  #14  
Old 2007-10-03, 20:51
Asceai too lazy to log in
Guest
 
Posts: n/a
Default

I think the easiest thing would be for assisting conversion to ren'py.. so, while the actual game script might be pretty easy to convert over, stuff like the menus and such would be more work.
Reply With Quote
  #15  
Old 2007-10-04, 21:39
KnightBaron
Guest
 
Posts: n/a
Default

An automated nscripter->renpy tool would be a great help. There're many good novels on nscripter engine. I think many games could be translated into other languages easily if such a tool is available. I'm also considering to code it myself but please don't expect anything of me since I'm not a professional coder.
Again, sorry about my bad english. Hope you understand what I'm trying to say. :P
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
RLDev Unicode Characters Problem RazoR Technical Issues 1 2013-05-17 05:43
Kirikiri2 Unicode Unregistered Technical Issues 4 2011-09-06 23:05
Help needed to extend rlBabel's proportional text support Polarem Production & Help 0 2011-02-03 01:41
New ONScripter version & support site Sonozaki Futago-tachi Production & Help 1 2009-09-26 00:55
help me,how can i make kpac support Chinese? fby1029 Technical Issues 3 2007-10-25 23:43


All times are GMT -8. The time now is 13:28.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.