I've worked with tile-based engines before (a few years ago when I was pretty green). Now that I know a bit more, I want to revisit tile-based engines but I want to approach it correctly. I want to know two things: what is the best way to store the tiles, and what is the best way to store the levels?
For the first question: The tiles should be stored in sets, like a 10x10 grid of 40x40 tiles stored in a 400x400 image. Right? So when it's displayed, do you just place the entire image on the screen and only show the part of the image you want? And in that case, wouldn't it create a significant amount of overhead for a bunch of unused image? Or do multiple copies of the same image use the same cache?
For the second question: Should the levels be stored as two dimensional arrays? Serialized in a database? Or what?