World saving

Lets say that you made a 2d minecraft esc game and you wanted to have a world save feature. There are a few ways i think this might work.
-Have a vertical line of raycasting blocks that save the type of block in its individual raycasts and place them in the same place when you load the map again
-Have a block that runs across the top of the screen that raycasts and saves every block as a loading screen and when you load the map it places the blocks in the same location

I mean in reality you could just have the entire game be filled with blocks, 100% of the screen has something on it, but anything that is considered an air block is just Alpha 0, and disabled. changing a block, or “destroying” a block changes a number, and that number goes to a save, and a filter, to play an animation for what type of block it is currently representing. You don’t really need to do any fancy math or anything, just give every block a save and load, and have the block be able to play an animation based on what it’s supposed to be, and if it’s just air, it disappears and disables so you can walk through it.

When you load the game, every block will once load whatever number is saved, so anything that was changed will still be changed.