Where are sprites oriented from?

Started by Wogoat, Wed 09/01/2013 21:00:30

Previous topic - Next topic

Wogoat

I'm searching through the documentation and having trouble finding this little bit of information.

What spot on a spirte does AGS draw the sprites from?  Basically I'm working on a project where some spites may need to occasionally be of unusual size and I don't want to have the normal spirtes have all this blank space on either side to accomodate for the once or twice that space is needed.

Is their position based on the middle of the spirte, where any space added to one side would need to be added equally to the other to prevent the graphic from sliding to the side?
Or is it elsewhere like the upper corner?

I know when moving a character it's based on the center bottom pixel, but I wasn't sure if it's the same for drawing them.

Just wondering if anyone knows before I make any drastic changes to the sprites that may go horribly wrong.
------------------------------------
It's Gravy!

Khris

If you draw sprites to DrawingSurfaces, the top-left corner of the sprite is drawn at the specified coords.

And just for reference; if you create views for characters, you don't have to make them all equally wide if only a few of them actually need to be wider. Since the sprites are always centered, they can be cropped as long as you cut off the same amount of pixels on both sides.

Wogoat

Great, so it's the same as the moving ccordinates, if there's something that needs to be wider, I can just add an equal ammount of blank space to the other side and be all set.

Thanks, exactly what I was looking for.
------------------------------------
It's Gravy!

SMF spam blocked by CleanTalk