Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Sprite transparency.

Author
Message
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 22nd Aug 2011 19:27
Is there anyway to treat black as transparent in AppGameKit rather than using transparent png files? I have been using those fine in the main however I have a sprite animation which I want to include. It has a black background and I can't see any way to replace that with a transparency in a paint package ( the sprite has 42 frames and would be a nightmare to try to edit each one, especially as it fades to black also.)

Really, I could do with treating just that sprite (the rest are have transparencies) in the same way I used to use them in DB, by treating black as transparent. I actually generated the sprite using a program and so am stuck with black as the background for this and possibly a couple of others.

Other than that is there a real fast and easy way in a paint package to edit them manually? I have tried colour replace, but it looks horrible(offshades of black remain where there shouldn't be etc) and will take a fair bit of work .

Any ideas would be great!

http://s6.bitefight.org/c.php?uid=103081
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 22nd Aug 2011 19:29
You can use the LoadImage command to convert black pixels into transparent ones. It has an additional parameter.
XanthorXIII
AGK Gold Backer
12
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 22nd Aug 2011 19:31
Try Gimp http://www.gimp.org It's like Photoshop but free.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 22nd Aug 2011 19:52 Edited at: 22nd Aug 2011 20:11
Ah thank you Paul I will give that a try.

XanthorXIII, I have Gimp, although I find it awkward compared to psp. I have been using psp since version 4. I'm no expert on either though lol.

Edit - tried it and it is better but I obviously have the just off black parts that spoil it. looks like to get it 100% it needs editing in a paint package Still it will do for now.

Another sprite question. How does the offset work in this I have tried several of the commands and found them very confusing. Most times the offset seems to do nothing, I have tried setspritepositionbyoffset and just spriteoffset etc. I do find all these similar commands a little confusing to remember.

http://s6.bitefight.org/c.php?uid=103081
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 22nd Aug 2011 21:28
The offset point is the point around which a sprite will rotate, by default it is in the center of the sprite. Using an offset of 0,0 would make the sprite rotate around its top left corner and if your sprite was 50x40 using and offset of 50,40 would make it rotate around its bottom right corner.

SetSpritePositionByOffset() positions the sprite using this offset, so by default it would place the center of the sprite at the given coordinates.

SetSpritePosition() always positions the sprite using its top left corner regardless of the current offset.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 22nd Aug 2011 21:54
Ah I see, the default is in the center? I have been offsetting my sprites by the half the sprite height and depth, and then positioning them using the offset. That would explain why it seems all over the place. Still too used to DB's way of working. Thanks for the info!

http://s6.bitefight.org/c.php?uid=103081
Zubby1970
AGK Backer
15
Years of Service
User Offline
Joined: 22nd May 2008
Playing: AGK Studio Always
Posted: 22nd Aug 2011 22:33
if you e-mail me the image's ill edit them i use photoshop, and i am a pro in it.

There can only be one
Zubby1970
AGK Backer
15
Years of Service
User Offline
Joined: 22nd May 2008
Playing: AGK Studio Always
Posted: 22nd Aug 2011 22:34
sorry support@image-design.co.uk

There can only be one
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 23rd Aug 2011 00:20
Really? That would be great! I'll zip em up and send em.

http://s6.bitefight.org/c.php?uid=103081

Login to post a reply

Server time is: 2024-04-18 22:32:29
Your offset time is: 2024-04-18 22:32:29