PC Portrait blinking
-
- Posts: 40
- Joined: Sat Jul 25, 2015 2:36 pm
PC Portrait blinking
I like to show PC avatar while talking to NPC, it makes dialogue feel more like dialogue, not monologue. Unfortunately the PC portraits will be shown for too little time and "blinks".
The obvious solution to set ´Min Subtitle Seconds´ for 1-2sec works, but results that PC answers feels too slow. Player need wait each time after response already done. So default 0.2f is absolutly fine for me. But it results PC Portraits "blinks" for 2 seconds too. Can i somehow show PC Portrait for a longer time, without making all responses wait too long? I want somehow both at same time. My Subtitle settings are:
The obvious solution to set ´Min Subtitle Seconds´ for 1-2sec works, but results that PC answers feels too slow. Player need wait each time after response already done. So default 0.2f is absolutly fine for me. But it results PC Portraits "blinks" for 2 seconds too. Can i somehow show PC Portrait for a longer time, without making all responses wait too long? I want somehow both at same time. My Subtitle settings are:
Re: PC Portrait blinking
What if you set the PC subtitle panel's Visibility to Always Once Shown or Always From Start?
-
- Posts: 40
- Joined: Sat Jul 25, 2015 2:36 pm
Re: PC Portrait blinking
I am using wrpg/runic GUI, so there is only one subtitle panel, changing Visibility does not really affects something. I could self implement portrait "drag" to show PC portrait for some extra amount of time. Just wanted to ask first, may be this can be done with one checkbox or like that. But probably not.
Do others have some problems with PC blinking in runic/wrpg gui? I doubt i am only one who is affacted.
Re: PC Portrait blinking
Hi,
Where does the player's portrait appear? Does it replace the NPC's portrait? Can you provide some screenshots please?
Where does the player's portrait appear? Does it replace the NPC's portrait? Can you provide some screenshots please?
-
- Posts: 40
- Joined: Sat Jul 25, 2015 2:36 pm
Re: PC Portrait blinking
Yes, i have only 1 Portrait place. Two portrait places btw could be a solution too.
Last edited by Maltakreuz on Wed Dec 09, 2020 1:49 pm, edited 1 time in total.
Re: PC Portrait blinking
Nice-looking UI!
Here are some suggestions to try:
1. Remove the animator from the PC Subtitle Panel and/or Response Menu Panel. (It depends on how you've set up the UI.) This will allow it to appear instantly instead of fading in/out and causing the blink.
2. Or shorten the fade animation so it takes less than 0.2 seconds.
3. Or change the animator's transitions so they occur immediately instead of waiting for the fade in/out to complete. This will help, but it won't get rid of the blink entirely.
4. Or make a subclass of StandardUISubtitlePanel and/or StandardUIMenuPanel and override the Open() and Close() method to handle opening and closing differently.
Here are some suggestions to try:
1. Remove the animator from the PC Subtitle Panel and/or Response Menu Panel. (It depends on how you've set up the UI.) This will allow it to appear instantly instead of fading in/out and causing the blink.
2. Or shorten the fade animation so it takes less than 0.2 seconds.
3. Or change the animator's transitions so they occur immediately instead of waiting for the fade in/out to complete. This will help, but it won't get rid of the blink entirely.
4. Or make a subclass of StandardUISubtitlePanel and/or StandardUIMenuPanel and override the Open() and Close() method to handle opening and closing differently.
-
- Posts: 40
- Joined: Sat Jul 25, 2015 2:36 pm
Re: PC Portrait blinking
I've screencaptured some video how does it look. It is not that bad at all, but i wish PC portrait could somehow last a little bit longer without making the whole GUI slower (in terms of response-delay, not performance of course).
-
- Posts: 40
- Joined: Sat Jul 25, 2015 2:36 pm
Re: PC Portrait blinking
Thank you!
Oh, i did not even realized i have one attached, but it is disabled. If activeted no dialogue will be shown at all. So i suppose it is already instantly without fade time. (it just never goes from start state)Tony Li wrote: ↑Wed Dec 09, 2020 1:38 pm 1. Remove the animator from the PC Subtitle Panel and/or Response Menu Panel. (It depends on how you've set up the UI.) This will allow it to appear instantly instead of fading in/out and causing the blink.
2. Or shorten the fade animation so it takes less than 0.2 seconds.
3. Or change the animator's transitions so they occur immediately instead of waiting for the fade in/out to complete. This will help, but it won't get rid of the blink entirely.
I did not mean blinking by showing entire dialogue gui, but on switching PC/NPC Portraits and Name the PC will be shown too quick to be noticed by player. This can be observed in video post above.
Re: PC Portrait blinking
Oh, I understand what you mean now. The panels are designed to show their portraits only as long as the panel is visible. You might prefer to not show the PC's portrait at all. (Unassign it from the response menu panel.)
If you want to show it for longer than the panel is visible, you'll need to do a little scripting. Just thinking off the top of my head, you could:
1. Write a little script that manages the portrait image, with a method that queues up the display of a portrait sprite. It should always allow a minimum amount of time (e.g., 1 second) to show the current sprite before changing to the next sprite in the queue. Rough pseudocode:
2. Unassign the portrait image from the subtitle panel and menu panel. Write subclasses that override StandardUISubtitlePanel.ShowSubtitle and StandardUIMenuPanel.ShowResponses. Rough example:
If you want to show it for longer than the panel is visible, you'll need to do a little scripting. Just thinking off the top of my head, you could:
1. Write a little script that manages the portrait image, with a method that queues up the display of a portrait sprite. It should always allow a minimum amount of time (e.g., 1 second) to show the current sprite before changing to the next sprite in the queue. Rough pseudocode:
Code: Select all
public class PortraitManager : MonoBehaviour
{
public void ShowPortrait(Sprite portraitSprite)
{
queue.Enqueue(portraitSprite);
}
void Update()
{
if (CurrentSpriteHasShownLongEnough() && !queue.Empty())
{
ShowNextQueuedSpriteAndResetTimer();
}
}
}
Code: Select all
public class MySubtitlePanel : StandardUISubtitlePanel
{
public override void ShowSubtitle(Subtitle subtitle)
{
base.ShowSubtitle(subtitle); // Since portrait image is unassigned, base method won't show it.
portraitManager.ShowPortrait(subtitle.speakerInfo.portrait); // Queue up portrait image to be shown.
}
}
-
- Posts: 40
- Joined: Sat Jul 25, 2015 2:36 pm
Re: PC Portrait blinking
Yes, thank you! Queue them should work. Just wanted to ask first, if no appropriate checkbox somewhere to avoid boilerplate-code.
Well never show PC portrait is solution too. But i personally find 2 portraits make things a little bit more vivid. But "blinking" with avatar and speaker-name distracts and annys player.
I will play some rpg games to see how they avoid same problem, but queueing should work fine and is straightforward to implement.
Thank you.