Hi Ixy, perhaps the below site will help you

http://www.tonypa.pri.ee/tbw/start.html

It is a site about tile based games written using Macromedia Flash, but I used the info for a Delphi/freepascal 2d tile platform game I started writing just fine

cheers,
Paul