A89: Quick Redraw?


[Prev][Next][Index][Thread]

A89: Quick Redraw?




In my newly released CraPong game, my current setup is that I'm clearing the
screen with every cycle.  This is extremely stupid and I admit it, but I can't
find a reasonable way around it.

One way I tried to fix it was by having two sets of vars for the ballx and
bally.  The first set was the real ball and the second was the coordinates in
the previous cycle.  Then I drew the ball at the real coordinates and erased
it at the other.  For the paddles, I drew/erased a line at each end of the
paddle according to what direction the paddle was moving.  Thus if you move up
one pixel, I draw one line at the top and erase the line at the bottom.  The
only problem this way was that It created uneven slowdown, and the improvement
of screen flickering was nonexistent.

Does anyone have any suggestions?


Follow-Ups: