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
Major Cooke
Posts: 8170
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 »

Graf, would it be possible to introduce scaling? Having to readjust the sizes via textures can become quite a drag... Not to mention TEXTURES has a limit of *4 and /4.

And perhaps the ability to read doubles/floats too?
Blzut3
 
 
Posts: 3144
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: ZScript and its impact on SBARINFO

Post by Blzut3 »

Graf Zahl wrote:virtually unmaintainable state
I'm not sure if unmaintainable is the correct word here since it's at least not fragile, well at least to me it isn't. There is definitely a lot that could have been done better if it was designed from the start to be a real solution instead of a collection of adhoc addons which eventually grew powerful enough to replace most of the internal status bars.

One thing I am happy about in regards to SBarInfo is that it never grew into a turing complete language. I know a lot of mod authors would disagree about this, but I felt this was important since it meant among other things that it would have been fairly reasonable to make a GUI editor although one never happened (and I can think of several reasons why). I also think it would have theoretically allowed for a vanilla dirty rects system to exist automatically, but by the time I rewrote the internals to even have a chance of doing that there were already problems in the language making that non trivial.
Xaser wrote:Indeed -- I'd be quite content to start with DrawTexture+DrawText and build the rest up from there. A good library of useful shortcuts can follow afterward.
Hey that's how SBarInfo started to grow. :P Jokes aside, this really does seem like the best way to go.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ZScript and its impact on SBARINFO

Post by Graf Zahl »

Blzut3 wrote:
Graf Zahl wrote:virtually unmaintainable state
I'm not sure if unmaintainable is the correct word here since it's at least not fragile, well at least to me it isn't. There is definitely a lot that could have been done better if it was designed from the start to be a real solution instead of a collection of adhoc addons which eventually grew powerful enough to replace most of the internal status bars.
I didn't say 'fragile', I said 'unmaintainable'. The old menu was in a similar state where the code at some point just got too convoluted to comfortably work with it - but was still doing its job.
I am still trying to make sense out of large parts of SBARINFO, it is quite hard to follow. No surprise that it's easier for you, but I just can't get into it all and still need to decide how to start a working framework for ZScript based status bars. I am hoping to at least salvaging the two Draw functions because they seem better suited than what's in DBaseStatusBar. That code looks way too limited to me.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ZScript and its impact on SBARINFO

Post by Graf Zahl »

I just want to announce that this just got pushed back because a far more seroous issue has surfaced:

http://forum.drdteam.org/viewtopic.php? ... 838#p63838

I knew it was necessary to fix the type system but if such a simple thing can bring it down it needs to be done immediately.
SanyaWaffles
Posts: 800
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 »

Major Cooke wrote:Graf, would it be possible to introduce scaling?
This is something I second.

Take care of the far more serious issue at first.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ZScript and its impact on SBARINFO

Post by Graf Zahl »

Actually, scaling is the main reason why this hasn't gone forward yet. I still need to figure out how the various modes in SBARINFO work so that I can do something that can do the same thing but with less limitations.
User avatar
Major Cooke
Posts: 8170
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 somehow felt that would be the big show pauser. Resolutions need to be handled first and foremost, it would appear.
User avatar
Major Cooke
Posts: 8170
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 I opened up D4D's sbarinfo for like the third time ever and was looking around for a few variables...

Code: Select all

