Page 2 of 4

Re: How Do I SBARINFO? - A Tutorial

Posted: Thu Jun 23, 2016 5:20 pm
by Silentdarkness12
2. So, then the scaling of the HUD centers around the Resolution parameter in SBARINFO? What would be an optimal setting for the Resolution parameter?

Re: How Do I SBARINFO? - A Tutorial

Posted: Thu Jun 23, 2016 5:41 pm
by wildweasel
Silentdarkness12 wrote:2. So, then the scaling of the HUD centers around the Resolution parameter in SBARINFO? What would be an optimal setting for the Resolution parameter?
Personally, I leave that alone, because all my graphics are designed for the original resolution to begin with. If anything needs to be sharper, like weapon icons, I'll scale those using Textures. If you're wanting a lot more information on screen, you might try it at 640*400, or using smaller fonts. I try to avoid writing labels in anything bigger than the default Smallfont.

Re: How Do I SBARINFO? - A Tutorial

Posted: Fri Jun 24, 2016 11:00 am
by Silentdarkness12
3. I must still be missing something here.

Code: Select all

Height 0;
Resolution 640,400;
CompleteBorder True;
Statusbar Fullscreen, FullscreenOffsets, Forcescaled
{
ininventory not wipedout
{
DrawImage "DHUDBOX1",0,0,none,150,150;
DrawImage "DHUDBOX2",200,0,none,100,100;
DrawImage "DHUDBOX2",300,0,none,100,100;
DrawImage "DHUDBOX1",570,0,none,150,150;
DrawImage "DHUDBOX2",400,0,none,100,100;
}
}
I've got a FullscreenOffsets Forcescaled 640x400 hud, but it still seems that it gets cut off on different resolutions other than the one I used to check the positioning. Am I doing something wrong here?

Re: How Do I SBARINFO? - A Tutorial

Posted: Fri Jun 24, 2016 11:17 am
by wildweasel
I don't have your graphics on hand to test at the moment, but do you mean to define the max height/width attributes? Those aren't strictly necessary unless your graphics are larger than those maximums and you intend to trim them.

Re: How Do I SBARINFO? - A Tutorial

Posted: Fri Jun 24, 2016 11:38 am
by Silentdarkness12
wildweasel wrote:I don't have your graphics on hand to test at the moment, but do you mean to define the max height/width attributes? Those aren't strictly necessary unless your graphics are larger than those maximums and you intend to trim them.
They are indeed, so I have to trim them.

4. What is it that is the determining factor in how a hud scales to resolution? How it stretches across the screen to fit? I've wracked my brain over this many many times and haven't been able to figure it out worth a singular damn. I am aware that aspect ratio also plays some part in it, but fixing it for one aspect ratio comes first : P

Here is what I have so far.

Dark Hud V4.1 testing version

Re: How Do I SBARINFO? - A Tutorial

Posted: Fri Jun 24, 2016 12:33 pm
by wildweasel
Augh, I'm about ready to declare that Mediafire is no good anymore. I got your file, but I also got directed to an obvious phishing page that pretended to be a BSOD error and wouldn't quit spamming me with Javascript messages. Anyway...
Image
Where I'm puzzled, though, is why forcescaled (and in fact the user settings) are being completely ignored. My laptop runs gzdoom at 1366x768, so the screenshot shows exactly what this would look like if it were NOT scaled, but even with the Resolution command commented out, forcescaled enabled, AND ST_Scale set to True in the in-game settings, it still just stays anchored to the corner.

I don't get it. This might be one of those "olde dark magicks" kind of things.

Re: How Do I SBARINFO? - A Tutorial

Posted: Fri Jun 24, 2016 1:18 pm
by Silentdarkness12
I'm not going to be comfortable putting any more work into this thing until I can address this scaling issue.

Here is what it looks like for me at 1440x900: http://imgur.com/ZTWQnyY

Is this a bug, or something?

Re: How Do I SBARINFO? - A Tutorial

Posted: Tue Jul 26, 2016 1:16 pm
by Alekv
I stretched HUD only if you write:

Code: Select all

Status Bar FullScreen, Forcescaled

Re: How Do I SBARINFO? - A Tutorial

Posted: Tue Jul 26, 2016 3:25 pm
by Silentdarkness12
You know what's weird?

