Advertisement

problem moving images (with ALLEGRO)

Started by January 27, 2005 06:26 PM
11 comments, last by BlackWind 19 years, 7 months ago
no, for my program it works perfectly even without having to clear the screen.....and that is my question......why isnt it necessary???
Quote: Original post by BlackWind
no, for my program it works perfectly even without having to clear the screen.....and that is my question......why isnt it necessary???


I am thinking it is not necessary now because you are not doing anything that would require the screen to be cleared and redrawn on. Imagine if you had a lot more bitmaps being drawn and some of them overlapped, if some objects moved more than others, you would probabally need to clear the screen. Technically, you do not need to clear the screen always if you have the order of drawing done correctly.

If you had a loop like this:

Draw Background (640,480 size)
Draw Ship 1
Draw Enemy 1,2,3,4

You would not have to clear the screen per se, because everytime you draw the background iamge, it actually covers up the previous screen. I know this is how it works in SDL, but in Allegro I think it may be similar.
Advertisement
thank you, it seems clearer now

This topic is closed to new replies.

Advertisement