[Added] Ability to customize pause display

Moderator: GZDoom Developers

Ability to customize pause display

Postby Marisa Kirisame » Sat Oct 16, 2021 2:31 am

This is a bit of a wild one, probably, but I'd be interested in seeing if it could be accepted.

Currently, the "Paused" display is entirely hardcoded, but it would be desirable for mods to alter that if they want something with more visual flair.

As with my previous customization features this will be done through a virtual function in the status bar. I've opened a pull request here.
User avatar
Marisa Kirisame
ZScript Crimester
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: 霧雨魔理沙#1666
Twitch ID: MarisaDOOM
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Ability to customize pause display

Postby SanyaWaffles » Sat Oct 16, 2021 3:32 am

This would be so cool.
User avatar
SanyaWaffles
Certified Heretic and Grill Champion
 
Joined: 25 Apr 2013
Location: Disappointment Island
Discord: SanyaWaffles#5095
Twitch ID: sanyawaffles
Operating System: Windows 11
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Ability to customize pause display

Postby Graf Zahl » Sat Oct 16, 2021 3:36 am

Sure, why not?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Ability to customize pause display

Postby Marisa Kirisame » Sat Oct 16, 2021 6:55 am

Graf Zahl wrote:Sure, why not?

Who are you and what have you done with Graf? :shock:
User avatar
Marisa Kirisame
ZScript Crimester
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: 霧雨魔理沙#1666
Twitch ID: MarisaDOOM
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Ability to customize pause display

Postby Logan MTM » Sat Oct 16, 2021 5:51 pm

Ok, how to...?
User avatar
Logan MTM
I can see you...
 
Joined: 16 Jan 2006
Location: Rio de Janeiro - Brazil

Re: Ability to customize pause display

Postby Blue Shadow » Sat Oct 16, 2021 11:29 pm

Something like this...

Code: Select allExpand view
class MyStatusBar : BaseStatusBar
{
    override bool DrawPaused (int player)
    {
        // Do stuff here...

        // Returning 'true' skips the internal drawing of the "Pause" sign,
        // otherwise it's drawn too.
        return true;
    }
}
User avatar
Blue Shadow
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: Ability to customize pause display

Postby Marisa Kirisame » Sun Oct 17, 2021 2:29 am

Note that the "player" parameter is used for multiplayer so you can show the "by <player name>" subtitle. It will be set to -1 if it wasn't paused by a player (does that actually happen?).
User avatar
Marisa Kirisame
ZScript Crimester
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: 霧雨魔理沙#1666
Twitch ID: MarisaDOOM
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Ability to customize pause display

Postby Logan MTM » Thu Jan 06, 2022 6:20 am

Blue Shadow wrote:Something like this...

Code: Select allExpand view
class MyStatusBar : BaseStatusBar
{
    override bool DrawPaused (int player)
    {
        // Do stuff here...

        // Returning 'true' skips the internal drawing of the "Pause" sign,
        // otherwise it's drawn too.
        return true;
    }
}

Oh, ok.
Please, let me ask.
This is about the PAUSE graphic on midle/top of the screen. Right?
There is the thing, i did 2 ACS Scripts that looks so damn cool that would be really Nice If i could replace the normal Doom Pause event with those ACS Scripts.
Basically the first one, freeze everything, fade the actual music to 0.0, fade in the Pause Music and draw the logo in the center of te screen.
The other script Just undo the first one in reverse order.

So, can i aply this plan with zscript?
User avatar
Logan MTM
I can see you...
 
Joined: 16 Jan 2006
Location: Rio de Janeiro - Brazil

Re: Ability to customize pause display

Postby Marisa Kirisame » Fri Jan 07, 2022 6:05 am

I'm afraid not. The music and sound pausing/resuming is hardcoded into the pause command. This is only for the actual display alone.

At least so far the most advanced thing I've been able to do is make the pause text bounce around like a dvd logo, but I've considered other possibilities like playing little looping animations, gradually dimming the screen, or turning the whole thing into just straight up a screensaver.
User avatar
Marisa Kirisame
ZScript Crimester
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: 霧雨魔理沙#1666
Twitch ID: MarisaDOOM
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Ability to customize pause display

Postby Rachael » Fri Jan 07, 2022 7:17 am

You can play sounds on the menu channel and they should play while paused though, AFAIK.
User avatar
Rachael
^ walking stack of unfinished projects ^
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Graphics Processor: nVidia with Vulkan support

Re: Ability to customize pause display

Postby Marisa Kirisame » Fri Jan 07, 2022 6:20 pm

Yes, I can confirm as much. It may also be possible to forcibly resume other sounds and music too, if you want to. Pretty sure those functions are exported.
User avatar
Marisa Kirisame
ZScript Crimester
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: 霧雨魔理沙#1666
Twitch ID: MarisaDOOM
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Ability to customize pause display

Postby Logan MTM » Fri Jan 07, 2022 6:39 pm

Well...
I know more about the the moon surface than zscript.
I was able to change the PAUSE lump at least.
User avatar
Logan MTM
I can see you...
 
Joined: 16 Jan 2006
Location: Rio de Janeiro - Brazil

Re: Ability to customize pause display

Postby Kzer-Za » Sat Jan 08, 2022 12:13 am

And is it possible with this method to "completely freeze" the picture on the screen? What I mean is that with the default pause screen, some parts of the picture stay animated: textures with animdefs remain animated, and textures with shaders applied also keep their shaders, so if the shader animates the texture, it remains animated when the game is paused.

For me personally it ruins the immersion, since on one hand you can see, for example, a falling object that has frozen in midair, while on the other hand, (for example) the water in a waterfall keeps flowing down. It has been bugging me for a long time.

So, is it possible with DrawPaused to remember the state of all the pixels on the screen at the moment when the game was paused and keep drawing this exact picture until the game is unpaused? If so, how do I go about it?
Kzer-Za
 
Joined: 20 Aug 2017
Operating System: Other Linux 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: Ability to customize pause display

Postby Blue Shadow » Sat Jan 08, 2022 1:02 am

This has no control over texture animation. What it is, is a UI feature that allows stuff to be drawn on the HUD while the game is paused, like the pause sign.
User avatar
Blue Shadow
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: Ability to customize pause display

Postby Nash » Sat Jan 08, 2022 1:20 am

If I recall correctly, the thing about animated textures (and shaders) to continue to animate despite the entire game being paused is to allow texture animations that aren't locked to the playsim.

Though TBH, from my non-programmer perspective, I don't understand what's so hard about making the texture animations pause along with the playsim.

(oh and yes, as Blue Shadow said, the feature that Marisa submitted to GZDoom here has nothing to do with texture animation at all)
User avatar
Nash
AKA Nash Muhandes! Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Next

Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 2 guests