Support for 4 angled sprites

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Support for 4 angled sprites

Re: Support for 4 angled sprites

by Tormentor667 » Wed Dec 08, 2010 5:33 am

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

Re: Support for 4 angled sprites

by phi108 » Sun Dec 05, 2010 8:16 pm

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

by Salad Viking » Sun Dec 05, 2010 8:05 pm

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

by NeuralStunner » Sun Dec 05, 2010 5:32 pm

You're making something with only 4 directions, and you're worried about "accuracy"? :?

Re: Support for 4 angled sprites

by Sodaholic » Sun Dec 05, 2010 5:05 pm

Yes, Gez, but the problem is that there is inevitably some inaccuracy with that method.

Re: Support for 4 angled sprites

by Gez » Sat Dec 04, 2010 11:14 pm

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

by NeuralStunner » Sat Dec 04, 2010 11:04 pm

Yes, PO2 is best I think.

Re: Support for 4 angled sprites

by ChronoSeth » Sat Dec 04, 2010 10:56 pm

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

by XutaWoo » Sat Dec 04, 2010 10:53 pm

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

by Sodaholic » Sat Dec 04, 2010 10:11 pm

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

by NeuralStunner » Sat Dec 04, 2010 8:27 pm

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

by InsanityBringer » Sat Dec 04, 2010 8:25 pm

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

by Sodaholic » Sat Dec 04, 2010 8:23 pm

Yeah, that sounds good.

Re: Support for 4 angled sprites

by phi108 » Sat Dec 04, 2010 8:00 pm

I agree this would be nice. Perhaps it could use the letters H I J K, after the end of the 16 angle names?

Support for 4 angled sprites

by Sodaholic » Sat Dec 04, 2010 7:50 pm

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.

Top