a simple "hudmessage"

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: a simple "hudmessage"

Post by Graf Zahl »

I think this one still needs some consideration. The current system is a complete and utter disaster.
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: a simple "hudmessage"

Post by Marisa the Magician »

Most of hudmessage can probably be replicated entirely in zscript. I already see the basic structures in my head.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: a simple "hudmessage"

Post by Graf Zahl »

Surely it can. What cannot be done is to attach them to the status bar so that they also act like a native HUD message.
Let's make a deal: I'll add the interface to add them and you do a reference implementation of a simpler case - the rest could then be done later if people feel like sharing their ideas.
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: a simple "hudmessage"

Post by Marisa the Magician »

It's a deal, then.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: a simple "hudmessage"

Post by Graf Zahl »

Ok. Give me a day to define the framework.
User avatar
cortlong50
Posts: 753
Joined: Mon Jun 24, 2013 7:12 pm
Location: UT-WA

Re: a simple "hudmessage"

Post by cortlong50 »

Graf Zahl wrote:Surely it can. What cannot be done is to attach them to the status bar so that they also act like a native HUD message.
Let's make a deal: I'll add the interface to add them and you do a reference implementation of a simpler case - the rest could then be done later if people feel like sharing their ideas.

yesssss.

are you two talking about doing in zscript or in ACS?
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: a simple "hudmessage"

Post by Major Cooke »

ZScript.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: a simple "hudmessage"

Post by Graf Zahl »

We are talking about exposing the HUD message management part of the status bar to ZScript so that people can write their own message classes. The ACS-versions are too much beyond hope so those will remain private. The first step is done, i.e. creating the abstract base class. Now the API needs to be exposed which should be done soon.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: a simple "hudmessage"

Post by Graf Zahl »

I just committed the ZScript interface. Have fun defining your own HUD messages.

The interface itself is very minimal, there's only 3 virtual functions: Tick, Draw and ScreenSizeChanged. No actual content is currently provided, just an empty abstract base class.
Normally this should be implemented that Tick is doing the time based processing, Draw just rendering the current state and ScreenSizeChanged to make adjustments if the layout needs to be adjusted.

At no point should any time based calculations be performed in Draw, because it may get called several times per Tick.
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: a simple "hudmessage"

Post by Marisa the Magician »

Good, those are the main three virtual functions I needed for my message class. I'll adapt what I have now.
User avatar
cortlong50
Posts: 753
Joined: Mon Jun 24, 2013 7:12 pm
Location: UT-WA

Re: a simple "hudmessage"

Post by cortlong50 »

*eyes fill with excitement, to actually get my feet wet with Zscript and to actually be able to flash creepy shit on the screen for players and have a functioning not completely insane hudmessage system*

Thanks you two. You are doing gods work at a Lightning’s pace.
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: a simple "hudmessage"

Post by Marisa the Magician »

Damn, this whole thing being entirely ui scope is making work complicated.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: a simple "hudmessage"

Post by Graf Zahl »

What do you expect? HUD messages run in the user interface and therefore need to be UI scope. Just the same as the status bar.
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: a simple "hudmessage"

Post by Marisa the Magician »

In that case, how would I "relay" some event from play scope to ui scope? This is currently the only thing left to do for my test message class.

Edit: Nevermind, I found a way, though it's hacky. Now I'm running into a problem, though. The VM aborts when instancing my subclass of HUDMessageBase saying that it "requires native construction".
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: a simple "hudmessage"

Post by Graf Zahl »

Marisa Kirisame wrote:In that case, how would I "relay" some event from play scope to ui scope? This is currently the only thing left to do for my test message class.

Edit: Nevermind, I found a way, though it's hacky.
Be careful with such hacks: If the event protocol ever changes your hack may break.
Now I'm running into a problem, though. The VM aborts when instancing my subclass of HUDMessageBase saying that it "requires native construction".
I need to see your code to check if it's something missing on the engine's or your side.
Post Reply

Return to “Feature Suggestions [GZDoom]”