I’ve recently started trying to build a visual novel engine, and have come across a dilemma. In most visual novels, the text is aligned with the left side of the dialogue box. However, the text device in GKC is centered rather than using the left side. I can’t just use a text device for each box, as I want the characters to appear one by one, and there would be way too many lines of dialogue for memory to keep up.
One solution I’ve been thinking of is adding a bunch of spaces to the end of the line as a sort of counterweight based on how long the text is. However, this creates a problem due to different letters being different widths. I would need to have a library of the widths of each character, and I can’t store it in a text property due to an inability to convert substrings to numbers.
I was thinking of using a number property for each letter, but I have to include all the capital letters and symbols, which would eat up a bunch of my property limit. Then, I’d need to find about how many tenths of a space are in each letter, which needs to be as accurate as possible.
Does anyone have any ideas, and does anyone have a good way to find the width of characters?