ZScript and its impact on SBARINFO

Here, developers communicate stuff that does not go onto the main News section or the front page of the site.
[Dev Blog] [Development Builds] [Git Change Log] [GZDoom Github Repo]

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

ZScript and its impact on SBARINFO

Post by Graf Zahl »

I think that many modders have come to value the power of SBARINFO, but as I had to find out, it comes at a steep price.

SBARINFO is one of the largest subsystems in ZDoom with 150kb source code size - just for the status bar.
It is also a subsystem that requires broad access to the internal game state - state that is about to be gradually transitioned entirely to the scripting side to make it more configurable.

Under these circumstances, SBARINFO will inevitably turn out into a major roadblock, if it won't get sorted out.
This also means that from this point forward I will neither consider any SBARINFO related feature suggestion nor accept any SBARINFO related code submission because any further complication will make things worse.
I think it'd be in everybody's best interest if this was deprecated, all the existing widgets scriptified and then a more flexible scripting framework implemented that ultimately can also be used to run SBARINFO scripts.
I'm sorry if that may cause short term inconveniences but I have to look at the long term roadmap here and when doing this, SBARINFO doesn't really look that great, especially if it gets further expanded.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: ZScript and its impact on SBARINFO

Post by wildweasel »

I think this is a fair concession, especially since my biggest complaint with SBARINFO is that it is ultimately not very flexible without a lot of if/else cases and produces a horrible mess when trying to do anything more complicated than Hexen's status bar (like DoomRLA's old info page system, which was roughly 2 megabytes of pure code!).
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: ZScript and its impact on SBARINFO

Post by Graf Zahl »

wildweasel wrote: produces a horrible mess
That's how I would describe the parser. It's 100kb, most of it completely redundant because every single command does its own parsing.
This stuff is in desperate need of a cleanup, but it's a few months down the road.
User avatar
Xaser
 
 
Posts: 10772
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: ZScript and its impact on SBARINFO

Post by Xaser »

Am I correct in interpreting this to mean that eventually we'll be able to create/modify the status bar in ZScript? Or will it be more of a "SBARINFO++"?

Either way, the increased flexibility will be super-welcome and worth the short term feature freeze. I'd wager that most of the existing SBARINFO suggestions can fall under the [WFDS]-equivalent.
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: ZScript and its impact on SBARINFO

Post by Graf Zahl »

Xaser wrote:Am I correct in interpreting this to mean that eventually we'll be able to create/modify the status bar in ZScript?
That's the idea. Statusbars are already Objects, but that SBarInfo statusbar objects stands in the way like a giant rock and prevents full scriptification of the system.
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: ZScript and its impact on SBARINFO

Post by Major Cooke »

I hate the fact I have to rely on inventory items so this will be a FANTASTIC move forward.
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: ZScript and its impact on SBARINFO

Post by Graf Zahl »

Don't get too excited. It's on my roadmap for after 2.4.0 so it's still some time off.
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: ZScript and its impact on SBARINFO

Post by Major Cooke »

So this is more towards one of the final things to be developed?
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: ZScript and its impact on SBARINFO

Post by Graf Zahl »

Before I can get to it I need to scriptify the game code, that means most of the inventory system and the other thinkers. Otherwise these will block each other.
The plan for 2.4.0 is to have the thinker system completely scriptified, except for the fundamentals which need to be fast.
SanyaWaffles
Posts: 805
Joined: Thu Apr 25, 2013 12:21 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11 for the Motorola Powerstack II
Graphics Processor: nVidia with Vulkan support
Location: The Corn Fields
Contact:

Re: ZScript and its impact on SBARINFO

Post by SanyaWaffles »

SBARINFO is plagued with many things. While is really is good to have to not rely on ACS for scripting, SBARINFO, as MajorCooke has pointed out, still has to be based on Inventory items and certain hard-coded variables (like health/stamina) and If/else statements are more messy than my room. That is messy.

Down the line, I hope ZScript can integrate SBAFINFO and extend it, but for now we'll make do.

I look forward to what the future may hold.
User avatar
Kinsie
Posts: 7399
Joined: Fri Oct 22, 2004 9:22 am
Graphics Processor: nVidia with Vulkan support
Location: MAP33
Contact:

Re: ZScript and its impact on SBARINFO

Post by Kinsie »

I'm curious to see what comes of this, if not immediately than when canny scripters whip up some "libraries" for advanced HUD manipulation.
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: ZScript and its impact on SBARINFO

Post by Major Cooke »

I'm already looking forward to making quake-able huds like in Doom and Bulletstorm, when they come around.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: ZScript and its impact on SBARINFO

Post by Matt »

I am so happy for this news!

(someone please link me to this if I ever start complaining about SBARINFO deprecation)
Fisk
Posts: 30
Joined: Wed Sep 21, 2016 2:38 pm

Re: ZScript and its impact on SBARINFO

Post by Fisk »

While I am not holding my breath for a complete code overhaul within within the near future, I am excited for what this ultimately means for ZDoom. If SBARINFO has to go completely to make way for a more flexible alternative, hopefully as part of ZScript, then I won't be missing SBARINFO very much.
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: ZScript and its impact on SBARINFO

Post by Graf Zahl »

I think the worst case scenario for SBARINFO will be an SBARINFO -> ZSCRIPT converter if it turns out that compiling from it directly turns out too messy.

Still, SBARINFO is a classic feature directly born out of WFDS. Had the focus been on developing a proper scripting language when WFDS was a thing it would never have existed. And now precisely the thing happened that I feared from the start: It got larger and larger and harder to maintain and stands in the way.
Post Reply

Return to “Developer Blog”