Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - MFB

Pages: [1]
1
General / Re: Flipping sprites with set scale vs flipping images
« on: May 22, 2017, 02:54:26 pm »
Thanks a lot! That was exactly what I was asking.

2
I'm currently writing a very simple platformer(if there is such a thing) and I have to make a decision; some of my sprite sheets are symmetrical thus the sprites need to be mirrored when the player is facing the other direction. Currently I haven't implemented mirroring in my animation so I do something like this for all sprite sheets
if(CurrentState == Idle)
{
if(CurrentDirection == left)
    animation->Row = 0;
if(CurrentDirection == right)
    animation->Row = 1;
}
 
Would it be slower if I did this instead, would the space I save on sprite sheets be worth it?
if(CurrentState == Idle)
{
animation->Row = 0;
if(CurrentDirection == left)
    animation->Sprite.SetScale(1,1);
if(CurrentDirection == right)
    animation->Sprite.SetScale(-1,1);
}
 
Note: My sprite sheets consist of rows and columns of 250x250 images, usually about 25 mb's in size.

Pages: [1]