Graphics, Characters, Text & Rooms: Difference between revisions

m
*>Ashen
Line 323: Line 323:


==Objects don't align properly in high-res (640x480) mode==
==Objects don't align properly in high-res (640x480) mode==
''My game is in high-resolution (640 x 480 graphics), and most of my objects do not align properly on my background images like I want them to. They're usually off by a pixel or two, and this occurs with scripting and manually. What am I doing wrong?''
''My game is in high-resolution (640 x 400, 640 x 480 or 800 x 600 graphics), and most of my objects do not align properly on my background images like I want them to. They're usually off by a pixel or two, and this occurs with scripting and manually. What am I doing wrong?''


Nothing. AGS uses a 320 x 240 resolution grid even for high-resolution games. Therefore, you can only place objects on every other pixel (even-numbered, if going from 0 to 319 or 239). You will have to keep that in mind when designing your backgrounds and object placement.
Nothing. AGS uses a low resolution grid (320 x 200, 320 x 240 or 400 x 300) even for high-resolution games. Therefore, you can only place objects on every other pixel (even-numbered, if going from 0 to 319 or 239). You will have to keep that in mind when designing your backgrounds and object placement.


However, with characters, the Character.LockViewOffset function does allow an offset in actual pixels to be specified for X and Y, so this may offer a way around the problem.
However, with characters, the Character.LockViewOffset function does allow an offset in actual pixels to be specified for X and Y, so this may offer a way around the problem.
Also, you can have high resolution masks for the walkbehind areas, but not for the other types of masks.


There is [http://www.bigbluecup.com/tracker.php?action=detail&id=434 an entry] in the AGS Bug/Suggestion Tracker about a more accurate positioning system. In the mean time, if you grab images from your background using a rectangular marquee/selection tool, remember to make sure that the program's status bar shows even-numbered pixels for your starting and ending points (and height/width as well).
There is [http://www.bigbluecup.com/tracker.php?action=detail&id=434 an entry] in the AGS Bug/Suggestion Tracker about a more accurate positioning system. In the mean time, if you grab images from your background using a rectangular marquee/selection tool, remember to make sure that the program's status bar shows even-numbered pixels for your starting and ending points (and height/width as well).