Hi IaxFenris,

Let me first welcome you to our PGD. I hope you'll like it here!

As for your question.
I can only think of one reason why you would want to draw everything to a temporary surface and then to the main surface, and that is when you have stationary images. Text, for example. Suppose you have all the letters in the alphabet in a single image and you want to to display a sentence from those letters. You could look up the letters one by one in a init procedure and then draw them on a seperate surface, so you can draw it later. It is an option, but really, for todays computers its really no problem to do the lookup at runtime.


But anway, let me first go through your code.

[pascal]
var
MapSurface : TDirectDrawSurface;

procedure DrawPlayfield;
begin
//Unless you want the coordinates and images from the list to be
//variable, there really is no need to draw it here over and over again.
//A single call in the init procedure should do just fine.
//In fact, if you do it this way, you're wasting valuable cpu power as you
//could just as well write to the dxdraw surface.
TileImageList.Items[i].Draw(MapSurface, XCoord, YCoord, 0);

//this is not correct, it should led to an error as the compiler
//doesn't know DXDraw. Also, the draw function here requires more
//parameters
DXDraw.Surface.Draw(0,0, MapSurface, false);

//this works better
Form1.DXDraw1.Surface.Draw(0,0, MapSurface.ClientRect, MapSurface, false);


end;

procedure DXTimer...
begin
DrawPlayfield;
DXDraw.Flip;
end;

procedure TfrmTest.DXDrawInitialize(Sender: TObject);
begin
MapSurface := TDirectDrawSurface.Create(DXDraw.DDraw);
end;

[/pascal]

Up to now the code works perfectly. It compiles and runs. Only problem is that it doesn't show anything. Reason for that is because the size of your temporary surface is unkown.
In the init procedure you should also define the size of the surface.
like so
[pascal]
MapSurface.SetSize(256,256);
[/pascal]

Hope that helps