ところが
Introduce a result that goes against expectation
You’ll be able to shift from background information to a surprising or contradictory development.

箱を開けた。ところが、中には何もなかった。
hako o aketa. tokoroga, naka ni wa nani mo nakatta.
What do you think this sentence means?
I opened the box. However, there was nothing inside.
Introduce a surprising contradictory outcome
ところが is a conjunction meaning "however" or "to one's surprise". It introduces an unexpected, contrary factual development that goes against what was anticipated.
急いで駅へ行った。ところが、電車は遅れていた。
isoide eki e itta. tokoroga, densha wa okurete ita.
I hurried to the station. But, as it turned out, the train was late.
店に行った。ところが、休みだった。
mise ni itta. tokoroga, yasumi datta.
I went to the shop. However, it was closed.
Place ところが at the start of the contrasting sentence
Use ところが at the beginning of a sentence. The preceding clause establishes an expectation or plan, and the following sentence describes the surprising contrary reality that actually occurred.
試験は簡単だと思っていた。ところが、難しくて半分も解けなかった。
shiken wa kantan da to omotte ita. tokoroga, muzukashikute hanbun mo tokenakatta.
I thought the exam would be easy. However, it was difficult and I couldn't even solve half of it.
しかし vs ところが
Both mean “however”. しかし is a general contrast, and it can lead into your own opinion or plan. ところが only introduces an unexpected fact that actually happened, never what you think or want to do.
しかし, however (general)
天気予報は晴れだった。しかし、念のため傘は持って行こう。
tenki yohou wa hare datta. shikashi, nen no tame kasa wa motte ikou.
The forecast said sunny. However, let's take an umbrella just in case.
Can lead to your own plan; ところが can’t be used here.
ところが, however (to my surprise)
天気予報は晴れだった。ところが、雨が降った。
tenki yohou wa hare datta. tokoroga, ame ga futta.
The forecast said sunny. But, to our surprise, it rained.
Only an unexpected fact that actually happened.
三時間かけてカレーを作った。ところが、子どもたちは一口しか食べなかった。
sanjikan kakete karee o tsukutta. tokoro ga, kodomotachi wa hitokuchi shika tabenakatta.
I spent three hours making curry. But the kids only ate one bite.
評判のレストランを予約して行った。ところが、料理はあまりおいしくなかった。
hyouban no resutoran o yoyaku shite itta. tokoro ga, ryouri wa amari oishiku nakatta.
I booked a popular restaurant and went. But the food wasn’t very good.
薬を飲んで早く寝た。ところが、朝になると熱はもっと高くなっていた。
kusuri o nonde hayaku neta. tokoro ga, asa ni naru to netsu wa motto takaku natte ita.
I took medicine and went to bed early. But in the morning, my fever was even higher.
7 more examples in the grammar path — free for a limited time.