Sprite rotations, their absence, and stuff

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: Sprite rotations, their absence, and stuff

Re: Sprite rotations, their absence, and stuff

by Project Shadowcat » Wed May 16, 2012 4:39 pm

Unless you're trying to hit a specific direction, no.

Re: Sprite rotations, their absence, and stuff

by Lioyd_Irving » Wed May 16, 2012 12:10 pm

I do mean a third sort of mirroring, by [wiki=A_SetScale]scaling[/wiki] a sprite to a negative value. It alone would be infinitely simpler than to take twice the number of namespaces.

Still, for the matter of conserving namespaces, stuff like SPRIL0R0 had gone completely over my head. (Shows what I know.) Wouldn't that require an angle check at the beginning of every move, though?

Re: Sprite rotations, their absence, and stuff

by Gez » Wed May 16, 2012 6:35 am

There's already two ways to mirror sprites... Unless you want to mirror them vertically? I'm not sure what else than mirroring you could mean by "negative scaling".

Suppose your left-facing state is FITE L, and the right-facing state is FITE R... You can name your sprite FITEL0R0 and it'll be mirrored automatically.

Note that you can pretty much use the sprite names for the state, so you're not limited to batches of 29. You are instead limited to batches of 1874161 (A-Z, 0-9, _ : 37 characters, 37^4 combinations).

Re: Sprite rotations, their absence, and stuff

by Lioyd_Irving » Wed May 16, 2012 6:13 am

There's nothing to apologize for. I knew what I was getting myself into.

While I'm at it, though, might as well spare a topic: Is negative scaling a feasible thing to implement?

(I'm alright with a one-word reply.)

Re: Sprite rotations, their absence, and stuff

by Graf Zahl » Wed May 16, 2012 6:05 am

Well, I'm sorry, but that's bound to happen if you want to make things with the engine it was never designed for.

Re: Sprite rotations, their absence, and stuff

by Lioyd_Irving » Wed May 16, 2012 5:49 am

It's a solution to the sprite limit, but not to the general flimsiness and inconvenience. Working with batches of 29 sprites means having to stick angle checks in places where they don't belong (ie more things begging to go wrong), and does nothing for the unholy torture of the offset.
Spoiler: Oh and the punchline?

Re: Sprite rotations, their absence, and stuff

by Project Shadowcat » Wed May 16, 2012 12:41 am

Is Gez's solution not good enough? You don't have to bloat the WAD/PK3 with more sprite entries, just define them in TEXTURES with a horizontal mirror.

Re: Sprite rotations, their absence, and stuff

by Lioyd_Irving » Tue May 15, 2012 9:46 pm

I suppose an even simpler solution for my problem (and that of everybody who's ever tried to make something 2D...) would be to allow for negative scaling, but that's probably for another topic.

Re: Sprite rotations, their absence, and stuff

by Gez » Tue May 15, 2012 5:55 am

I'd go with 0 rotations and different "right-facing" and "left-facing" states.

Also, the limit to 29 frames by sprites isn't a problem because you can do this:

Code: Select all

States
{
Spawn:
    ABCD E 5
    FGHI J 5
    KLMN O 5
    PQRS T 5
    UVWX Y 5
    Loop
}

Re: Sprite rotations, their absence, and stuff

by Lioyd_Irving » Tue May 15, 2012 4:38 am

I see. About this point, though:
Graf Zahl wrote:For example, if 4-angle rotations were added how would the engine know if it has to deal with an incomplete 8-angle sprite, a fully defined 4-angle sprite or even an incomplete 16-angle sprite?
Would it be possible, assuming the crash is dropped entirely, for the relevant actors to tell the engine through a property? Failing that, could ZDoom try and determine what to display based on which rotations it finds?

Re: Sprite rotations, their absence, and stuff

by Nash » Tue May 15, 2012 4:29 am

I've made a post about this somewhere early this year... I'll try my best to avoid the evil J word, but is it not possible to get ZDoom to "quantize" the missing angles?

Re: Sprite rotations, their absence, and stuff

by Graf Zahl » Tue May 15, 2012 3:42 am

Displaying nothing won't work.

For example, if 4-angle rotations were added how would the engine know if it has to deal with an incomplete 8-angle sprite, a fully defined 4-angle sprite or even an incomplete 16-angle sprite?

And seeing the project you need this for, my advice would be to use unrotated sprites and mirroring for the second fighter. Ok, you'd need another actor for that but you don't need sprite duplicates if you name them 'figha0b0' or similarly.

As it is the suggestion simply won't work.

Sprite rotations, their absence, and stuff

by Lioyd_Irving » Tue May 15, 2012 3:29 am

It's always been bugging me a bit, but rarely has anything bugged me as much as it has for the last few days.
Spoiler: Short story long
Does it really have to be that way? Are missing rotations really that big of a deal? Whatever rotations ZDoom doesn't find, what's to stop it from simply displaying nothing -- like it does with missing sprites -- instead of flat-out refusing to run at all? Is it something with the Doom code?
Spoiler:

Top