Quote Originally Posted by robert83 View Post
I did it, and to my dissapointment, it's worse then it was before on the other computer :
Code:
procedure TMain.ATimer1Timer(Sender: TObject);
begin
  // draw stuff , background is black
  ADevice1.Render(clBlack, True);
  // do stuff that require steady speed here
  ATimer1.Process;
  // flip backbuffers , make it visible
  ADevice1.Flip();
end;
You should always call ATime1.Process last. So code would look lie this.
Code:
procedure TMain.ATimer1Timer(Sender: TObject);
begin
  // draw stuff , background is black
  ADevice1.Render(clBlack, True);
  // flip backbuffers , make it visible
  ADevice1.Flip();
  // do stuff that require steady speed here
  ATimer1.Process;  
end;

I also owe you a GREAT apology. Why? Becouse for the past few weeks I have been unintentionally misleading you to wrong direction.
When I first started to help you I asumed that main problem you have is the fact that Sprite Engine you use doesn't have optimization code which would render only visible sprites.
I must admit that my asumption was compleetly wrong (should have studied Sprite Engines code in the first place). Sprite Engine does have necessary code to prevent nonvisible sprites of not being rendered.
The reason why you had so poor performance in the start was becouse Form which you used for rendering target was so big that optimization code hasn't even kicked in as it asumed that all that should be rendered even when most of that Form wasn't even visible on the screen. It was as if you would be rendering to realy large screen.

What does this means?
You CAN create sprites for the whole map.
Instead of moving each sprite you SHOULD only cahnge world position.

So you see most of my suggestions to you were wrong. I haven't realized this until yesteray when I studied Sprite Engines code compleetly.
I hope you can forgive me for this.