Well, I almost got it I made the smooth scrolling possible like this :
Code:
procedure TTools.DOWN_1Execute(Sender: TObject);
var i,j : integer;
begin
if MainForm.Offset < strtoint(LLength.Text)-14 then
begin
inc(MainForm.Reset_Grid,1);
if MainForm.Reset_Grid = 32 then
begin
Main.DrawLevel;
Main.SyncAnim;
MainForm.Reset_Grid:=1;
inc(MainForm.Offset,1);
for j := 0 to 15 do
begin
for i := 0 to 19 do
begin
BackGround[i,j].WorldY:=0;
end;
end;
end;
for j := 0 to 15 do
begin
for i := 0 to 19 do
begin
BackGround[i,j].WorldY:=BackGround[i,j].WorldY-1;
end;
end;
end;
end;
Currently it only works for down, but has a small problem which I'm trying to fix now, when I start scrolling down with it goes down 32 , then does a jump that I can feel.... but after that I cannot feel that I'm drawing that one additional line , it feels like
I'm actually scrolling trough a 30 line long map for example....
Also my animation is reset as I move down .... which is not good...damn, have to find a fix for that to.
But atleast did some progress on me own.
UPDATE : if I set RESET_GRID on FormCreate to RESET_GRID:=31 (instead of 0), my scrolling down is as smooth as can be.... only animation remains problem now that it's synced whenever I move....not good will have to
use you're suggestion to make em synced , hopefully I can make em synced and still keep the uniqueness of invidiual animations by using startpos by tile.
Greetings
Robert
Bookmarks