I'm interested in knowing the techniques on how 2D games hide tiles that are behind walls.
This is a really old MMO that is probably the easiest example to show what I'm asking.
Here you can see all the tiles apart from inside the two buildings
But enter the building and let the door close, and you can see only what's inside.
Stand beside or IN the doorway, and you can see inside and out.
What techniques should I look into to achieve an effect like this?
EDIT: A video of a similar game that shows the effect also, skip through parts and you'll get the idea: https://www.youtube.com/watch?v=ujwQ0-gNQ64