The exit of each level stays closed until enough emeralds has been collected by the player. Some levels also require some special switches (lamps, for example) to be activated before it opens.