GM:S 1.4 [Solved] Texture pages and cropping

Discussion in 'Programming' started by beanflip, Jun 4, 2019.

  1. beanflip

    beanflip Member

    Joined:
    Aug 1, 2016
    Posts:
    8
    I'm using strips for all of my player animations. To make them more efficient I've been re-positioning some of images in the frame (in Photoshop) in order to make the entire strip smaller. I created a simple script that moves the the image_index back into the correct position based on which frame of the animation it's on.

    Code:
    xman=xman_legs(-7,-6,-5,-3,-2,1,0,0);
    I didn't realize that the transparent space is automatically cropped off of the texture page. Is this true for each and every image_index? There are quite a few of these for the character animations. Should I change them all back to their original size and remove the script? Or should I just not worry about it?
     
  2. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    4,261
    GM will strip blank space from any images when it runs sprites through it's packing algorithm to make the texture pages as tight and compact as possible.

    You can turn off this cropping in the settings (Texture Groups I think but don't quote me on it!) but in general unless you have a specific reason to do so just let GM do it's thing and don't worry about manually removing empty space yourself, just manage your Texture Groups if needed to minimise texture swaps.
     
    beanflip likes this.
  3. beanflip

    beanflip Member

    Joined:
    Aug 1, 2016
    Posts:
    8
    I feel stupid for doing all that. Maybe I'll change them back a couple at a time so I don't stress over it. Also for anyone looking into this feature, be careful not to leave any "trash" on your images. That area won't count as empty space.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice