Prime Target Doom TC - HUD Help

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Triaxis
Posts: 2
Joined: Sat Mar 16, 2024 2:28 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia (Modern GZDoom)

Prime Target Doom TC - HUD Help

Post by Triaxis »

Hello all! I'm currently in the process of remaking my older Prime Target DOOM TC from the ground up, and I'm needing help with something regarding the screen scaling.

In Prime Target, the HUD is 640x160, and the gameplay above it is scaled at 640x320. I'm wondering if it's possible to replicate that. I've attached a couple of images, one being a mockup that shows the result I want, and the other being what it looks like now.

Any help or input would be appreciated, thanks!



Jarewill
 
 
Posts: 1853
Joined: Sun Jul 21, 2019 8:54 am

Re: Prime Target Doom TC - HUD Help

Post by Jarewill »

That depends on how you made your HUD.
If you are using ZScript, you can use SetSize to make the HUD be 640x480 with 160 of the height being used by the bar and then force its scale:

Code: Select all

Class MyStatusBar : BaseStatusBar{
	Override void Init(){
		Super.Init();
		SetSize(160,640,480); //640x480 HUD with 160 units of height reserved for the bar
		//Rest of the init
	}
	Override void Draw(int state, double TicFrac){
		Super.Draw(state,TicFrac);
		BeginStatusBar(true); //Force the scale of the statusbar
		DrawImage("STBAR",(0,320),DI_ITEM_OFFSETS); //Draw your bar
		//Rest of the draw
	}
}
And if you are using SBARINFO, you can do the same by, well, doing the same:

Code: Select all

Resolution 640,480; //640x480 HUD
Height 160; //160 bar height

StatusBar Normal,forcescaled{ //Force the scale
	DrawImage "STBAR",0,320; //Draw the bar
	//Rest of the status bar
}
You will also have to adjust your weapons' offsets as well to make them appear higher up.
User avatar
Triaxis
Posts: 2
Joined: Sat Mar 16, 2024 2:28 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia (Modern GZDoom)

Re: Prime Target Doom TC - HUD Help

Post by Triaxis »

Is there a way I could achieve the result I'm after without modifying the offsets and scaling of the weapons? Or rather a way to downscale the game to 640x320 while the HUD takes up the remaining 160 vertical pixels? The scaling and offsets of the weapon sprites I'd pinned down from a recorded reference with the HUD turned off. The TEXTURES lump came in handy. I might make a minimal HUD in the case that this is unachievable.
Jarewill
 
 
Posts: 1853
Joined: Sun Jul 21, 2019 8:54 am

Re: Prime Target Doom TC - HUD Help

Post by Jarewill »

I am not aware of any method to do that, apologies.
While specifying the height of the status bar will scale down the game window, the offsets aren't modified by the same amount.
They are still modified to fit the new window, but not fully and I am not aware of a method to change it without changing the offsets themselves.
Post Reply

Return to “Scripting”