Find nearest existing sprite angle

Remember it never hurts to ask, but you might not get it.
User avatar
Marscaleb
Posts: 87
Joined: Sat Jun 25, 2016 12:57 pm
Location: California or Utah
Gender: None specified
Contact:

Find nearest existing sprite angle

Postby Marscaleb » Sun Jan 14, 2018 11:57 am

This is one I've thought of for a while. I'm just gonna post this here and then disappear into a puff of smoke for a few months again.

There are basically three options for how a sprite is viewed. It is either viewed the same from all angles, it has eight versions to be viewed from eight angles, or 16 versions for 16 angles.
And when you use one of the latter two, you absolutely have to have all those angles available. If you don't, when the game tries to render the missing angle, you just see a question mark.

I'd like to see an option where the engine will instead basically just grab the nearest angle that actually exists.

For example, instead of having the death animation be drawn solely for being seen from the front (and instead of drawing that sequence eight times for each angle) you could draw a second animation viewed from behind. And which of those two animations is displayed just depends on if the player is closer to the back or the front. (Or a more practical method would be to draw the animation from the rear 45 angle, or just the side, but the same principle applies.)
For a second example, maybe I want to draw animations for my character for the angle just between front and the front 45, just to make its movements look a little more natural from the front, which is where the player usually sees the character. But I don't want to double the amount of sprites needed to fill out the full 16 angles. And for projectiles this is especially true; I definitely want to be able to make my rockets and fireballs have that extra distinction for those few extra degrees near the front.

The whole point of this is that you can add some extra angles to your characters just where you want it without having to draw out every single possible angle. The engine will just display the frame from the closest angle that exists, whatever that may be.

The more I think of it, the more I think this shouldn't even be an option, it should just be the way the game always works.

CeeJay
Posts: 209
Joined: Sat Jan 26, 2013 9:56 am
Gender: None specified

Re: Find nearest existing sprite angle

Postby CeeJay » Sun Jan 14, 2018 9:03 pm

Sounds like a good idea to me, even if it wouldn't be used all that much. I've come across sprites from various FPS games that use limited angles in a similar fashion, such as front, side and back (three angles) and ones where only the front and back are used.

As long as it doesn't mess up the normal sprite handling, I'm all for it.

User avatar
Marscaleb
Posts: 87
Joined: Sat Jun 25, 2016 12:57 pm
Location: California or Utah
Gender: None specified
Contact:

Re: Find nearest existing sprite angle

Postby Marscaleb » Wed Feb 21, 2018 12:07 pm



Return to “Feature Suggestions”

Who is online

Users browsing this forum: No registered users and 4 guests