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

Discuss all aspects of editing for ZDoom.
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.

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

Postby Nash » Thu Mar 22, 2012 8:43 am

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
Nash
http://twitter.com/ISurvivorGame
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia

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

Postby Blox » Thu Mar 22, 2012 11:43 am

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
Blox
I am Laziness Incarnate!
 
Joined: 22 Sep 2010

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

Postby NeuralStunner » Thu Mar 22, 2012 1:32 pm

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
NeuralStunner
O'Neill with it.
 
Joined: 21 Jul 2009
Location: The Colonies

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

Postby Nash » Thu Mar 22, 2012 1:55 pm

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
Nash
http://twitter.com/ISurvivorGame
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia

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

Postby NeuralStunner » Thu Mar 22, 2012 1:58 pm

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
NeuralStunner
O'Neill with it.
 
Joined: 21 Jul 2009
Location: The Colonies

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

Postby Nash » Thu Mar 22, 2012 2:23 pm

Ahh I see. Thanks for clarifying the bobbing pattern.
User avatar
Nash
http://twitter.com/ISurvivorGame
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia

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

Postby Gez » Thu Mar 22, 2012 4:28 pm

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.
Gez
 
Joined: 06 Jul 2007

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

Postby NeuralStunner » Thu Mar 22, 2012 10:13 pm

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
User avatar
NeuralStunner
O'Neill with it.
 
Joined: 21 Jul 2009
Location: The Colonies

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

Postby Gez » Fri Mar 23, 2012 4:38 am

Relevant to thread:

Code: Select allExpand view
// 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?
Gez
 
Joined: 06 Jul 2007

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

Postby Blzut3 » Fri Mar 23, 2012 6:58 am

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.
Blzut3
Pronounced: B-l-zut
 
Joined: 24 Nov 2004

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

Postby Nash » Fri Mar 23, 2012 11:34 am

I think it was 16 pixels for 5:4, last I remember when I tried to account for it when drawing my fullscreen graphics...
User avatar
Nash
http://twitter.com/ISurvivorGame
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia


Return to Editing

Who is online

Users browsing this forum: Blox, Google Feedfetcher, jpalomo, Yahoo [Bot] and 6 guests