title: Delphi, Canvas: Complicated background animation under [blinding] image
body: <p>I have some troubles with rendering my canvas. Actually I'm trying to write game like space invaders, without using any OpenGL or DirectX. So at the background I have moving sky, and jet moving over it. But the jet is blinding, and sky moves not uniformly. Here's my code</p>
  
  <pre><code>  sky := TBitmap.Create;
    sky.LoadFromFile('sky.bmp');
    jet := TBitmap.Create;
    jet.LoadFromFile('jet.bmp');
    jet.Transparent := True;
  
    while True do
    begin
         for k := 0 to sky.Height do
         begin
            for i := -1 to (pbMain.Height div sky.Height) do
            begin
                  for j := 0 to (pbMain.Width div sky.Width) do
                  begin
                      pbMain.Canvas.Draw(nx, ny, jet);
                      pbMain.Canvas.Draw(j*sky.Width, k + i*sky.Height, sky);
                  end;
                  Application.ProcessMessages;
            end;
            Sleep(1);
         end;
    end;
  </code></pre>
  
  <p>Thank you.</p>