CTC misaligned on centred text.

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Tayruu
Regular
Posts: 129
Joined: Sat Jul 05, 2014 7:57 pm

CTC misaligned on centred text.

#1 Post by Tayruu » Fri Dec 28, 2018 8:47 pm

In certain parts of my game, I want to display blocks of NVL text in the middle of the screen. To do so, I use {vspace=x} tags.

The problem is this causes my inline CTC element to not display, well, inline. Here is an image demonstrating such.

However, I've learned that this only happens if Renpy is using the "drawable resolution". My game's screen is actually 1280x720, but it gets doubled because of my Surface's high-DPI screen. By setting use_drawable_resolution to False, things render correctly.

I'm of two minds about using use_drawable_resolution = False - using it gives me a more accurate view of my game unaffected by my system's quirks, but it causes transitions and animations to be pixellated/blurry mid-motion before re-rendering clearly. Having it unset/True makes everything clearer (naturally) but the text rendering appears to be imperfect.

That aside, the problem of my CTC element remains. If I instead use a line of \n characters, the CTC element stays aligned. But of course, this makes a large space show up in my history screen. (Whereas I have code to strip out vspace.)
My CTC-related code is as follows.

Code: Select all

    # CTC Element
    image continimg:
        contains:
            Text("█", style="say_dialogue")
        size(32, 32) pos(0.0, 0.10)
        alpha 0.0
        linear 0.4 alpha 1.0
        linear 0.4 alpha 0.0
        repeat  

Code: Select all

ctc="continimg", ctc_pause="continimg", ctc_timedpause=Null(), ctc_position="nestled",

User avatar
Tayruu
Regular
Posts: 129
Joined: Sat Jul 05, 2014 7:57 pm

Re: CTC misaligned on centred text.

#2 Post by Tayruu » Sat Jan 05, 2019 1:59 am

Current possible solution:

Code: Select all

    config.drawable_resolution_text = False
The problem with this, naturally, is it'll cause text to display blurry at higher DPI/scaling settings. Some people might not like this.

(The transitions blurring is something I've expanded on in a separate topic.)

Post Reply

Who is online

Users browsing this forum: akakyouryuu, Google [Bot]