Transparent Sprites

Non-platform specific questions.

Transparent Sprites

Postby foleyjo » Sun Sep 25, 2011 7:39 am

How do I stop Game-Editor from making my sprites transparent.
I have some images made in paint-shop. They are saved as png files with no transparency.
However when I put them into GE it seems to remove the most common colour. For my game to work can't have any colour removal.
KISS -Keep It Simple Stoopid
foleyjo
 
Posts: 275
Joined: Mon Jul 09, 2007 1:15 pm
Score: 15 Give a positive score

Re: Transparent Sprites

Postby skydereign » Sun Sep 25, 2011 8:12 am

gE doesn't use the most common color. Since your images don't have an alpha channel, it takes the top left pixel and turns it transparent. To prevent this you can add one, or change the top left pixel to a color that isn't in your image (so only one pixel is removed).
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Transparent Sprites

Postby foleyjo » Sun Sep 25, 2011 8:13 am

:D Thank You
KISS -Keep It Simple Stoopid
foleyjo
 
Posts: 275
Joined: Mon Jul 09, 2007 1:15 pm
Score: 15 Give a positive score

Re: Transparent Sprites

Postby Jagmaster » Sun Sep 25, 2011 5:19 pm

Or, if you're working with pngs, simply add an alpha channel. :)
User avatar
Jagmaster
 
Posts: 875
Joined: Sun May 08, 2011 4:14 pm
Location: Not where you think.
Score: 82 Give a positive score

Re: Transparent Sprites

Postby skydereign » Sun Sep 25, 2011 6:53 pm

Or, if you're working with pngs, simply add an alpha channel. :)

If it wasn't clear... that is one of the two solutions.
skydereign wrote:gE doesn't use the most common color. Since your images don't have an alpha channel, it takes the top left pixel and turns it transparent. To prevent this you can add one, or change the top left pixel to a color that isn't in your image (so only one pixel is removed).
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Transparent Sprites

Postby Jagmaster » Sun Sep 25, 2011 7:45 pm

Boy, I wasn't thinking this morning was I? :oops:
User avatar
Jagmaster
 
Posts: 875
Joined: Sun May 08, 2011 4:14 pm
Location: Not where you think.
Score: 82 Give a positive score

Re: Transparent Sprites

Postby Kalladdolf » Fri Oct 14, 2011 12:14 pm

Sorry for the bump, but I'm having the exact opposite problem:
I want GE to remove the top left pixel (and the colors respectively), but it doesn't.
The image was saved with MS Paint (as .png) and as far as I know there's no alpha channel.
Size: 640x480 (tileset).
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: Transparent Sprites

Postby lcl » Fri Oct 14, 2011 1:13 pm

Kalladdolf wrote:Sorry for the bump, but I'm having the exact opposite problem:
I want GE to remove the top left pixel (and the colors respectively), but it doesn't.
The image was saved with MS Paint (as .png) and as far as I know there's no alpha channel.
Size: 640x480 (tileset).

You are using windows 7, aren't you?
I've had that same problem.
It's problem with win7 paint, you need to save it as bmp.
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Transparent Sprites

Postby Kalladdolf » Fri Oct 14, 2011 1:32 pm

Nope, vista. And it works with other pngs as well.
Same alpha color, same everything. Just not the measurements and frame counts.
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: Transparent Sprites

Postby Game A Gogo » Fri Oct 14, 2011 3:51 pm

I'm ready to bet that it saved it as 32-bit. Send me the PNG and I will check. If it is I can send you a 24-bit one
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: Transparent Sprites

Postby skydereign » Fri Oct 14, 2011 9:16 pm

Yeah, this happened to NightOfHorror as well. I ended up running through all his animations with gimp and removing the alpha channels for him.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Transparent Sprites

Postby Kalladdolf » Sat Oct 15, 2011 8:03 am

Thanks, it works now. Removing alpha channels certainly did the trick. Now I gotta worry about palettes and bit-by-bit file size reduction :3
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest