Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: MashPotato on Sun 21/05/2006 02:32:59

Title: Some general questions about objects
Post by: MashPotato on Sun 21/05/2006 02:32:59
Hello ^_^
I have some general questions about objects, and it would be great if you could help me out (or point me to previous threads if I missed it them my search):

1) I was planning on making objects out of the edges of walkbehind areas in order to have nice anti-aliased edges (I'm using 32bit colour), and I was wondering about the size vs. number of objects issue.Ã,  I know that too large of an object, or too many objects, can both cause slow down, but which one is more of a concern?Ã,  ie. should I break up the edges into several small objects, or make only a few larger objects?Ã,  Some of my backgrounds will be scrolling backgrounds, if this makes a difference.

2) As a followup to the previous question, what is considered a "large object"?Ã,  Is a sprite that is 250x5 considered as "large" as a sprite that is 50x25?Ã,  Also, does the number of colours in the sprite make a difference in this regard?

3) Is the maximum number of objects in a room still 20?Ã,  That's what is stated in the manual, but I thought I read in a thread that more are allowed... or am I confusing this with the maximum number of sprites?

Thanks for your time ^_^
Title: Re: Some general questions about objects
Post by: Kweepa on Sun 21/05/2006 02:48:16
I wouldn't worry too much about these things - just create them the easiest way you can. You can always break them up later if performance is a problem.

But to answer your question, it's all about the area of the object. So a 250x5 is the same as a 50x25, or 10 25x5 objects. The number of colours is irrelevant. It may be slightly faster if the alpha is 0 or 255. If the BG is scrolling the area of the visible portion of the object is all that matters.
Title: Re: Some general questions about objects
Post by: MashPotato on Sun 21/05/2006 02:53:28
Thanks for the speedy response! ^_^
So, to clarify: it doesn't really make a difference whether I make the edges as one large object or several small objects, because the number of pixels is the same either way?
Title: Re: Some general questions about objects
Post by: Kweepa on Sun 21/05/2006 06:15:02
Well, you could fit smaller boxes along curves and diagonals of edges, then the main solid part could be a real walkbehind rather than objects.

It all comes down to the pixel count, yes.
Title: Re: Some general questions about objects
Post by: MashPotato on Sun 21/05/2006 18:35:52
Thanks, good to know ^_^