PDA

View Full Version : Proportionally-spaced text in ONScripter games


Roto
2007-01-02, 03:39
I've been a little bored towards the end of my winter vacation, which led me to re-read a few of the al|together novels. However, re-reading only held my attention so long and I started thinking about how a lot of these novels would look much more polished if they weren't limited to monospaced fonts. So, I grabbed the source code for ONScripter, fired up my text editor, and, well, you can probably see where this is going.

After a few hours I had several of the al|together localizations running with proportionally-spaced fonts. It's an experimental hack; I'm still in the process of familiarizing myself with ONScripter's code enough to be able to implement this cleanly and properly. But, it's working, and surprisingly well considering the fact that I hadn't taken a close look at ONScripter's code before tonight.

If you want to try it out, here's (http://www.roto1.net/misc/dev/ons_prop/exp_prop_text_patch_1.patch) my patch, for insani's 2006/07/24 version of ONScripter. Add the -DPROP_TEXT flag to the appropriate Makefile.

And a few screenshots: 1 (http://www.roto1.net/misc/dev/ons_prop/narcissu.png) 2 (http://www.roto1.net/misc/dev/ons_prop/redshift.png)

Hopefully this will be something I can keep working on in my free time.

Unregistered
2007-01-02, 06:43
Disclaimer: I know almost nothing about ONScripter.

Do NScripter scripts have manual line breaks? Just, it looks like they wrap prematurely in your screenshots, which I'm guessing is because the breaks were already there, based on the previous font size.
If that's the case, I guess the next feature for you to add would be proper dynamic word-wrap :)

But the main thing I want to ask in this thread, since I've considered hacking on ONS in the past: why does Insani maintain a separate branch? Does the original ONS author not accept patches anymore?

Having a fork and not knowing which one to hack on discourages contributors...

Message
2007-01-02, 09:25
ONS already does linebreaking automatically, but it could be that the current algorithms presume a fixed-width font and thus cut off a line too early.

This looks great, Roto! I really hope this will make its way permanently into ONS at some point.

DaFool
2007-01-03, 10:06
I've gotten used to the type-writery feel of ONS games, so much so that I try to emulate it in Ren'Py :)

ChocoEd
2007-01-03, 20:54
But the main thing I want to ask in this thread, since I've considered hacking on ONS in the past: why does Insani maintain a separate branch? Does the original ONS author not accept patches anymore?

Yeah, for a while insani was having difficulties getting patches accepted promptly, and stumbling over other cases where changes to the main codebase would break our previously-submitted patches haphazardly. Basically the needs of English-language ONScripter users and the needs of Japanese users weren't overlapping a whole lot.

I think the situation stabilized a bit later on, but basically the insani branch is just a consequence of our need to support our own releases reliably and on our own aggressive schedule... we're not really in the business of running an open-source collaborative project per se, so we haven't taken a lot of steps to streamline and encourage that side of things, unfortunately.

Unregistered
2007-01-04, 01:30
I can understand the frustration of having your changes break. Even if there was an easy CVS/SVN repo where you had access it'd still be a pain to correct.

May I humbly suggest that rather than distribute full source code, you name an upstream version number and merely distribute a patch?
This way you can still maintain your patch separate without the hassle of merging with the latest version when you have other things to worry about, but people who want to take advantage of the latest official ONScripter codebase have an easier place to start from.

It's easier to try and apply an old patch to a newer codebase, than it is to diff two forks and merge them in my experience...

Feel free to ignore me. I've never *actually* worked on the code as of yet, other than trying to debug something a year or so ago, so I'm not in a position to start instructing people on how to maintain it really... :)

gp32
2007-01-06, 15:10
May I humbly suggest that rather than distribute full source code, you name an upstream version number and merely distribute a patch?
I would have done this a long time ago except for one thing: ogapee doesn't keep an archive of his versions; you only get access to his last few. As it stands, onscripter-insani has the largest extant archive of onscripter source code out there on the web today, because we *do* maintain access to every build we've ever done.

Furthermore, I've spoken to ogapee about this matter; he's told me several times that he prefers that I maintain a separate branch, as his concern for the English-speaking population isn't all that high (and my concern for the Japanese-speaking population isn't all that high either, so it was a natural fit).

As for the next version of onscripter, that won't be out for a while due to time constraints at IRL work. Maybe sometime late February ...