Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Retro Wolf on Sat 13/10/2018 23:30:21

Title: Drawing something outside of the drawing surface.
Post by: Retro Wolf on Sat 13/10/2018 23:30:21
If I try to draw something outside of a drawing surface, say -100 on the x axis obviously the player will never see it. But I just wondered if doing this causes any problems or slow downs, does AGS even try to do something about it?

I have 320 x 200 room but my tile based game is just using this surface as a camera, so my "room" is bigger than this and I loop through all the tile data drawing them based on the player's location, so you get tiles outside of this surface.

Now I don't actually have a problem, when I loop through the tile array I can simply just check if it would potentially be drawn outside the surface, then don't call the drawing function for that tile. There will be times when partial sprites are drawn off of the surface edge however.

So again I'm not having an issue really, I was just curious if drawing outside of the surface area is bad, could potentially cause slow downs, or AGS simply doesn't do anything.
Title: Re: Drawing something outside of the drawing surface.
Post by: Crimson Wizard on Sun 14/10/2018 00:18:26
This should be very easy to test out really, but as far as I know the Allegro library used by AGS is drawing only parts of image if it is partially off-surface and not doing anything at all if its completely off surface.
Title: Re: Drawing something outside of the drawing surface.
Post by: Retro Wolf on Sun 14/10/2018 00:52:57
Cheers for the reply CW!