Savegame Logic

Hey guys, I was just wondering if any of you know how saving a game works, what information is stored, how elements in the game are organized for saving and the like. No need for codes here just an explanation on the principle.