Check out any of the existing free roguelikes
http://www.roguebasin.com/index.php?title=Main_Page
Mod one of them, or strip it down to just the parts you need.
There are also free RL engines, and even tools for proc-gen caves, rooms & halls, entire worlds, etc.
Though many roguelike games are text-grid based, this is equivalent to a 2D tile based game, and many such games can use tilesets.
Outside the RL genre there are also games like Dwarf Fortress which was text based and now has tiles available.
IMO, the best free "engine" for making such a game is GCC.