This being my first post i'd like to first introduce myself.My name is Gabriel and I am 16 years old.

I've always had a great hunger for 2d adventure games.By this age I've played more than I could count (metaphorically speaking).

Now that my highschool has introduced me to programming I am baffled by the idea that I could make my own 2d adventure game.
Now with the formalities done I'd like to get to it.
I am quite confortable in the C++ language (doing it in school for 1 year plus my home learning), up to the point of classes and structures (I can implement something using these concepts but it doesn't come as natural as the other features of the language do), but my real experience in developing games comes with the Python programming language along with the SDL spinoff Pygame.

I dived in the Pygame documentation and learned all the functions and methods I deemed necessary for my game and shortly after that I started working on my first game: a Space Invaders clone. It turned out quite nice and it surely was a playable game but my dream is a overhead adventure game.

I know that for this type of game tile engines are the most widespread because of flexibility and memory conservation, so i set out on the stupendous journey of designing my own tile engine but as I advanced with the engine it simply became too overwhelming.Finally i managed to put together a simple,clean (this is a big lie), 1 layer engine that could load, display,and save levels quite nicely.

I now see how childish I was when i made my tile engine.My code seemed now like a zombie with only duct tape holding it in part.

Now I am sorry to have bored you with the stupidly long story but I have one thing to ask:

Can you please point me in the direction of basic multi layered tile engine making (not i am not asking for code snippets)?

Just the logical steps of designing a multi layered tile engine. (links to tutorials, some pseudocode-ish ideas would be a bonus)

A simple way to load tiles and maps:Have a file that lists each tile image, or have a large tilesheet, and make each tile be represented by an number ("../tiles/floors/grass/grass17.png" == id '543').

Have a map with, say, 5 layers of 100 by 100 tiles. (When learning something, I like to use fixed amounts like '5 layers' or '100 by 100 tiles', and once I understand it, then I make it capable of handling any amount of layers and any amount of tiles).

But 100 by 100. You can make the saved file comma separated, or space separated or whatever you like.

When your game starts, load all the tile images into an array. When drawing your map, for each tile ID in the map, use that ID to find the tile image in the array and draw that. If you use the grass17.png a hundred times in one map, you should still only have one copy of the image that you loaded once, and just used the same image to draw each of the hundred grass tiles in the map.

This is a simple way of doing things. Once you understand that, there are improvements you can make, such as: loading the images not at startup, but only when needed. Freeing the images that aren't needed. Saving images when changing maps if both maps use the same image. Any number of layers. Any size of maps. Breaking large maps into smaller chunks of maps, and only loading the chunks that are currently visible.

Thank you for the great explanation!
I've applied an extremely similar principle but I complicated myself by using a Map class instead of just an array.
The layer concept was a bit cloudy in my head but now you cleared it up.
Thanks again!