Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Deist on Sat 24/04/2010 04:45:42

Title: 2x2 masks only?
Post by: Deist on Sat 24/04/2010 04:45:42
I've started creating a game using the 640x480 res.
Not a real complain here, but I'm still wondering: while drawing the walk-behind areas can be done pixel perfect (for obvious reasons), how come it is only possible to draw hotspots/walkpath/regions in 2x2 pixel instead of at a 1 pixel precision as well? If I'm correct, the masks are stored as bitmap anyway, so there's no limitation due to storing vector coords or stuff like this.

Is it a limitation introduced on purpose, eg. to reduce the "pixel hunting puzzles" trend or sth?  ;D
Title: Re: 2x2 masks only?
Post by: Ryan Timothy B on Sat 24/04/2010 05:11:45
Actually I believe it's all stored as an array.

I'm not sure why hotspots are 2x2 pixels, probably because it's not as important to have 100% pixel perfect placement for a hotspot, and there's also no point in beefing up a games size just for that.

But the walkpaths I know are 2x2 mostly because of the path finding algorithm having twice as much to calculate if it were single pixels.
Title: Re: 2x2 masks only?
Post by: Calin Leafshade on Sat 24/04/2010 05:15:09
probably 4 times as much infact.
Title: Re: 2x2 masks only?
Post by: Deist on Sat 24/04/2010 05:19:05
Ok, that's the kind of reason I was expecting. Thanks for clarifying it for me guys!
Title: Re: 2x2 masks only?
Post by: Ryan Timothy B on Sat 24/04/2010 13:44:30
Quote from: Calin Leafshade on Sat 24/04/2010 05:15:09
probably 4 times as much infact.
Argh, you're right.  I was thinking of angles and straight lines.  I guess that path finding algorithm does calculate "around" and check each grid area.  Doh.
Title: Re: 2x2 masks only?
Post by: monkey0506 on Sat 24/04/2010 15:46:19
Well the walkpaths having 2x2 pixels would seem rather silly since the pathfinder scales it down to 1/3.
Title: Re: 2x2 masks only?
Post by: Ryan Timothy B on Sun 25/04/2010 00:30:38
Quote from: monkey_05_06 on Sat 24/04/2010 15:46:19
Well the walkpaths having 2x2 pixels would seem rather silly since the pathfinder scales it down to 1/3.

But the walkpaths ARE 2x2.... ?  Me confused.  :P
Title: Re: 2x2 masks only?
Post by: Pumaman on Sun 25/04/2010 17:51:11
Walk-behinds are pixel-perfect for obvious reasons.

The other types of area mask are stored at half-resolution to reduce memory usage and improve performance, since they don't need to be accurate to the pixel level (unless as you say you're really going for it with a pixel hunting puzzle!)