Help with loading sprites

Started by , Wed 20/12/2006 03:03:05

Previous topic - Next topic

Guybrush379

When I import sprites in png format in manager folder there's a message for the alpha channel; I click yes but png is with a background! And moreover png files that I have created in photoshop are with the same dimentions but in AGS they aren't?

Help

Gilbert

What colour depth is your game in?
Alpha channels orks only for 32-bit truecolour games, if your game is in hicolour or 256-colour transparencies in PNGs won't work.

If you meant the sizes of the sprites are different after importing, that's because the resolution your game's in is different from your desktop, try to find out about the resolution of your game first, and bear that in mind when making your graphics.

Guybrush379

I have some troubles with AGS. I've set up 32-bit palette and 800x600 resolution: I have created 2 png files (characters with alpha background).

First: When I import in AGS around character there is a strange form and rest is pink. Why?

Second:How can I set view positions for in game character? I mean, I make a loop for walking front, back, side... but when character is in a stop position?

Ashen

Topics merged.

First: Pink is the colour the Editor uses for transparent areas of the sprite. The 'strange form' might be to do with the Alpha channel. I don't think the Editor is capable of showing them so it round the transparency up or down - meaning parts of the image will be fully opaque or fully transparent that should be partially so (alpha transparency). It should look OK in game, though. (I guess this is the first part of the other thread too?)

Second: Not sure what you mean. The first frame of a loop is displayed when the character is stationary (it's also not included in the walking animation). So if the character is facing downwards, frame 0 of loop 0 of their walking view will be shown.
I know what you're thinking ... Don't think that.

Guybrush379

 :)
Thanks for help.

So, pink area means alpha channel: Ok, I have my sprite, around character there are strange green stripes and pink area on the left and on the right.
What is the correct way to make character full sorrounded by pink area?
I have made png with Photoshop with alpha channel, but seems not work properly.

Ashen

The pink area means full transparency - alpha channels DON'T show up in the Editor.
Does it have the pink and green stripes when you view it In-Game? Like I said, it may look like that in the editor because it rounds the 'shades' of visibility in the Alpha channel up or down.
Beyond that it might be a matter of how you made the png and the alpha channel - which would be a Photoshop question not an AGS one, and one I don't have a clue how to answer. It might be somewhere on the forums, tough.

If you don't need alpha transparency (parts of the sprite more or less opaque than others) just use normal transparency, don't bother with the alpha channel.
I know what you're thinking ... Don't think that.

SMF spam blocked by CleanTalk