// Counter
		// Crosshair is at 510,380
		InInventory Counter,52 { drawimage "cnt52",  465,337; } else {
		InInventory Counter,51 { drawimage "cnt51",  465,337; } else {
		InInventory Counter,50 { drawimage "cnt50",  465,337; } else {
		InInventory Counter,49 { drawimage "cnt49",  465,337; } else {
		InInventory Counter,48 { drawimage "cnt48",  465,337; } else {
		InInventory Counter,47 { drawimage "cnt47",  465,337; } else {
		InInventory Counter,46 { drawimage "cnt46",  465,337; } else {
		InInventory Counter,45 { drawimage "cnt45",  465,337; } else {
		InInventory Counter,44 { drawimage "cnt44",  465,337; } else {
		InInventory Counter,43 { drawimage "cnt43",  465,337; } else {
		InInventory Counter,42 { drawimage "cnt42",  465,337; } else {
		InInventory Counter,41 { drawimage "cnt41",  465,337; } else {
		InInventory Counter,40 { drawimage "cnt40",  465,337; } else {
		InInventory Counter,39 { drawimage "cnt39",  465,337; } else {
		InInventory Counter,38 { drawimage "cnt38",  465,337; } else {
		InInventory Counter,37 { drawimage "cnt37",  465,337; } else {
		InInventory Counter,36 { drawimage "cnt36",  465,337; } else {
		InInventory Counter,35 { drawimage "cnt35",  465,337; } else {
		InInventory Counter,34 { drawimage "cnt34",  465,337; } else {
		InInventory Counter,33 { drawimage "cnt33",  465,337; } else {
		InInventory Counter,32 { drawimage "cnt32",  465,337; } else {
		InInventory Counter,31 { drawimage "cnt31",  465,337; } else {
		InInventory Counter,30 { drawimage "cnt30",  465,337; } else {
		InInventory Counter,29 { drawimage "cnt29",  465,337; } else {
		InInventory Counter,28 { drawimage "cnt28",  465,337; } else {
		InInventory Counter,27 { drawimage "cnt27",  465,337; } else {
		InInventory Counter,26 { drawimage "cnt26",  465,337; } else {
		InInventory Counter,25 { drawimage "cnt25",  465,337; } else {
		InInventory Counter,24 { drawimage "cnt24",  465,337; } else {
		InInventory Counter,23 { drawimage "cnt23",  465,337; } else {
		InInventory Counter,22 { drawimage "cnt22",  465,337; } else {
		InInventory Counter,21 { drawimage "cnt21",  465,337; } else {
		InInventory Counter,20 { drawimage "cnt20",  465,337; } else {
		InInventory Counter,19 { drawimage "cnt19",  465,337; } else {
		InInventory Counter,18 { drawimage "cnt18",  465,337; } else {
		InInventory Counter,17 { drawimage "cnt17",  465,337; } else {
		InInventory Counter,16 { drawimage "cnt16",  465,337; } else {
		InInventory Counter,15 { drawimage "cnt15",  465,337; } else {
		InInventory Counter,14 { drawimage "cnt14",  465,337; } else {
		InInventory Counter,13 { drawimage "cnt13",  465,337; } else {
		InInventory Counter,12 { drawimage "cnt12",  465,337; } else {
		InInventory Counter,11 { drawimage "cnt11",  465,337; } else {
		InInventory Counter,10 { drawimage "cnt10",  465,337; } else {
		InInventory Counter, 9 { drawimage "cnt09",  465,337; } else {
		InInventory Counter, 8 { drawimage "cnt08",  465,337; } else {
		InInventory Counter, 7 { drawimage "cnt07",  465,337; } else {
		InInventory Counter, 6 { drawimage "cnt06",  465,337; } else {
		InInventory Counter, 5 { drawimage "cnt05",  465,337; } else {
		InInventory Counter, 4 { drawimage "cnt04",  465,337; } else {
		InInventory Counter, 3 { drawimage "cnt03",  465,337; } else {
		InInventory Counter, 2 { drawimage "cnt02",  465,337; } else {
		InInventory Counter, 1 { drawimage "cnt01",  465,337; } else {
								 drawimage "cnt00",  465,337;
		}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} // 52 braces
...52 braces. This is ridiculous. I will be glad when zscript has zbarinfo of it's own, if we're calling it that.
User avatar
ibm5155
Posts: 1268
Joined: Wed Jul 20, 2011 4:24 pm
Contact:

Re: ZScript and its impact on SBARINFO

Post by ibm5155 »

Just wondering, can I do this kind of animated hud with zscript?
https://youtu.be/kdvvYWudDXo?t=42m32s
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ZScript and its impact on SBARINFO

Post by Graf Zahl »

You can't do any kind of HUD with ZScript right now. Once the functionality is in place you can program anything you like and draw it.
User avatar
Major Cooke
Posts: 8170
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 »

Another question, will it be possible to also do alpha transparency much like ACS's hud message?
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: ZScript and its impact on SBARINFO

Post by Blue Shadow »

Running before we learn to walk, are we? :P
User avatar
NeuralStunner
 
 
Posts: 12325
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: ZScript and its impact on SBARINFO

Post by NeuralStunner »

Blue Shadow wrote:Running before we learn to walk, are we? :P
Hey MC, that's motto material there. :P
User avatar
Major Cooke
Posts: 8170
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 meant via sbarinfo itself. Not through the graphics.
User avatar
Major Cooke
Posts: 8170
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 »

Anyway, according to ZZYZX, This means once in, the road to doing the sbarinfo will be much more straight forward. I'll let him comment on that, though.
Post Reply

Return to “Developer Blog”