Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
Dude27th

How can I make a Hud ??

Question

Seriously , how ? I already read a SBARINFO tutorial on zdoom , and I did everything step by step, but;
- Only worked in GZDoom 1.9 , in other versions just appeared empty .
- It only works "properly" in 640x480 ("Properly" because even that I followed everything step by step(yes I double checked that!) it was supossed to look overlaped at this point , but it didn't happen , it just appeared badly centered instead of being aligned to the left , and yes it had the flag (Maybe I need some resizing to resolution flag or something?))

 

And there was another ACS one but it was like :
- This is how to draw a number.
- This is how to draw a word.
- This is a clusterfu** of a code that you can try to read to see if you can somehow get something from it.
- By the way there's a lot of different resolutions that can ruin your hud positioning.
- Good Luck!


... So there is any simpler tutorial which properly mentions or at least even get to mention what to do to align properly the drawn images in hud in any resolution??




... By the way, why are so many different ways to do this ?

Share this post


Link to post

5 answers to this question

Recommended Posts

  • 1

I played around with status bars some time ago, so here's w hat I gathered. The proper way to do a HUD in recent GZDoom versions is through ZScript, which is radically different from the old approach: https://zdoom.org/wiki/ZScript_status_bars

 

The documentation is quite lacking at the moment, so you'll just have to play around a bit with it. The existing status bars are in gzdoom.pk3, in the folder zscript/statusbar. You can use those as a base. You'll have to name the class something different, so instead of

 

class DoomStatusBar : BaseStatusBar

 

use something like

 

class MyStatusBar : BaseStatusBar

 

You then have to put your modified file in a pk3, I recomment putting it in its own zscript folder, for example zscript/my_sbar.txt (but that's not mandatory AFAIK). You'll also have to add a file called zscript.txt in the root folder, where you tell GZDoom to process your ZScript file, like that:


 

version "3.3"
#include "zscript/my_sbar.txt"

Lastly you have to tell GZDoom to actually use your status bar, which is done through mapinfo. So create a file called mapinfo.txt in the root folder of your pk3 and put in something like this:

 

GameInfo
{
    StatusBarClass = "MyStatusBar"
}

 

Share this post


Link to post
  • 0
10 hours ago, boris said:

I played around with status bars some time ago, so here's w hat I gathered. The proper way to do a HUD in recent GZDoom versions is through ZScript, which is radically different from the old approach: https://zdoom.org/wiki/ZScript_status_bars

 

The documentation is quite lacking at the moment, so you'll just have to play around a bit with it. The existing status bars are in gzdoom.pk3, in the folder zscript/statusbar. You can use those as a base. You'll have to name the class something different, so instead of

 


class DoomStatusBar : BaseStatusBar

 

use something like

 


class MyStatusBar : BaseStatusBar

 

You then have to put your modified file in a pk3, I recomment putting it in its own zscript folder, for example zscript/my_sbar.txt (but that's not mandatory AFAIK). You'll also have to add a file called zscript.txt in the root folder, where you tell GZDoom to process your ZScript file, like that:


 


version "3.3"
#include "zscript/my_sbar.txt"

Lastly you have to tell GZDoom to actually use your status bar, which is done through mapinfo. So create a file called mapinfo.txt in the root folder of your pk3 and put in something like this:

 


GameInfo
{
    StatusBarClass = "MyStatusBar"
}

 

I'm aiming to older versions of GZDoom actually :/ like 1.9 to 2.4 , so ZScript if not an option .
 

Share this post


Link to post
  • 0
1 hour ago, dmg_64 said:

You can start with one of the default SBARINFOs as base and modify them as you learn stuff, change what you need to change and see what you can come up with, or when you feel confident of your ability to make a new one from scratch you can do so.

 

https://zdoom.org/wiki/Default_status_bars

Well , this could help , and by breaking stuff I could learn what to do and what don't , thanks !

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×