Images with transparent backgrounds in gamesalad

frankwashburnfrankwashburn Member Posts: 32
edited June 2012 in Working with GS (Mac)
Hey all -

This should be super simple, and I apologize in advance for my ignorance..

But whenever I create an image and add it to gamesalad, and change an actor's image to that image, the actor always treats the empty space around my drawing as whitespace - so if I were to then drag that actor into a black Gamesalad scene, the actor would show the image encased in a big ugly white block.

Is there a way to tell Gamesalad "treat white as transparent", or is this a problem with the image itself? How do I delete this whitespace surrounding my images?

Thanks all,
Frank

Answers

  • domeniusdomenius Member Posts: 108
    Gamesalad does not use masking like some other engines, it relies on PNG transparency to determine what parts of an image are visible and which are not. You should be able to do this either by creating an alpha channel for your image or by simply deleting your background and allowing the background to be transparent (usually shown with small alternating squares in image applications) You will have to do this in an image editing program.
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    If you save your images with those areas transparent it will work.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    You also should be cropping your images down to the smallest area needed for your actor. if you have a big transparent area around a ball image and tell the ball to bounce off the floor it will always bounce off the transparent part of the image making it look like it never hits the floor.
  • Bilzo12Bilzo12 Member Posts: 70
    Hey everyone @frankwashburn I had the exact same problem and what I done was create all my images with transparent backgrounds then export it, after that you will have the image with a massive transparent background it will give the effect @tendrmer said, open the image you exported (should be a png) in photoshop then click image, then click trim a box will pop up saying a bunch of stuff.

    It will say based on : press transparent pixels under that it will say trim away: make sure all of them are checked then press ok.

    After that save the image and your done

    Hope I helped bilal

    If you are still having troubles with the image, drop me a email I'll help you

    Bilal_el-sayed@hotmail.com


    Oh and don't forget if The image is round in gamesalad set collision to round, if it's a square set collision to square in gamesalad.
  • gamesaladnewbiegamesaladnewbie Member Posts: 3
    @tendrmer is there any way of getting the actor to ignore the transparent part of the image?
  • ArmellineArmelline Member, PRO Posts: 5,369
    If you mean you want the actor to not show any transparent parts, just save the image without it being transparent.

    If you mean to have an actor have a collision area that is identical to the image, then no. The collision area will always be the size of the image, in a rectangular or circular shape. The best you can do is ensure there are absolutely no unnecessary transparent pixels on any side.

    However, you can achieve a pseudo-shaped effect by having multiple actors, each representing one part of your image, and constraining them together appropriately (no easy task if the shape is at all complex) and then having the multiple collision points that provides. For example, you could have a person where one actor is his head, one for each of his legs, one for each of his arms and one for his torso. Keeping them all connected together would be no easy feat, though.
  • gamesaladnewbiegamesaladnewbie Member Posts: 3
    Thanks.
    it because I wanted my platform to be a tree vine which is obviously windy so at certain parts of the vine it looks like the actor is standing on nothing as I can't cut the transparent pixels any more because other parts of the vine are taller than others. I am just going to have to make my vine straighter.
    Thanks for your help
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    You could keep your vine image but not use it for the collision. Instead put invisible actors along the vine and use those for the collision detection/shape.
  • I had the same problem! i use photoshop! when you save your image you must check the box that says "save transparency". then import again the image in gamesalad.hope that works for you!

  • pHghostpHghost London, UKMember Posts: 2,342

    @georgevasileiadis1987@gmail.com said:
    hope that works for you!

    This thread is more than 2 years old. I hope he's figured it out by now. ;)

Sign In or Register to comment.