higher-res sprite help

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
vAethor
Posts: 93
Joined: Wed May 10, 2017 4:10 pm

higher-res sprite help

Post by vAethor »

I'm testing out the first frame of a custom soldier sprite I made, eventually gonna use this for a basic custom enemy soldier class replacing the Zombieman.

The sprite is 155 x 222 pixels, and can be seen here:

Image
I need to work at this HD-ish res because I absolutely suck at animating pixel art, but can draw quite well and animate somewhat competently at higher resolutions.

for now I'm making just a stupid little test to see what he'd look like in game, and so I can see if I need to change his colors, contrast, shading, etc. in the document so he stands out better. I started a test WAD that replaces all non-exploded barrels with the soldier sprite just so I can see the sprites in action in a wide variety of areas.

My DECORATE code looks like this:

Code: Select all

actor DROSbar : ExplosiveBarrel replaces ExplosiveBarrel
{
	States
	{
		Spawn:
		DROS A -1
		Stop
	}
}
And I have DROSA0 in between HI_START and HI_END markers.

But when I run GZDoom to test it out, I see this:
Image

Any help would be appreciated, since I just want to see my new soldier in the game before I go further into animating him.
User avatar
Exosphere
Posts: 168
Joined: Sun Jun 11, 2017 11:42 am
Location: New England, US

Re: higher-res sprite help

Post by Exosphere »

One thing you forgot is to add the sprite height and radius. The article below should be helpful.

https://zdoom.org/wiki/Classes:ExplosiveBarrel
vAethor
Posts: 93
Joined: Wed May 10, 2017 4:10 pm

Re: higher-res sprite help

Post by vAethor »

Code: Select all

actor Drosbar : ExplosiveBarrel replaces ExplosiveBarrel
{
	Radius 20
	Height 222
	States
	{
		Spawn:
		DROS A -1
		Stop
	}
}
I still get the missing sprite marker instead.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: higher-res sprite help

Post by wildweasel »

Is the sprite in the correct place in your project file? In WAD archives, DROSA0 needs to be located in between two marker lumps called S_START and S_END. In PK3/ZIP archives, it must be in a folder called Sprites.
User avatar
Exosphere
Posts: 168
Joined: Sun Jun 11, 2017 11:42 am
Location: New England, US

Re: higher-res sprite help

Post by Exosphere »

In addition to wildweasel's input, try setting the sprite to be one of the prop sprites, like the lamps, pillars, or trees; just something static.
vAethor
Posts: 93
Joined: Wed May 10, 2017 4:10 pm

Re: higher-res sprite help

Post by vAethor »

I just put DROSA0 (still within HI_START and HI_END...do you know if I still need these after I did this?) within S_START and S_END (I'm just using WAD since this is just a silly test, PK3's for actual projects for me,) and it's fixed, but I need to change the sprite scaling.

But until I do, the current results are sodding hilarious:
Image
"Attack on DROS Trooper"
Exosphere wrote:In addition to wildweasel's input, try setting the sprite to be one of the prop sprites, like the lamps, pillars, or trees; just something static.
Yeah I could do that, just the thought of my soldier being an exploding barrel was funny to me at the time.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: higher-res sprite help

Post by wildweasel »

If you're wanting your sprite to be a bit more Doomguy-proportioned, remember the basic Doom Marine sprites are only around 56 pixels tall, and you can adjust the Scale property of your actor to suit. In this case, I'd suppose that putting Scale 0.33 in the actor's properties (before the States block) would make them a bit more reasonable.
vAethor
Posts: 93
Joined: Wed May 10, 2017 4:10 pm

Re: higher-res sprite help

Post by vAethor »

wildweasel wrote:If you're wanting your sprite to be a bit more Doomguy-proportioned, remember the basic Doom Marine sprites are only around 56 pixels tall, and you can adjust the Scale property of your actor to suit. In this case, I'd suppose that putting Scale 0.33 in the actor's properties (before the States block) would make them a bit more reasonable.
I actually already found a scale that works last night, which is either 0.23 or .24. I just tried 0.33 for the hell of it and it made him too big, so .23 it is.

Results:

Image
This is at .24, which I decided this morning is just a little too big (he needs to be right about at Doomguy's eye level since these are just human-sized soldiers,) so I switched it to .235 which is just about perfect.
Still's gonna take some getting used to though since my art style appears to be a lot more realistic-looking than Doom's in-game art style, now that I put him in the game and see him next to Zombiemen. But he's going to be in a basic replacement WAD anyways where I can code these soldiers to be either basic enemies, or friendly NPCs who help you fight the regular vanilla enemies.

But I also noticed something a little silly. With scale set to 0.235 I notice the barrel explosion animation is tiny! That's totally fine though, since I know exactly why it's happening and it doesn't need to be fixed for this particular example.

However, I did run into another problem that doesn't affect gameplay, but does make me feel wonky. I notice when I shoot at the soldier, at least when coded as a barrel-replacement class the point where the bullets hit is way up above the sprite, like this:

Image

I am not sure if this is due to the height property or the fact that it is still reading the hitbox as if the sprite was at full scale, but I need to fix it, because I can't have the player's bullets and projectiles hitting above the sprites most of my custom enemies will be at this resolution scaled down to the height of a normal enemy.

Side note: I found he's pretty hard to see when further away at the vanilla resolution I usually play at (320 x 200,) but becomes much easier to see at higher resolutions. I still like the blocky aliasing when in software mode so I found 512 x 384 is the best middle ground for me. I still may fiddle around with the colors I used so he is just as visible as a vanilla Doom enemy.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: higher-res sprite help

Post by wildweasel »

You may need to adjust his Height property. Remember this doesn't necessarily have to equal the sprite's dimensions; the player is 56 units tall, but so is the Revenant, even though his sprites are 96 pixels tall (which is why his head clips through ceilings in the GL renderer).
vAethor
Posts: 93
Joined: Wed May 10, 2017 4:10 pm

Re: higher-res sprite help

Post by vAethor »

Oh yikes...I totally forgot I had set the soldier's height to 222, the same as the original sprite height. I changed it to 56 (same as the Zombieman) and now it works just fine.

I feel stupid, lol.
Locked

Return to “Editing (Archive)”