a simple "hudmessage"
Moderator: GZDoom Developers
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: a simple "hudmessage"
I think this one still needs some consideration. The current system is a complete and utter disaster.
- 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"
Most of hudmessage can probably be replicated entirely in zscript. I already see the basic structures in my head.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: a simple "hudmessage"
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.
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.
- 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"
It's a deal, then.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: a simple "hudmessage"
Ok. Give me a day to define the framework.
- cortlong50
- Posts: 753
- Joined: Mon Jun 24, 2013 7:12 pm
- Location: UT-WA
Re: a simple "hudmessage"
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?
- Major Cooke
- Posts: 8175
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: a simple "hudmessage"
ZScript.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: a simple "hudmessage"
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.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: a simple "hudmessage"
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.
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.
- 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"
Good, those are the main three virtual functions I needed for my message class. I'll adapt what I have now.
- cortlong50
- Posts: 753
- Joined: Mon Jun 24, 2013 7:12 pm
- Location: UT-WA
Re: a simple "hudmessage"
*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.
Thanks you two. You are doing gods work at a Lightning’s pace.
- 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"
Damn, this whole thing being entirely ui scope is making work complicated.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: a simple "hudmessage"
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.
- 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"
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".
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".
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: a simple "hudmessage"
Be careful with such hacks: If the event protocol ever changes your hack may break.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.
I need to see your code to check if it's something missing on the engine's or your side.Now I'm running into a problem, though. The VM aborts when instancing my subclass of HUDMessageBase saying that it "requires native construction".