How many extra pixels to the bottom/sides of HUD sprites?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

How many extra pixels to the bottom/sides of HUD sprites?

Post by Nash »

Here's a question to modders who are used to making weapon mods. How many pixels would you "spare" that extend to the bottom to make sure it's bobbing friendly, and also to the side, so that it is widescreen friendly?
User avatar
Blox
Posts: 3728
Joined: Wed Sep 22, 2010 9:35 am
Location: Apathetic Limbo

Re: How many extra pixels to the bottom/sides of HUD sprites

Post by Blox »

I'd say about 32 pixels extra height wouldn't hurt, since we aren't really striving for 5 MB-max nowadays.

As for width, that's a tough one. But if we're talking about weapons that fit in 320x240, then I'd say around 120 pixels. (Probably way, way too much.)
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: How many extra pixels to the bottom/sides of HUD sprites

Post by NeuralStunner »

For bobbing it doesn't matter. It never passes above the baseline. However, add some extra image below if you'd like some room to play with offsets a bit.

If the sprite meets the top of the screen, make sure it's got a few pizels above.

To be widescreen friendly, give each side an extra 16 pixels for the screen space, and another 16 to account for bobbing.

384x200 is the minimum space. Expand in total to about 400x240 for lots of room to throw the image around in.

Once you're lined up to the center point in the screen preview, in whatever wad editor you use, make sure to bump it upward by another 32 pixels. (The bottom of the screen in a full screen mode will be at the "Status bar" line. Yes it's stupid, but blame Id.)
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: How many extra pixels to the bottom/sides of HUD sprites

Post by Nash »

Actually, bobbing does matter because I need to know how far down to render the hands. For the top, this is easy, just render all the way up.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: How many extra pixels to the bottom/sides of HUD sprites

Post by NeuralStunner »

I've encountered some problems from scaling inaccuracy at the top, so the sprite needs to extend a ways above to prevent gaps.

Classic bobbing only goes down, left and right, so your graphic won't be moving any higher unless you offset it.
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: How many extra pixels to the bottom/sides of HUD sprites

Post by Nash »

Ahh I see. Thanks for clarifying the bobbing pattern.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: How many extra pixels to the bottom/sides of HUD sprites

Post by Gez »

In the super shitty shooters I ripped from flash games, I've noticed that the angled weapons tend to get cut by bobbing motion. The moral of the story is that centered weapons rule.

Anyway, you should include quite a bit since you have to account for both widescreen and bobbing.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: How many extra pixels to the bottom/sides of HUD sprites

Post by NeuralStunner »

Hey Gez, since you're here, I'd love to have an alternate version of Slade 3's "HUD" view that takes the 32 Y adjustment into account. :P
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: How many extra pixels to the bottom/sides of HUD sprites

Post by Gez »

Relevant to thread:

Code: Select all

// 16 pixels of bob
#define MAXBOB			0x100000
This constant is used as a cap to player weapon bobbing.

Relevant to last post: what do you mean by that exactly?
Blzut3
 
 
Posts: 3212
Joined: Wed Nov 24, 2004 12:59 pm
Operating System Version (Optional): Kubuntu
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: How many extra pixels to the bottom/sides of HUD sprites

Post by Blzut3 »

NeuralStunner wrote:If the sprite meets the top of the screen, make sure it's got a few pizels above.
Don't forget that the 5:4 ratio (tallscreen) has additional space at the top of the screen. About 14 pixels IIRC, but I could just be pulling that number out of thin air.
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: How many extra pixels to the bottom/sides of HUD sprites

Post by Nash »

I think it was 16 pixels for 5:4, last I remember when I tried to account for it when drawing my fullscreen graphics...
Locked

Return to “Editing (Archive)”