The Taman Sari, or Water Castle, is part of the Yogyakarta Kraton (Palace) complex. It was once a sprawling pleasure place for the sultan and his harem. It's a little hard to imagine what it must have been like when it was in use, since much of the area which is now covered by small shacks and houses was once a lake. The underground passages that connect some parts of the complex were actually under-water tunnels.
The complex was built using Portuguese help in the 1760s and was used up until 1812 when the British invaded, partially destroying bits of the place. The complex is effectively in three parts: The largest was the bathing area, which consists of three rectangular pools. Two of the pools are in one courtyard, while the third is in a separate area with a sort of tower between. According to some of the guides, the large area with two pools was for the women of the harem. The sultan would climb the tower and look out over the women and select the one he would invite to join him for private pleasures in the smaller pool. The base of the tower also houses a sort of steam room.
The second part of the complex is a 'well' which descends into a circular gallery. The well was once in the middle of the lake, reachable only by boat or by underground tunnel. My guide says the space was once used as a mosque, although I have my doubts about that.
The last area is a long narrow building that sits on a hill. It too was once in the middle of the lake. The building looks more like a movie set facade than a structure that was ever functional. It appears to be a two-story building on the outside but obviously never had a second floor for most of its length. The building is almost a complete ruin.
The admission fee to Taman Sari is 7,000 Rupiah (0.42 USD).