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

ZScript and its impact on SBARINFO

Postby Graf Zahl » Thu Jan 12, 2017 12:35 pm

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
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: ZScript and its impact on SBARINFO

Postby wildweasel » Thu Jan 12, 2017 12:37 pm

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
wildweasel
change o' pace.
Moderator Team Lead
 
Joined: 15 Jul 2003

Re: ZScript and its impact on SBARINFO

Postby Graf Zahl » Thu Jan 12, 2017 12:57 pm

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
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: ZScript and its impact on SBARINFO

Postby Xaser » Thu Jan 12, 2017 1:07 pm

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
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

Re: ZScript and its impact on SBARINFO

Postby Graf Zahl » Thu Jan 12, 2017 1:13 pm

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
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: ZScript and its impact on SBARINFO

Postby Major Cooke » Thu Jan 12, 2017 4:21 pm

I hate the fact I have to rely on inventory items so this will be a FANTASTIC move forward.
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: ZScript and its impact on SBARINFO

Postby Graf Zahl » Thu Jan 12, 2017 4:23 pm

Don't get too excited. It's on my roadmap for after 2.4.0 so it's still some time off.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: ZScript and its impact on SBARINFO

Postby Major Cooke » Thu Jan 12, 2017 4:33 pm

So this is more towards one of the final things to be developed?
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: ZScript and its impact on SBARINFO

Postby Graf Zahl » Thu Jan 12, 2017 4:40 pm

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.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: ZScript and its impact on SBARINFO

Postby SanyaWaffles » Thu Jan 12, 2017 11:39 pm

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
SanyaWaffles
Navy Did Nothing Wrong
 
Joined: 25 Apr 2013
Location: Eastern Ohio
Discord: SanyaWaffles#5095
Twitch ID: sanyawaffles
Operating System: Windows 10/8.1/8 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: ZScript and its impact on SBARINFO

Postby Kinsie » Fri Jan 13, 2017 3:41 am

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
Kinsie
A Concept Utterly Obsolete
 
Joined: 22 Oct 2004
Location: MAP33
Discord: Find Me...
Twitch ID: thekinsie

Re: ZScript and its impact on SBARINFO

Postby Major Cooke » Fri Jan 13, 2017 8:55 am

I'm already looking forward to making quake-able huds like in Doom and Bulletstorm, when they come around.
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: ZScript and its impact on SBARINFO

Postby Matt » Fri Jan 13, 2017 11:16 pm

I am so happy for this news!

(someone please link me to this if I ever start complaining about SBARINFO deprecation)
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: ZScript and its impact on SBARINFO

Postby Fisk » Sat Jan 14, 2017 6:47 am

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.
Fisk
same as darkhaven3
 
Joined: 21 Sep 2016

Re: ZScript and its impact on SBARINFO

Postby Graf Zahl » Sat Jan 14, 2017 7:00 am

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.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Next

Return to Developer Blog

Who is online

Users browsing this forum: No registered users and 2 guests