[SDL] A couple questions on SDL

Lilith Calbridge lilith at dcccd.edu
Thu Jul 13 14:25:38 PDT 2006


That would certainly simplify my programming efforts.  I figured that
saving data under the image and restoring it would help to keep the time
consumption down.  I don't expect to have a large number of items on the
screen with the project I have in progress so this is probably viable.

Thanks for your advice.

Lilith

>>> On 7/13/2006 at 4:05 PM, in message
<20060713210548.5369.qmail at web56114.mail.re3.yahoo.com>,
jgiors at yahoo.com 
wrote:
>>>>>> Lilith wrote >>>>>
>>
>>I'm getting my feet wet with SDL and, in a great sense, video
graphics
>>in general...
>>
>>...My purpose is to restore the background under
>>a blitted surface to it's original content before redrawing the
object
>>at a displaced position...
> 
> Since you're new to gfx programming, I thought I should mention:
> 
> It is not so common to move objects as you've described above.  In
most
> applications/games (especially when scrolling and/or
double-buffered), the
> entire background is blitted each frame which "clears" the background
to 
> it's
> original state, then the moving "sprites" are drawn over that
background.
> 
> This eliminates the need to store and re-draw small pieces of the
background
> (which was a common technique in the "good ol' days" before blitter
chips).
> 
> But the decision about which way to go is implementation-specific, so
it
> depends upon what you're making.  In any case, I hope this info's
useful.
> 
> -- JohnG
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org 
> http://www.libsdl.org/mailman/listinfo/sdl




More information about the SDL mailing list