Thank you! It's so simple and works wonderfully... I had to modify it a bit :

Right :

Code:
          if GetKeyState(VK_RIGHT) < 0 then
            begin
              if not Blurp.testForWall(Blurp.X+Blurp.Image.Width,Blurp.Y) then
                begin
                  Blurp.testForWall(Blurp.X+4+Blurp.Image.Width,Blurp.Y);
                  Blurp.X:=Blurp.X+4;
                  AdSpriteEngine.X:=AdSpriteEngine.X-4;
                end;
            end;
Down

Code:
          if GetKeyState(VK_DOWN) < 0 then
            begin
              if not Blurp.testForWall(Blurp.X,Blurp.Y+Blurp.Image.Height) then
                begin
                  Blurp.testForWall(Blurp.X,Blurp.Y+4+Blurp.Image.Height);
                  Blurp.Y:=Blurp.Y+4;
                  AdSpriteEngine.Y:=AdSpriteEngine.Y-4;
                end;
            end;
removed +4 otherwise it stopped 4 pixels sooner as before to the right and bottom, now it stops when it hits the wall and I can move in any other direction ... GREAT!

Only thing is there are two bugs, which I'll look into tonight for some reason the following is possible :

Attachment 557


If I approach the tile from bellow, and hit it... keep pressing UP...and start moving to the
left... the moment a small part of my character sprite is "free" it allows me to go up and
down inside the wall ( I'm still happy tough, this is a better BUG atleast )
Right side is not affected by this... if I find another wall sprite, and keep pressing top
and try to go right...I can only go up once my character is completely free.


Attachment 556

Same here, if I approach a Wall sprite from left or right, and my Character is a bit Higher ... it can go trough...and move Left and Right... if I do the same with my character being lover then the Wall sprite it is not happening...

Think this has something to do with only using X,Y maybe... anyway I'll play with it tonight.

Attached is my modified "demo" thing.

Thank you again for "spoon feeding" this to me, thank you VERY VERY much!!!
Attachment 555

Greetings
Robert