GZSHud - Gutawer's ZScript HUD

For high-res texture/sprite projects, sprite-fix patches, music add-ons, music randomizers, and other graphic/sound-only projects.
Forum rules
The Projects forums are ONLY for YOUR PROJECTS! If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.

GZSHud - Gutawer's ZScript HUD

Postby Gutawer » Sun Apr 30, 2017 12:46 pm

Gutawer's ZScript HUD - a minimalist status bar-inspired HUD

Note - GZSHud requires GZDoom 3.0.0 to work properly. Update GZDoom before complaining that something is broken.

Spoiler: Screenshots

GZSHud is written entirely in ZScript, meaning that it maintains a very large amount of mod compatibility compared to previous SBARINFO HUDs where compatibility patches are necessary - specifically, the ammo bar will display ammo from any mod you throw at it, as can be seen here:
Spoiler: Mod Compatibility Screenshots

(Note - I'm not claiming full mod compatibility here, certain mods will still cause oddities, but most simple weapon packs will work just fine.)

Download
https://www.dropbox.com/s/7dbdxiyyrjysa ... d.pk3?dl=0

Other stuff

GZSHud might look like a status bar, but it works as a fullscreen HUD, so please switch to that if you want to actually use the HUD.

Check the GZSHud Options menu item for customisation options, including background box alpha, ammo bar display, etc.

Feel free to use the code to learn about ZScript status bars (I urge you to give it a go, they're pretty cool), and feel free to use parts of the code in your own projects if you want (provided I get credited).
Critique, improvements, etc. are encouraged.

So, urr... that's about it. Enjoy!

Spoiler: Updates


Spoiler: Credits
Last edited by Gutawer on Sat Sep 09, 2017 7:03 pm, edited 5 times in total.
User avatar
Gutawer
User Accounts Assistant
 
Joined: 16 Apr 2016
Discord: Gutawer#3431

Re: GZSHud - Gutawer's ZScript HUD

Postby leodoom85 » Sun Apr 30, 2017 2:35 pm

Did a little showcase of the hud :)
User avatar
leodoom85
Dodge this.....
 
 
 
Joined: 15 Sep 2014
Location: Earth-shaking Chile
Discord: leodoom85#6202

Re: GZSHud - Gutawer's ZScript HUD

Postby jpalomo » Sun Apr 30, 2017 3:03 pm

Gutawer wrote:These aren't in any menu, because I don't want to clash with other mods' MENUDEF lumps. Change them through the console, if you want to.


You can use AddOptionMenu in MENUDEF. If you need an example of how to use it, see Xaser's DamNums mod.

I really like the simplistic look of this. I'll give it a try.
User avatar
jpalomo
 
Joined: 17 May 2010

Re: GZSHud - Gutawer's ZScript HUD

Postby Gutawer » Sun Apr 30, 2017 3:28 pm

Good point about the AddOptionMenu thing, I'll put that in the next update with the level stat stuff.
User avatar
Gutawer
User Accounts Assistant
 
Joined: 16 Apr 2016
Discord: Gutawer#3431

Re: GZSHud - Gutawer's ZScript HUD

Postby Gutawer » Sun Apr 30, 2017 4:43 pm

https://www.dropbox.com/s/7dbdxiyyrjysa ... d.pk3?dl=0
New version (link is the same as it was), added a menu item for the HUD's settings + level stat stuff.
User avatar
Gutawer
User Accounts Assistant
 
Joined: 16 Apr 2016
Discord: Gutawer#3431

Re: GZSHud - Gutawer's ZScript HUD

Postby argv » Sat Sep 09, 2017 2:32 pm

Looks cool, but murders my frame rate! FPS in a small room is down by 80% (from 100 to 20). “stat vm” (in the console) shows that it's spending a lot of time in the VM (around 20ms per frame with this mod, and 0.2ms without). Running GZDoom 3.1.0.

So, I went and optimized it. :D Now it has no noticeable performance impact. Here's the patch: https://gist.github.com/argv-minus-one/ ... 2634a0d53a

Please consider publishing your mod on a code hosting site like GitHub (https://github.com/). Then, others can observe the changes you make, and easily contribute (with pull requests).
argv
 
Joined: 30 Aug 2016

Re: GZSHud - Gutawer's ZScript HUD

Postby Gutawer » Sat Sep 09, 2017 6:50 pm

Good call! Looking back on my original code for that... I was probably tired when I wrote that part, it's fucking awful (also, I was much newer to ZScript and wasn't aware that array.find() functioned similarly to C++'s std::vector::find(), heh) :P. I'll merge this in in a short while (though I don't plan to move GZDHud to github, it's pretty much done as of now).

EDIT: Alright, updated. The DL link in the OP should contain the newest version. Thanks for that :D.
User avatar
Gutawer
User Accounts Assistant
 
Joined: 16 Apr 2016
Discord: Gutawer#3431

Re: GZSHud - Gutawer's ZScript HUD

Postby argv » Sun Sep 10, 2017 9:54 pm

Oh, I didn't notice the word “minimalist”, heh. Fair enough. Hopefully there'll be more feature-rich ZScript HUDs soon.
argv
 
Joined: 30 Aug 2016

Re: GZSHud - Gutawer's ZScript HUD

Postby TERMiNAL » Mon Sep 11, 2017 3:44 pm

This is an awesome HUD, works well with Project Brutality!

But any chance you could add mines/grenades to the hud for PB?
TERMiNAL
 
Joined: 31 Jul 2017
Discord: TERMiNAL

Re: GZSHud - Gutawer's ZScript HUD

Postby Gutawer » Mon Sep 11, 2017 4:10 pm

The code for the ammo bar & ammo display is all done automatically based on the ammo that weapons use - one goal of this mod is to showcase ZScript's ability to create mods which are inherently compatible with other mods (much moreso than previously possible using SBARINFO/DECORATE/ACS, anyway). As such, I feel that it would be going against my intent for this mod to write code specifically to support one of PB's features; many mods add hotkey grenades, and unfortunately there is no community-agreed on (or in-engine) standard for that feature, making it impossible for me to support PB's grenades without going against the point of this mod. Sorry about that.
User avatar
Gutawer
User Accounts Assistant
 
Joined: 16 Apr 2016
Discord: Gutawer#3431

Re: GZSHud - Gutawer's ZScript HUD

Postby Outtagum » Tue Sep 12, 2017 12:19 pm

I've only just come across this HUD. It's really pretty cool. I like the modern vibe mixed with the traditional layout and it seems to work with pretty much every Doom thing I throw at it!

I wonder, though, if you'd consider making a Heretic version or make this one Heretic compatible?

Regardless, this HUD is now on my Doom autoload list. Thank you. :)
User avatar
Outtagum
 
Joined: 16 Aug 2017

Re: GZSHud - Gutawer's ZScript HUD

Postby Gutawer » Sat Oct 07, 2017 12:42 pm

Sorry about taking so long to respond, but yeah I'll have a go at adding Heretic support, along with an update I've been planning to add a fullscreen mode with the boxes off in the corners.
User avatar
Gutawer
User Accounts Assistant
 
Joined: 16 Apr 2016
Discord: Gutawer#3431

Re: GZSHud - Gutawer's ZScript HUD

Postby Barry Burton » Mon Nov 18, 2019 7:09 am

Apologies for the bump but I thought I should mention that the HUD doesn't seem to function correctly for me in GZDoom 4.2.4. While the stat numbers are updated there is no health bar and the armour bar seems to stay yellow.

I wonder if there's any chance of an update? Being a nice mix of modern aesthetic and old school layout it looks really pretty. :)
User avatar
Barry Burton
 
Joined: 03 Sep 2019

Re: GZSHud - Gutawer's ZScript HUD

Postby Gutawer » Mon Nov 18, 2019 7:32 am

I've been aware of these issues for a while but didn't fix them due to not knowing if anyone actually used the HUD, heh. I'll take a look at fixing it now that someone's asked about it. Thanks!

EDIT: Fixed. Here's a new link: https://www.dropbox.com/s/7dbdxiyyrjysa ... d.pk3?dl=0

If anyone's curious on why this broke cross-versions, I was accidentally relying on undefined behaviour related to the lack of implicit defaulting for values declared in ZScript in the past. Now, ZScript does implicitly provide a default values for variables, so my code broke.
User avatar
Gutawer
User Accounts Assistant
 
Joined: 16 Apr 2016
Discord: Gutawer#3431

Re: GZSHud - Gutawer's ZScript HUD

Postby Barry Burton » Mon Nov 18, 2019 12:31 pm

Thanks so much for your quick reply and super quick fix. All's running well now. It looks particularly good with D4V. :)
User avatar
Barry Burton
 
Joined: 03 Sep 2019


Return to Graphic/Audio Patches

Who is online

Users browsing this forum: No registered users and 2 guests