Support for 4 angled sprites

These are not rejected - but are not considered highly important right now.

Moderator: GZDoom Developers

Post Reply
Sodaholic
Posts: 1959
Joined: Sat Nov 03, 2007 4:13 pm

Support for 4 angled sprites

Post by Sodaholic »

It doesn't seem like it would be too hard to do, and it would be somewhat useful. The problem is, it that with duplicating it to 8 or 16 angles, the actor looks like it's facing 45 or 22.5 degrees from what it actually is. The only work around I can think of is to have another actor spawn and fix it's displayed angle by offsetting it from what the main actor's is, and locking it onto it's position.
User avatar
phi108
Posts: 976
Joined: Sat Dec 01, 2007 6:28 pm

Re: Support for 4 angled sprites

Post by phi108 »

I agree this would be nice. Perhaps it could use the letters H I J K, after the end of the 16 angle names?
Sodaholic
Posts: 1959
Joined: Sat Nov 03, 2007 4:13 pm

Re: Support for 4 angled sprites

Post by Sodaholic »

Yeah, that sounds good.
Last edited by Sodaholic on Sat Dec 04, 2010 10:11 pm, edited 1 time in total.
User avatar
InsanityBringer
Posts: 3386
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: Support for 4 angled sprites

Post by InsanityBringer »

I don't really see why we would need to add additional letters for it. if a sprite provides 1,2,3,4 but not 5,6,7,8 then shouldn't it recognize that the sprite has only four rotations?
User avatar
NeuralStunner
 
 
Posts: 12325
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: Support for 4 angled sprites

Post by NeuralStunner »

InsanityBringer wrote:I don't really see why we would need to add additional letters for it. if a sprite provides 1,2,3,4 but not 5,6,7,8 then shouldn't it recognize that the sprite has only four rotations?
Pretty much what I thought.

Besides, I'd also like to hold out for a possible addition of 16 more angles in the future, in which case we'd need those letters. :P
Sodaholic
Posts: 1959
Joined: Sat Nov 03, 2007 4:13 pm

Re: Support for 4 angled sprites

Post by Sodaholic »

Also, could that work for any number of angles? Like 12 angle sprites, 7 angle sprites if you wanted.
User avatar
XutaWoo
Posts: 4005
Joined: Sat Dec 30, 2006 4:25 pm
Location: beautiful hills of those who are friends
Contact:

Re: Support for 4 angled sprites

Post by XutaWoo »

Honestly, keeping it at 16, 8, 4, maybe 2, and 1 seems more appropriate. 2 has very limited use, yes, but more than 3.
User avatar
ChronoSeth
Posts: 1631
Joined: Mon Jul 05, 2010 2:04 pm
Location: British Columbia

Re: Support for 4 angled sprites

Post by ChronoSeth »

I wouldn't think it would be hard to do any number as long as it's a power (maybe multiple, though I can see that being more complicated) of two.
User avatar
NeuralStunner
 
 
Posts: 12325
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: Support for 4 angled sprites

Post by NeuralStunner »

Yes, PO2 is best I think.
Gez
 
 
Posts: 17833
Joined: Fri Jul 06, 2007 3:22 pm

Re: Support for 4 angled sprites

Post by Gez »

InsanityBringer wrote:I don't really see why we would need to add additional letters for it. if a sprite provides 1,2,3,4 but not 5,6,7,8 then shouldn't it recognize that the sprite has only four rotations?
You mean 1, 3, 5, 7 but not 2, 4, 6, 8.

Anyway, you can use the TEXTURES lump to do the duplication and provide 16 rotations from 4 pictures, giving you more precision. See [wiki=Sprite#Angles]sprite angles[/wiki]: front rotation 1 -> 8, G, 1, 9, 2; 3 -> A, 3, B; 5 -> 4, C, 5, D, 6; 7 -> E, 7, F.
Sodaholic
Posts: 1959
Joined: Sat Nov 03, 2007 4:13 pm

Re: Support for 4 angled sprites

Post by Sodaholic »

Yes, Gez, but the problem is that there is inevitably some inaccuracy with that method.
User avatar
NeuralStunner
 
 
Posts: 12325
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: Support for 4 angled sprites

Post by NeuralStunner »

You're making something with only 4 directions, and you're worried about "accuracy"? :?
User avatar
Salad Viking
Posts: 752
Joined: Tue Apr 20, 2010 8:58 pm
Location: In high orbit

Re: Support for 4 angled sprites

Post by Salad Viking »

Gez wrote:Anyway, you can use the TEXTURES lump to do the duplication and provide 16 rotations from 4 pictures, giving you more precision. See [wiki=Sprite#Angles]sprite angles[/wiki]: front rotation 1 -> 8, G, 1, 9, 2; 3 -> A, 3, B; 5 -> 4, C, 5, D, 6; 7 -> E, 7, F.
Actually, Gez, that's not going to work. If it did, then this suggestion would be redundant!

Here is a graph which illustrates the problem:

Image

Red represents the frontal-view sprite, blue represents the right-side sprite, and so on. As you can see, using four sprites multiple times on an 8- or 16-sprite rotation causes the rotation to be "tilted," which will make the sprite look as if it's always facing at an angle. If you look at the far right-hand graph, though, you can see how this feature would alleviate the problem.
User avatar
phi108
Posts: 976
Joined: Sat Dec 01, 2007 6:28 pm

Re: Support for 4 angled sprites

Post by phi108 »

Actually, Gez suggested 5 angles for the front and back, and 3 for each side, like below. It's still not as accurate as 4 exact angles, but it isn't off-center.

Image
User avatar
Tormentor667
Posts: 13530
Joined: Wed Jul 16, 2003 3:52 am
Contact:

Re: Support for 4 angled sprites

Post by Tormentor667 »

Anyway, with this solution you will have to add redundant data to the mod where 4 sprites per frame would already be enough
Post Reply

Return to “On Hold Suggestions”