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.

Moderator: Developers

Re: ZScript and its impact on SBARINFO

Postby Major Cooke » Fri Jan 20, 2017 10:53 am

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?
User avatar
Major Cooke
"Shit happens, but I'd love it if it didn't." -AEoD Team
 
Joined: 28 Jan 2007

Re: ZScript and its impact on SBARINFO

Postby Blzut3 » Fri Jan 20, 2017 5:10 pm

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.
Blzut3
Pronounced: B-l-zut
 
Joined: 24 Nov 2004

Re: ZScript and its impact on SBARINFO

Postby Graf Zahl » Fri Jan 20, 2017 5:28 pm

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
 
Joined: 19 Jul 2003
Location: Germany

Re: ZScript and its impact on SBARINFO

Postby Graf Zahl » Sun Jan 22, 2017 7:43 am

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

Re: ZScript and its impact on SBARINFO

Postby SanyaWaffles » Wed Jan 25, 2017 9:35 am

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
SanyaWaffles
Ice Bear Charges Extra
 
Joined: 25 Apr 2013
Location: Eastern Ohio

Re: ZScript and its impact on SBARINFO

Postby Graf Zahl » Wed Jan 25, 2017 9:43 am

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

Re: ZScript and its impact on SBARINFO

Postby Major Cooke » Wed Jan 25, 2017 11:18 am

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
"Shit happens, but I'd love it if it didn't." -AEoD Team
 
Joined: 28 Jan 2007

Re: ZScript and its impact on SBARINFO

Postby Major Cooke » Thu Jan 26, 2017 1:10 pm

So I opened up D4D's sbarinfo for like the third time ever and was looking around for a few variables...

Code: Select allExpand view
// 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
Major Cooke
"Shit happens, but I'd love it if it didn't." -AEoD Team
 
Joined: 28 Jan 2007

Re: ZScript and its impact on SBARINFO

Postby ibm5155 » Thu Jan 26, 2017 7:16 pm

Just wondering, can I do this kind of animated hud with zscript?
https://youtu.be/kdvvYWudDXo?t=42m32s
User avatar
ibm5155
 
Joined: 20 Jul 2011

Re: ZScript and its impact on SBARINFO

Postby Graf Zahl » Sat Jan 28, 2017 3:28 am

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

Re: ZScript and its impact on SBARINFO

Postby Major Cooke » Sun Jan 29, 2017 6:28 pm

Another question, will it be possible to also do alpha transparency much like ACS's hud message?
User avatar
Major Cooke
"Shit happens, but I'd love it if it didn't." -AEoD Team
 
Joined: 28 Jan 2007

Re: ZScript and its impact on SBARINFO

Postby Blue Shadow » Sun Jan 29, 2017 8:16 pm

Running before we learn to walk, are we? :P
User avatar
Blue Shadow
 
Joined: 14 Nov 2010

Re: ZScript and its impact on SBARINFO

Postby NeuralStunner » Sun Jan 29, 2017 9:38 pm

Blue Shadow wrote:Running before we learn to walk, are we? :P
Hey MC, that's motto material there. :P
User avatar
NeuralStunner
Lateral Cranial Impact Enhancer
 
Joined: 21 Jul 2009
Location: traveling around inside a hug

Re: ZScript and its impact on SBARINFO

Postby Major Cooke » Sun Jan 29, 2017 10:05 pm

I meant via sbarinfo itself. Not through the graphics.
User avatar
Major Cooke
"Shit happens, but I'd love it if it didn't." -AEoD Team
 
Joined: 28 Jan 2007

Re: ZScript and its impact on SBARINFO

Postby Major Cooke » Mon Jan 30, 2017 8:30 pm

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.
User avatar
Major Cooke
"Shit happens, but I'd love it if it didn't." -AEoD Team
 
Joined: 28 Jan 2007

Previous

Return to Developer Blog

Who is online

Users browsing this forum: No registered users and 1 guest