Page 1 of 1

Surface size : memory requirements

PostPosted: Nov 21, 2007 @ 7:18am
by namGman
Hi, a bit of a newbie question here.

I need to be able to scroll right to left indefinitely.

I'm currently using a full screen surface that continues to be resized as the surface width requirements increase. As this happens I can see that the memory requirements continue to grow as well, which obviously, is a limited resource.

I'm not developing a game, but I suspect any side scroller might have the same issues. Is there a limit to how large a surface can be, or, is there a way to limit the memory requirements for off screen drawing?

I'm currently testing this as a stationary pc application on XP.

Thanks.

PostPosted: Nov 21, 2007 @ 4:39pm
by edge

PostPosted: Nov 22, 2007 @ 12:02am
by namGman
Ok I see. I've read up a bit on tiling now and its making a lot of sense.

thanks :)

PostPosted: Nov 24, 2007 @ 12:12am
by namGman

PostPosted: Nov 26, 2007 @ 11:28am
by edge
Hi NamGMan,

Drawing several small tiles is usually slower than drawing a big surface at once. I recommend doing several tests and see which tilesize works best for you.

In your test I recommend turning smartfps off, set maxfps to zero and display an fps counter (use the GetFPS() method of the framework to easily retrieve the fps value). In our own experiences, 32x32 is a good tilesize for a resolution of 480x640.