Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: AgsUser007 on Fri 15/08/2008 12:58:50

Title: Custom character sprites not working correctly
Post by: AgsUser007 on Fri 15/08/2008 12:58:50
I downloaded several files of characters and these characters are tiled so that you can use the import tiled sprites and drag and click to import all of them at once.  I can import the sprites fine.

My problem is that the background the characters are on is green.  When I test my game, you can clearly see a pink background tile surrounding the character.  The default character, Roger, is drawn on black.  So I changed the green color to black.  Now whatever color i've changed it to is still around the character.

How can I fix this?  Is it a, in game pallette issue?
Title: Re: Custom character sprites not working correctly
Post by: olafmoriarty on Fri 15/08/2008 13:25:55
When importing, do you use "set upper left pixel to transparent" or whatever it's called?
Title: Re: Custom character sprites not working correctly
Post by: AgsUser007 on Sat 16/08/2008 06:47:18
Quote from: olafmoriarty on Fri 15/08/2008 13:25:55
When importing, do you use "set upper left pixel to transparent" or whatever it's called?

Yes, I leave all of the pre-clicked options alone, but yes I do have it set to "top left pixel set to transparent" when I imported the sprites. 

Also with my character, he appears twice on the screen.  There is a double above the other one and they both look exactly the same.
Title: Re: Custom character sprites not working correctly
Post by: Matti on Sat 16/08/2008 12:31:08
Could you upload a screenshot, that might help understanding the problem. It really sounds odd.
Title: Re: Custom character sprites not working correctly
Post by: AgsUser007 on Tue 26/08/2008 19:18:41
Well its weird even how the character is working.  The default Roger character was made at 18 x 40 pixels, made for 320 x 200.  My game is set to 640 x 480 and Roger fits my room pretty well, but my other character was done at 15 x 50 pixels and is waaay to small for the room.  How can I make my character larger?

I'd post a screenshot but i dont have a place to upload my pictures to.  I did figure out why my character was showing up on the screen twice.  I also figured out that if the character is on a pink background, everything will show up fine in game.

My main problem right now, is trying to make my character as large as the default Roger character when in game.
Title: Re: Custom character sprites not working correctly
Post by: Khris on Tue 26/08/2008 19:58:12
Roger probably gets displayed at twice his size, while your character is displayed "correctly", using the same pixel size as your background.
The way to solve your problem isn't scaling up your character, it's redrawing him to fit a 640x480 screen.

If you want to post a screenshot, make sure to convert it to PNG, then upload it e.g. @ imageshack.us
Title: Re: Custom character sprites not working correctly
Post by: AgsUser007 on Thu 28/08/2008 06:37:48
How do I take screen shots when running a game in AGS, and do i need to be signed up with this imageshack?
Title: Re: Custom character sprites not working correctly
Post by: Ultra Magnus on Thu 28/08/2008 06:58:35
Quote from: KhrisMUC on Tue 26/08/2008 19:58:12
The way to solve your problem isn't scaling up your character, it's redrawing him to fit a 640x480 screen.

But then you'd have to redraw Roger as well, otherwise they'd look odd by comparison.
To get your character just to match Roger, up-scaling is what you're looking for.

Open the sprites section in the editor and select your character.
On the lower-half of the right-hand of the screen, change the resolution drop-down menu to say that your character was drawn at 320x240, and the game will automatically make it twice the size to fit a 640x480 game as it did with Roger.

But Kris is right.
You ultimately want to design your sprites at the same resolution as your game will be running.
It'll just look better.

To take a screenshot, just press F12 when the game's running.
And no, imageshack.us (http://imageshack.us) doesn't require you to sign up.
Title: Re: Custom character sprites not working correctly
Post by: AgsUser007 on Fri 29/08/2008 09:41:08
i'm using the v2.72 version of AGS.  I went into the sprites editor but didnt see anything on the lower half of the right hand screen to change the resolution.
Title: Re: Custom character sprites not working correctly
Post by: Ultra Magnus on Fri 29/08/2008 09:50:55
I never used 2.72 myself, so I can't help you there.
Other than telling you to upgrade. ;)

Either that, or just redraw both Roger and your character at 2x the size and re-import them.
Title: Re: Custom character sprites not working correctly
Post by: SoulFyre on Fri 29/08/2008 21:46:42
I have a problem also with custom sprites. I have a character loaded, with a walk cycle, and it's scaled in paint shop pro to fit a 640x480 bg but when I test the game he is massive, taking up about 1/3 of the screen. Any ideas?

Cheers
Title: Re: Custom character sprites not working correctly
Post by: Dualnames on Sat 30/08/2008 20:27:31
Quote from: AgsUser007 on Thu 28/08/2008 06:37:48
How do I take screen shots when running a game in AGS, and do i need to be signed up with this imageshack?

Go register an account at photobucket.com it's better to my opinion. Concerning screenshots put this in the on_keypress section of the global script of your game

if (keycode==32) {
SaveScreenShot("screen.bmp");
}

and start the game. Pressing space will take a screenshot.
If you want to take more than one do this

int snumber=0;
String shotname="screen";
if (keycode==32) {
String tor=tor.Format("%d",snumber);
shotname=shotname.Append(tor);
shotname=shotname.Append(".bmp");
SaveScreenShot(screen);
snumber++;
}
Title: Re: Custom character sprites not working correctly
Post by: Khris on Mon 01/09/2008 19:44:13
SaveScreenShot(String.Format("screen%03d.bmp", snumber));
Title: Re: Custom character sprites not working correctly
Post by: AgsUser007 on Mon 01/09/2008 22:12:49
Ok folks, I FINALLY figured out what was going on today.  I have a friend working on some artwork for me, and today he came over to do some.  The pixel sizes I was using was 15x15 because the key object that automatically comes with AGS is drawn on an 11x4.  However when I was importing the sprites my friend made, they were coming out ALOT smaller than normal.  And I finally seen that they were imported as 320x200, well, I was importing my sprites as 640x400 which was making them ALOT smaller than what they should have been.  SO, once I figured that out, I also realized I had imported my character like that too, and now he is as large as Roger.

My main problem is still this.  Whoever drew the character, drew him on a green background.  My game is set up for hi-color.  But even when in the game, you still see the green.  When I imported him, you still saw green.  Now if I make it a black or pink background instead of green which would make the background color not show, then any black outlines, such as shadows, around him disappear.  I've even tried changing his black outline colors to grey and it still doesnt work.