Page 1 of 1

Support for 4 angled sprites

Posted: Sat Dec 04, 2010 7:50 pm
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.

Re: Support for 4 angled sprites

Posted: Sat Dec 04, 2010 8:00 pm
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?

Re: Support for 4 angled sprites

Posted: Sat Dec 04, 2010 8:23 pm
by Sodaholic
Yeah, that sounds good.

Re: Support for 4 angled sprites

Posted: Sat Dec 04, 2010 8:25 pm
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?

Re: Support for 4 angled sprites

Posted: Sat Dec 04, 2010 8:27 pm
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

Re: Support for 4 angled sprites

Posted: Sat Dec 04, 2010 10:11 pm
by Sodaholic
Also, could that work for any number of angles? Like 12 angle sprites, 7 angle sprites if you wanted.

Re: Support for 4 angled sprites

Posted: Sat Dec 04, 2010 10:53 pm
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.

Re: Support for 4 angled sprites

Posted: Sat Dec 04, 2010 10:56 pm
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.

Re: Support for 4 angled sprites

Posted: Sat Dec 04, 2010 11:04 pm
by NeuralStunner
Yes, PO2 is best I think.

Re: Support for 4 angled sprites

Posted: Sat Dec 04, 2010 11:14 pm
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.

Re: Support for 4 angled sprites

Posted: Sun Dec 05, 2010 5:05 pm
by Sodaholic
Yes, Gez, but the problem is that there is inevitably some inaccuracy with that method.

Re: Support for 4 angled sprites

Posted: Sun Dec 05, 2010 5:32 pm
by NeuralStunner
You're making something with only 4 directions, and you're worried about "accuracy"? :?

Re: Support for 4 angled sprites

Posted: Sun Dec 05, 2010 8:05 pm
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.

Re: Support for 4 angled sprites

Posted: Sun Dec 05, 2010 8:16 pm
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

Re: Support for 4 angled sprites

Posted: Wed Dec 08, 2010 5:33 am
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