The remains of the royal castle, built by Kazimierz III Wielki in the 1350s, stand along the river about 300m north of the Rynek. The castle was in use till the early 17th century, when a fire destroyed much of it. You can still see doorways, windows, brick vaults and loopholes.