sprites

0 favourites
  • 7 posts
From the Asset Store
Pixel Sprites ala ReactorCore - Builder Hardware - Large pack of sprites!
  • Hallo my fellow scirra fans

    I have a question?

    When i insert my sprites i always have a white background how do i get rid of this? <img src="smileys/smiley19.gif" border="0" align="middle" />

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • This is probably related to the file type of your image. .jpeg images, for instance, don't save out with the alpha channel intact. You need this to preserve a clear background image. If you want to have an image with a clear background, you have to change the file type to a format such as .png, which will preserve the alpha channel (transparency). So remove the white background in your image editor of choice (ex. photoshop), then save the image as a .png (this will allow you to import the image with no white background). I hope this helps, if you run into any other problems, let me know.

  • Sry jk can you please tell me from step 1 how to prevent the background from not appearing in my construct when i add an image.

    I have tried what u suggested but i am still struggling with the issue

  • -In an image editor remove the (white) background and save the image as .png

    It should be as easy as that.

  • (Moderators will likely want to move this to the "How do I" section.)

    For the purposes of this explanation I will use the free software Gimp as my image editor (since it's, well, free). If you don't already have Gimp, you can pick it up at gimp.org

    1. Open the image in Gimp. In the layers panel on the right, right click on your image layer and select the "add alpha channel" option near the bottom of the list.

    <img src="https://dl.dropboxusercontent.com/u/98084707/Help1.jpg" border="0" />

    2. Either by using the "Eraser" tool by hand, or by using the "Select by Color" Tool, remove the white background of the image, which should reveal a dark grey "checkerboard" pattern behind your image (the graphical representation of transparent pixels). (I would recommend using a brush with a hardness of 100 if you are using the Eraser tool. Change the hardness of the brush in the Tool Options panel on the left)

    <img src="https://dl.dropboxusercontent.com/u/98084707/Help2.jpg" border="0" />

    3. Once the background is removed, select the "Export" option under "File", change the filetype to a .png, then save it to your desired location. Now when you open the Sprite in Construct 2 and place it in your work area, you will notice the white background is gone. If there are still small areas of white, this is due to not doing a perfect job during the clean up process in Gimp, simply re-open it in gimp, be more precise with the removal of the background, then repeat the process of exporting as a .png file.

    <img src="https://dl.dropboxusercontent.com/u/98084707/Help3.jpg" border="0" />

    <img src="https://dl.dropboxusercontent.com/u/98084707/Help4.jpg" border="0" />

    -Notes-

    Make sure you save your files to places where you know how to find them again.

    Make sure that if you use the Select by Color Tool and there happens to be parts of your image that are the same color as the background you are trying to remove, that you don't accidentally remove those parts too. It might be necessary to use the Eraser tool only at that point, or lower the tolerance/threshold of the Select by Color Tool.

    It might be necessary to resize the image in Gimp before exporting now that the background is gone to maximize the performance of the image in your game. If the white background added another 40 pixels on all sides of the image, even if you remove the white the size of the image will remain the same, even with transparent pixels. So crop the image closer to your actual content then export it. This will reduce file size and help performance. Also be sure to use "power of 2" sizes when at all possible. (64x64, 128x128)

  • this is in the wrong erea this should be in how do I

  • Yeah I pointed that out before my explanation. Stef1756 must not have noticed the other section available.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)