Ability to customize pause display

Moderator: GZDoom Developers

User avatar
Marisa the Magician
 
 
Posts: 3843
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia

Ability to customize pause display

Post by Marisa the Magician »

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
SanyaWaffles
Posts: 764
Joined: Thu Apr 25, 2013 12:21 pm
Graphics Processor: nVidia with Vulkan support
Location: Disappointment Island

Re: Ability to customize pause display

Post by SanyaWaffles »

This would be so cool.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48331
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Ability to customize pause display

Post by Graf Zahl »

Sure, why not?
User avatar
Marisa the Magician
 
 
Posts: 3843
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia

Re: Ability to customize pause display

Post by Marisa the Magician »

Graf Zahl wrote:Sure, why not?
Who are you and what have you done with Graf? :shock:
User avatar
Logan MTM
Posts: 677
Joined: Mon Jan 16, 2006 8:53 pm
Location: Rio de Janeiro - Brazil

Re: Ability to customize pause display

Post by Logan MTM »

Ok, how to...?
Blue Shadow
Posts: 4906
Joined: Sun Nov 14, 2010 12:59 am
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: Ability to customize pause display

Post by Blue Shadow »

Something like this...

Code: Select all

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
Marisa the Magician
 
 
Posts: 3843
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia

Re: Ability to customize pause display

Post by Marisa the Magician »

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
Logan MTM
Posts: 677
Joined: Mon Jan 16, 2006 8:53 pm
Location: Rio de Janeiro - Brazil

Re: Ability to customize pause display

Post by Logan MTM »

Blue Shadow wrote:Something like this...

Code: Select all

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
Marisa the Magician
 
 
Posts: 3843
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia

Re: Ability to customize pause display

Post by Marisa the Magician »

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
Rachael
Admin
Posts: 13089
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Ability to customize pause display

Post by Rachael »

You can play sounds on the menu channel and they should play while paused though, AFAIK.
User avatar
Marisa the Magician
 
 
Posts: 3843
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia

Re: Ability to customize pause display

Post by Marisa the Magician »

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
Logan MTM
Posts: 677
Joined: Mon Jan 16, 2006 8:53 pm
Location: Rio de Janeiro - Brazil

Re: Ability to customize pause display

Post by Logan MTM »

Well...
I know more about the the moon surface than zscript.
I was able to change the PAUSE lump at least.
Kzer-Za
Posts: 507
Joined: Sat Aug 19, 2017 11:52 pm
Graphics Processor: nVidia (Modern GZDoom)

Re: Ability to customize pause display

Post by Kzer-Za »

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?
Blue Shadow
Posts: 4906
Joined: Sun Nov 14, 2010 12:59 am
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: Ability to customize pause display

Post by Blue Shadow »

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
Nash
 
 
Posts: 17319
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Ability to customize pause display

Post by Nash »

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)

Return to “Closed Feature Suggestions [GZDoom]”