Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Gold Dragon on Sun 29/06/2008 05:20:55

Title: Possible Bug Found. Sprite positioning
Post by: Gold Dragon on Sun 29/06/2008 05:20:55
Ok I'm working on a pixel perfect Puzzle. When I try to move the sprite object puzzle pieces in place to make sure they fit. The sprite image moves 2 pixels yet the Start Y coordinate number only moves 1. This is making it impossible for me or eventually program for the user/player to fit the pieces together perfectly. Is this a bug or a game mechanic? Either way can it be fixed. I'm working with 32 bit color and 800X600 Rez

If you need me to, submit pictures I can
Title: Re: Possible Bug Found. Sprite positioning
Post by: Gilbert on Sun 29/06/2008 06:06:12
This is not a bug. This is just how AGS works.

When your game is in "hi-res." (i.e. 640x400, 640x480 or 800x600), though the displayed resolution is in hi-res., the game resolution is still in low-res. (because of speed concern, etc., initially). Therefore, if your game is in 800x400, the game resolution is actually 400x300. In other words the sprites can only be placed at even coordinates of the screen.
Title: Re: Possible Bug Found. Sprite positioning
Post by: Gold Dragon on Sun 29/06/2008 06:50:36
Okay...... so how do I make my pieces fit then? Any ideas?
Title: Re: Possible Bug Found. Sprite positioning
Post by: Gilbert on Sun 29/06/2008 10:18:06
Make sure you draw the sprites such that their positionings are okay when their x, y screen coordinates take on only even values. If you find that a sprite is not positioned correctly, just add a 1-pixel transparent line to the left/top of it.
Title: Re: Possible Bug Found. Sprite positioning
Post by: GarageGothic on Sun 29/06/2008 17:42:09
By "puzzle", do you mean a jigsaw/assemble-the-torn-up-letter puzzle? If so, I just wrote a module for Ghostlady which does exactly that. If she's ok with it, I'll make it publicly available. Currently it uses the 2x coordinates in hires mode, but I can easily add a parameter to make it pixel perfect since it uses DrawingSurface.

If not, you'll just have to create the sprites to fit the 320x200 res coordinates, as Gilbot said.
Title: Re: Possible Bug Found. Sprite positioning
Post by: Gilbert on Mon 30/06/2008 02:02:48
Quote from: GarageGothic on Sun 29/06/2008 17:42:09
If not, you'll just have to create the sprites to fit the 320x200 res coordinates, as Gilbot said.

Just a small correction, it's 400x300 not 320x200, as he mentioned his game is at 800x600 in the first post.