hi, ok i have tried differ ways and i think moving the quads left or right is probably best way... but im having alot of problems now... for some reason it jitters when moving and i have no idea where im going wrong

example:

http://www.meka-meka.com/meka/FuryEngine.rar

my render code....

>main engine
[pascal]
procedure TFury.ProcessKBInput;
var
buffer: array[0..255] of byte;
hr: HResult;
tick: Cardinal;
begin
hr := F_DIDevice.GetDeviceState(SizeOf(buffer), @buffer);
if FAILED(hr) then begin
WriteLN('FAIL');
exit; //**** knows.... probably try to reaquire, todo...
end;

tick := GetTickCount;

if (buffer[DIK_LEFT] and $80) <> 0 then
F_MapBuilder.Player.PosX := F_MapBuilder.Player.PosX + (((tick - F_LastTick) / 60) * 15)
else if (buffer[DIK_RIGHT] and $80) <> 0 then
F_MapBuilder.Player.PosX := F_MapBuilder.Player.PosX - (((tick - F_LastTick) / 60) * 15);
end;


procedure TFury.Render;
begin
if F_DXDevice = nil then exit;

// clear the backbuffer to black
F_DXDevice.Clear(0, nil, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0,0,0), 1.0, 0);

// Rendering of scene objects can happen here
F_DXDevice.BeginScene;
begin
//get user input.
ProcessKBInput;

F_MapBuilder.DrawBricks;
end;
F_DXDevice.EndScene;
F_LastTick := GetTickCount;

// Present the backbuffer contents to the display
F_DXDevice.Present(nil, nil, 0, nil);
end;
[/pascal]



[pascal]
procedure TMapBuilder.DrawBricks;
var
i: Integer;
brick: TCustomBrick;
begin
GetDevice.SetFVF(D3DFVF_BRICKVERTEX); //D3DFVF_TVERTEX);
//draw our bricks.

//later add check for if char has moved else dont update position...

//for i := F_Bricks.Count-1 downto 0 do begin
for i := 0 to F_Bricks.Count-1 do begin
brick := F_Bricks[i];
brick.UpdatePos;
brick.Draw;
end;
end;
[/pascal]

in which case >

[pascal]
procedure TBrick.Init;
var
iLeft, iTop, iWidth, iHeight: Single;
begin
iLeft := F_Spec.F_PosX;
iTop := F_Spec.F_PosY;
iWidth := F_Spec.F_Width;
iHeight := F_Spec.F_Height;

F_Vertices[0] := SetVertexUV(iLeft, iTop, 0, 0, 0, 0);
F_Vertices[1] := SetVertexUV(iLeft+iWidth, iTop, 0, 0, 1, 0);
F_Vertices[2] := SetVertexUV(iLeft+iWidth,iTop+iHeight, 0, 0, 1, 1);
F_Vertices[3] := SetVertexUV(iLeft, iTop+iHeight, 0, 0, 0, 1);
end;

procedure TBrick.UpdatePos;
var
NewX, NewY: Single;
begin
NewX := Ceil(F_Spec.F_PosX + Builder.Player.PosX);
NewY := Ceil(F_Spec.F_PosY + Builder.Player.PosY);

//update position
F_Vertices[0].x := NewX;
F_Vertices[0].y := NewY;

F_Vertices[1].x := NewX+F_Spec.F_Width;
F_Vertices[1].y := NewY;

F_Vertices[2].x := NewX+F_Spec.F_Width;
F_Vertices[2].y := NewY+F_Spec.F_Height;

F_Vertices[3].x := NewX;
F_Vertices[3].y := NewY+F_Spec.F_Height;
end;

procedure TBrick.Draw;
begin
//check if it is worth drawing
if (F_Vertices[1].x <= 0) or (F_Vertices[0].x >= GetEngine.FPresentParam.BackBufferWidth) then exit;

//draw it etc
with GetDevice do begin
SetTexture(0, F_Texture.Texture);
DrawPrimitiveUP(D3DPT_TRIANGLEFAN, 2, F_Vertices, SizeOf(TBrickVertex));
end;
end;
[/pascal]

F_Vertices is saved as an array inside the brick object... the texture is a pointer to a texture array object.. in this case they all point to array object 0.... hope you can help, i've been on with this for hours and still cant get it to move smoothly....

the framerate sits around 4000-5000fps, you can see this in the console if u move main window.

thanks,

-MM