Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Kain_V on Thu 12/02/2009 16:12:01

Title: [Solved] Having trouble with border on sprite images. [Goal Changed]
Post by: Kain_V on Thu 12/02/2009 16:12:01
Hi everyone, I am new to AGS forum and I was wondering if someone can help me with a problem I have.

I'm trying to make an adventure game in Gabriel Knight 2 style, so here's the thing:
I took a picture of a person to make an annimation, edited on photoshop to clear the background environment and
tried to import it on sprite section on AGS. I have tried everything but my image keeps coming up with a white
border... I tried to edit it (with default image editor) and then got a pink border...

I searched the manual and the forums but didn't find anything that could help me.
I set the game up to run in 1024 resolution, think this might be the problem?

Please if anyone can help me, I would really appreciate it.
Hope i didn't bore you, and thank you in advance!    :D
Title: Re: Having trouble with border on sprite images.
Post by: Gilbert on Thu 12/02/2009 16:15:52
This is the common edge aliasing problem. Try to change your game to 32-bit (if you haven't done so) and save your image as PNG with alpha-channel and re-import them.
Title: Re: Having trouble with border on sprite images.
Post by: Kain_V on Thu 12/02/2009 16:23:43
Hi, thank you for the quick reply!

My game is already set to 32-bit, and I have already tried to save the image in PNG format.
The thing is that the "Alpha chanels" check box is greyed out...
Don't know what i'm doing wrong... :(
Title: Re: Having trouble with border on sprite images.
Post by: Matti on Thu 12/02/2009 17:02:14
What program are you using? Sometimes you have to create an object to set an alpha-channel and sometimes you just have to select a transperancy color..

Also, make sure the image you're saving is set to 32-bit (and not only the game).
Title: Re: Having trouble with border on sprite images.
Post by: Jakerpot on Thu 12/02/2009 20:57:56
aren`t the transparency option in AGS import sprite window selected as no transparency? Change it to botom right or whatever you want.
Title: Re: Having trouble with border on sprite images.
Post by: Kain_V on Thu 12/02/2009 21:45:07
I am using Photoshop CS (begginer, i don't know to use it very well).
So I open the original image with photoshop and cut the character from it, then I save it on bmp format or PNG. (at PNG format the alpha chanels are greyed out)
As for the AGS, when i import the newly created image as sprite I still have a tiny white border around my character...

At AGS the transparency is set to top left.
Title: Re: Having trouble with border on sprite images.
Post by: beomoud on Thu 12/02/2009 23:25:59
Try to edit the photos in your graphic program to make sure that the space around the character is all one color. It probably just picks one pixel as transparent. You said it turns it to pink? Maybe it is already transparent, that's how it looks in ags, have you tried testing it in the game? playtest it and see... 
Title: Re: Having trouble with border on sprite images.
Post by: Trent R on Thu 12/02/2009 23:56:49
Try using the 'Export Transparent Image...' option underneath Photoshop's Help pulldown.

Also, I'd be willing to look at it if you upload your file.


~Trent
Title: Re: Having trouble with border on sprite images.
Post by: Kain_V on Fri 13/02/2009 17:00:01
Trent R you're the best!
I didn't know about the 'Export Transparent Image...' option, and after i used it my image still has a very tiny with border around it, but i thing that's how it should be.
My main problem is solved!
Thank you Trent and everyone for your time, help and quick responces!
Long Live AGS  ;D
Title: Re: [Solved] Having trouble with border on sprite images. [Goal Changed]
Post by: Kain_V on Fri 13/02/2009 22:15:58
Ok now I can import the sprites without any problem.
But I have an other question...
After importing the sprites, is there any way to change the width and height from within the AGS?
From the Script section maybe?
Anyone can help?
Title: Re: [Solved] Having trouble with border on sprite images. [Goal Changed]
Post by: Jakerpot on Sat 14/02/2009 03:55:27
what exactly you want to do? Animate it? Change it height by script`s? It will distort it if it`s possible. But, why you want to do that?  ???
Title: Re: [Solved] Having trouble with border on sprite images. [Goal Changed]
Post by: Kain_V on Sat 14/02/2009 11:24:06
I want to annimate the character, but it seems the sprites I import for lets say the Left Walk annimation, the character doesn't have the same Width and Height. (ex. sprite 2 is bigger from sprite 1)
So I was wondering of there's a way to adjust Width and Height from within the AGS instead than adjusting them from the default image editor...
Title: Re: [Solved] Having trouble with border on sprite images. [Goal Changed]
Post by: Khris on Sat 14/02/2009 14:26:30
Could you post the relevant sprites? It seems odd that they'd be of different sizes.
Did you create them yourself?
Title: Re: [Solved] Having trouble with border on sprite images. [Goal Changed]
Post by: Kain_V on Sun 15/02/2009 00:20:02
I can't find out how to paste an image file to the post... (stupid me)
So I'll try to explain it. I took two pics of a person with my digital camera. Edit them on photoshop, but when i was done with them, the first image had dimensions: 267x449 and the second one had 133x423.
So my question is this: can we edit these dimensions with AGS, or do I have to re-create them more carefully from photoshop?