I turned off ForceScaled, and I think it might be fixed. Might. Not sure.

Someone want to confirm this for me?

Re: How Do I SBARINFO? - A Tutorial

Posted: Thu Sep 01, 2016 2:01 pm
by Silentdarkness12
Having a minor confusion here on SBARINFO.

Doing more work on the Hideous Destructor addon.

InInventory ShotgunTube,8
{
DrawImage "SHLHC0",325,78,center,10,10;
}

This doesn't seem to be working. If it take the DrawImage line and put it outside of the InInventory set, it works just fine. However, it doesn't work right here, for some reason.

Why?

Re: How Do I SBARINFO? - A Tutorial

Posted: Thu Sep 01, 2016 2:55 pm
by Blue Shadow
It'll work if the player has 8 or more ShotgunTube items in the inventory.

Re: How Do I SBARINFO? - A Tutorial

Posted: Thu Sep 01, 2016 3:39 pm
by Silentdarkness12
Yep. And the maximum of ShotgunTube IS 8.

I've used the same inventory item check earlier on in SBARINFO and it works just fine.....but not here....

http://pastebin.com/3BMkdqUz

EDIT: Okay, i'm stupid. It's 7, not 8. Nevermind.

Re: How Do I SBARINFO? - A Tutorial

Posted: Fri Sep 02, 2016 5:15 pm
by wildweasel
I was about to say, I can't look through this. It really could use some cleaning up, because nearly 3000 lines of SBARINFO - and not even for a gigantic in game information system like DRLA's - seems like insane overkill. There must be a cleaner and more readable way to do a lot of this, no offense intended.

Re: How Do I SBARINFO? - A Tutorial

Posted: Fri Sep 02, 2016 8:04 pm
by Silentdarkness12
None taken. I can understand it.

Well, if you know such a way, i'm listening. It could just be that what i'm making is really quite complicated and not simple to do at all in SBARINFO.

Although I did realize that there was no need to have many lines just for closing brackets.

Honestly, it's not *that* hard to decipher. It's cut up into sections, one section for each weapon.

Re: How Do I SBARINFO? - A Tutorial

Posted: Sat Sep 03, 2016 6:50 am
by arookas
You could try to simplify it by not using else/if for the ammo sprite bars and drawing only one sprite per ininventory, like this:

Code: Select all

InInventory HDSecondPistolLoaded, 15 {
  DrawImage "BULLD0",321,88,none,8,8;
}
InInventory HDSecondPistolLoaded, 14 {
  DrawImage "BULLD0",324,88,none,8,8;
}
InInventory HDSecondPistolLoaded, 13 {
  DrawImage "BULLD0",327,88,none,8,8;
}
InInventory HDSecondPistolLoaded, 12 {
  DrawImage "BULLD0",330,88,none,8,8;
}
InInventory HDSecondPistolLoaded, 11 {
  DrawImage "BULLD0",333,88,none,8,8;
}
InInventory HDSecondPistolLoaded, 10 {
  DrawImage "BULLD0",336,88,none,8,8;
}
InInventory HDSecondPistolLoaded, 9 {
  DrawImage "BULLD0",339,88,none,8,8;
}
InInventory HDSecondPistolLoaded, 8 {
  DrawImage "BULLD0",342,88,none,8,8;
}
InInventory HDSecondPistolLoaded, 7 {
  DrawImage "BULLD0",345,88,none,8,8;
}
InInventory HDSecondPistolLoaded, 6 {
  DrawImage "BULLD0",348,88,none,8,8;
}
InInventory HDSecondPistolLoaded, 5 {
  DrawImage "BULLD0",328,95,none,8,8;
}
InInventory HDSecondPistolLoaded, 4 {
  DrawImage "BULLD0",331,95,none,8,8;
}
InInventory HDSecondPistolLoaded, 3 {
  DrawImage "BULLD0",334,95,none,8,8;
}
InInventory HDSecondPistolLoaded, 2 {
  DrawImage "BULLD0",337,95,none,8,8;
}
InInventory HDSecondPistolLoaded, 1 {
  DrawImage "BULLD0",340,95,none,8,8;
}
You could also utilize weapon primary/secondary ammo icons, as well as weapon icons so that you only draw icons for the weapons/ammo in one place. You could then set the offsets of specific icons in their respective graphic files if you need to have the positions differ.