Unit sprite orientations?

Make art for user-made content.

Moderator: Forum Moderators

Forum rules
Before posting critique in this forum, you must read the following thread:
Post Reply
kurt751
Posts: 232
Joined: June 4th, 2016, 11:17 pm

Unit sprite orientations?

Post by kurt751 »

I'm not sure how this is handled. Okay, you need north and south facing variants, that's clear, but does the engine mirror to get left and right facing versions, or do I have to make me the whole NW,NE,SW,SE lot?

And if the engine is intelligent enough to mirror units, how do I tell it the orientation of the original unit?
I've looked how existing core ones do, but it's not very consistent...
User avatar
vultraz
Developer
Posts: 960
Joined: February 7th, 2011, 12:51 pm
Location: Dodging Daleks

Re: Unit sprite orientations?

Post by vultraz »

You only really need to draw a SE and NE version of a sprite. The engine flips those for NW and NW, respectively. As for orientation, that's handled by the facing= property in a unit's WML.
Creator of Shadows of Deception (for 1.12) and co-creator of the Era of Chaos (for 1.12/1.13).
SurvivalXtreme rocks!!!
What happens when you get scared half to death...twice?
kurt751
Posts: 232
Joined: June 4th, 2016, 11:17 pm

Re: Unit sprite orientations?

Post by kurt751 »

Thank you.

And what about profiles/portraits? I read that they should be 300x300 pixels big, but is there a standard orientation (looking left/right)? Most seem to be looking to the left, but it looks strange having a portrait on the left looking to the left: It's looking outside the screen. On the other hand, in the in-game encyclopedia the unit image is on the right side, and looking left makes sense.
User avatar
vultraz
Developer
Posts: 960
Joined: February 7th, 2011, 12:51 pm
Location: Dodging Daleks

Re: Unit sprite orientations?

Post by vultraz »

Most portraits are around 450x450 and face to the right. However, it doesn't really matter what the exact facing is as they can be positioned on either side and flipped to face a direction that fits.
Creator of Shadows of Deception (for 1.12) and co-creator of the Era of Chaos (for 1.12/1.13).
SurvivalXtreme rocks!!!
What happens when you get scared half to death...twice?
kurt751
Posts: 232
Joined: June 4th, 2016, 11:17 pm

Re: Unit sprite orientations?

Post by kurt751 »

I see. Thanks.
User avatar
vultraz
Developer
Posts: 960
Joined: February 7th, 2011, 12:51 pm
Location: Dodging Daleks

Re: Unit sprite orientations?

Post by vultraz »

Sorry, made I typo. Portraits are usually 450x450 not 450x50.
Creator of Shadows of Deception (for 1.12) and co-creator of the Era of Chaos (for 1.12/1.13).
SurvivalXtreme rocks!!!
What happens when you get scared half to death...twice?
kurt751
Posts: 232
Joined: June 4th, 2016, 11:17 pm

Re: Unit sprite orientations?

Post by kurt751 »

Yes, I had already guessed it (having seen pictures are square)... :mrgreen:
Post Reply