Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: viktor on Wed 12/02/2014 11:02:06

Title: Just a quick coordinates question
Post by: viktor on Wed 12/02/2014 11:02:06
I just made an animation that is the same size as the whole room and made it in to a character that is going to animate on command. BUT! I can't for the life of me figure out the coordinates on where to place the character so it will fill the entire room :P.

The room is 640 x 480 and the character is 640 x 480. Which pixel on the character is then set on the coordinates when you determine them?
Title: Re: Just a quick coordinates question
Post by: monkey424 on Wed 12/02/2014 11:17:30
The coordinate should be (320, 480) I.e. middle pixel at character's feet.
Title: Re: Just a quick coordinates question
Post by: viktor on Wed 12/02/2014 16:15:03
OH! How did I not see that? Thank you! But now that I have the topic open I might as well ask another question about coordinates. I have an object in the room that the character is suppose to bend over and pick up. How can I align the animation with the object in the room? The character sprite always skips a few pixels to high or to left or right or whatever. There has got to be an easier way to work this out than trial and error isn't there? I tried making the sprite in to an object, aligning it with the object that is suppose to be picked up and copying the x,y coordinates, but they don't match. Why? Do objects use a different pixel for coordinate placements than characters?
Title: Re: Just a quick coordinates question
Post by: Khris on Wed 12/02/2014 19:55:22
Objects use the bottom left corner of the sprite.
Title: Re: Just a quick coordinates question
Post by: viktor on Wed 12/02/2014 20:41:44
In that case I'm having some weird problems. The y coordinate of the object is 355. When I set the character coordinate to 355 it still moves it up by one pixel. If set the value to 356 it sets it down too far (it looks like 2 pixels to me) so no matter what value I set the pickup sequence does this weird jerk before it starts and it bugs the heck out of me.
Title: Re: Just a quick coordinates question
Post by: Khris on Thu 13/02/2014 10:04:42
On older versions, when working with a highres game, AGS would internally still use lowres coordinates. Afaik one can still use that feature for backwards compatibility reasons. Are you creating a 800x600 game?

Did you try not just to reposition the object but also the place the character walks to? There has to be a combination of coordinates where they line up, I guess.
Title: Re: Just a quick coordinates question
Post by: CaptainD on Thu 13/02/2014 10:53:47
I'm sorry, I really am, but the combination of your username and the question is too much for me.  I've just got to ask...

What's your vector, viktor?
Title: Re: Just a quick coordinates question
Post by: viktor on Thu 13/02/2014 11:28:06
Well... The game is 640x480 and I'm using the latest stable version of AGS, so... Maybe if I explain how I made the animation maybe we can figure this out.

I never tried to reposition the object, rather just the place the character walks to because the object has to be placed there. It's modeled that way.

This is the animation that is suppose to play (let's leave the quality out of the equasion :P):
(http://vhochtl.skavt.net/ostalo/prepogib.gif)

So... The stick is positioned in the room as an object. The stick sprite size is 48x6 pixels and is set to coordinates 210, 355.
The walking sprite is 62x148 pixels and the pickup sprite is 146x148 pixels. I set my character to walk to 282, 356.

If I set it to 282, 355 the animation jerks.

EDIT: Also I tried it with another animation and the results are the same.