Skip to content

constant-text-fade-duration#441

Open
Enorovan wants to merge 2 commits into
masterfrom
constant-text-fade-duration
Open

constant-text-fade-duration#441
Enorovan wants to merge 2 commits into
masterfrom
constant-text-fade-duration

Conversation

@Enorovan

@Enorovan Enorovan commented Apr 5, 2026

Copy link
Copy Markdown
Member

Makes it so glyphs start fading in based on the progress of the typewriter, but the fading in of each individual glyph takes a constant amount of time

The fading should be smooth (based on dt), and should be resilient to changing the ConfigSystem::TextSpeed and ConfigSystem::SyncVoice mid-typewriting

Also fixes an issue where if you press 'advance' whilst the typewriter is cancelling (that is, you press 'advance' while it is typewriting so all glyphs start fading in immediately, and then press 'advance' again as these glyphs are still fading in), the cancellation would carry over to the next line as well, immediately cancelling it


This is a deceptively complex change, as the glyph fading progress used to be a direct calculation from the animation progress—now only the start time is; the opacity of each glyph is updated accordingly by incrementing and decrementing the opacity dynamically

The DialoguePage's state is dependent on the typewriter's progress, so when reviewing please take careful consideration and verify whether this state machine can not break with this new implementation

- Pringles

@Enorovan Enorovan linked an issue Apr 5, 2026 that may be closed by this pull request
@Enorovan Enorovan force-pushed the constant-text-fade-duration branch from 49da004 to 4e4c6e4 Compare April 5, 2026 14:09
@Enorovan Enorovan self-assigned this Apr 6, 2026
@Enorovan Enorovan marked this pull request as ready for review April 6, 2026 20:33
@Enorovan Enorovan requested a review from PringlesGang April 6, 2026 20:33

@PringlesGang PringlesGang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall structure is quite good

Comment thread src/text/typewritereffect.cpp Outdated
Comment thread src/text/typewritereffect.cpp Outdated
Comment thread src/text/typewritereffect.cpp Outdated
Comment thread src/text/typewritereffect.h Outdated
@Enorovan Enorovan force-pushed the constant-text-fade-duration branch 2 times, most recently from 47a4ced to 5a4ac9d Compare April 12, 2026 21:22

@PringlesGang PringlesGang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The glyph start progress should be dependent on TextSpeed, and their end progress should be an offset away from that starting progress depending on TextFadeInDuration and the currently predicted remaining duration of the line, such that it ends TextFadeInDuration seconds after the beginning progress

Comment thread src/text/typewritereffect.cpp Outdated
Comment thread src/text/typewritereffect.cpp Outdated
Comment thread src/text/typewritereffect.cpp Outdated
@Enorovan Enorovan force-pushed the constant-text-fade-duration branch from 278573b to b64b6e7 Compare April 14, 2026 19:46
@PringlesGang PringlesGang force-pushed the constant-text-fade-duration branch from 0ef220f to 43261a9 Compare June 28, 2026 21:20
@PringlesGang PringlesGang added this to the 0.9.X Polishing milestone Jun 28, 2026
@PringlesGang PringlesGang force-pushed the constant-text-fade-duration branch from 43261a9 to 8dfe744 Compare June 28, 2026 21:32

@PringlesGang PringlesGang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Text fade duration should be constant per character

3 participants