Page 1 of 1

Surface Size

PostPosted: Feb 1, 2004 @ 5:27am
by mlepage

PostPosted: Feb 1, 2004 @ 6:11am
by ppcStudios

PostPosted: Feb 1, 2004 @ 7:44am
by fzammetti
Is there any information on which is generally better: a number of smaller individual surfaces, or one giant one that you blit portions of?

I'm thinking in terms of performance and efficiency (memory-wise mainly) of one vs. the other. Any appreciable difference in load times? (I'd guess it takes just as long to decode a larger image as a number of small ones).

I've always been curious about this... I tend to favor the individual surfaces just because I percieve it being a little easier to swap in new graphics, but if there's some real technical merit to one big "graphics sheet", I'd love to know.

PostPosted: Feb 1, 2004 @ 2:02pm
by ppcStudios

Re: Surface Size

PostPosted: Feb 1, 2004 @ 2:49pm
by StephC

PostPosted: Feb 1, 2004 @ 2:59pm
by StephC

PostPosted: Feb 1, 2004 @ 3:25pm
by egarayblas

PostPosted: Feb 1, 2004 @ 3:45pm
by StephC

PostPosted: Feb 1, 2004 @ 4:51pm
by ppcStudios

PostPosted: Feb 1, 2004 @ 5:36pm
by mlepage
Thanks for the tips!

For me, this is less sprites than whole screens. My upcoming game uses non-rectangular sprites so it's a bit different in this respect. Hopefully I'll be announcing it later this week so you'll see what I mean.

So of my 240x4800 surface, I'll always be dealing with particular areas of 240x240 within it. The cache problems for me are, even within those areas I'll be only taking out arbitrary span lines (not full lines), and I'll be using 240x240 areas in no particular order.

I can probably rework my code to at least access the 240x240 areas in order and see if that helps any. But so far it's plenty fast enough I think so long as I can have this one big surface.

PostPosted: Feb 5, 2004 @ 10:22pm
by mlepage