How Do I SBARINFO? - A Tutorial
Moderators: GZDoom Developers, Raze Developers
Forum rules
Please don't start threads here asking for help. This forum is not for requesting guides, only for posting them. If you need help, the Editing forum is for you.
Please don't start threads here asking for help. This forum is not for requesting guides, only for posting them. If you need help, the Editing forum is for you.
- Silentdarkness12
- Posts: 1555
- Joined: Thu Aug 15, 2013 5:34 pm
- Location: Plains of Pride
Re: How Do I SBARINFO? - A Tutorial
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?
- 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: How Do I SBARINFO? - A Tutorial
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.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?
- Silentdarkness12
- Posts: 1555
- Joined: Thu Aug 15, 2013 5:34 pm
- Location: Plains of Pride
Re: How Do I SBARINFO? - A Tutorial
3. I must still be missing something here.
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?
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;
}
}
- 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: How Do I SBARINFO? - A Tutorial
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.
- Silentdarkness12
- Posts: 1555
- Joined: Thu Aug 15, 2013 5:34 pm
- Location: Plains of Pride
Re: How Do I SBARINFO? - A Tutorial
They are indeed, so I have to trim them.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.
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
- 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: How Do I SBARINFO? - A Tutorial
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...
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.
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.
- Silentdarkness12
- Posts: 1555
- Joined: Thu Aug 15, 2013 5:34 pm
- Location: Plains of Pride
Re: How Do I SBARINFO? - A Tutorial
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?
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
I stretched HUD only if you write:
Code: Select all
Status Bar FullScreen, Forcescaled
- Silentdarkness12
- Posts: 1555
- Joined: Thu Aug 15, 2013 5:34 pm
- Location: Plains of Pride
Re: How Do I SBARINFO? - A Tutorial
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?
I turned off ForceScaled, and I think it might be fixed. Might. Not sure.
Someone want to confirm this for me?
- Silentdarkness12
- Posts: 1555
- Joined: Thu Aug 15, 2013 5:34 pm
- Location: Plains of Pride
Re: How Do I SBARINFO? - A Tutorial
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?
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?
-
- Posts: 4949
- Joined: Sun Nov 14, 2010 12:59 am
Re: How Do I SBARINFO? - A Tutorial
It'll work if the player has 8 or more ShotgunTube items in the inventory.
- Silentdarkness12
- Posts: 1555
- Joined: Thu Aug 15, 2013 5:34 pm
- Location: Plains of Pride
Re: How Do I SBARINFO? - A Tutorial
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.
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.
- 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: How Do I SBARINFO? - A Tutorial
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.
- Silentdarkness12
- Posts: 1555
- Joined: Thu Aug 15, 2013 5:34 pm
- Location: Plains of Pride
Re: How Do I SBARINFO? - A Tutorial
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.
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
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:
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.
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;
}