suffix
playing at; make-believe; pretend
Attaches to nouns to mean playing a game of pretending to be or do that thing. Often used in children's games, but also for playful imitation by adults.
子供たちはお医者さんごっこをして遊んでいる。
The children are playing doctor.
休日は家族で料理ごっこを楽しんだ。
On the holiday, we enjoyed playing at cooking as a family.
Derived from the noun 事 (こと, 'thing') with a geminated consonant and voicing, used as a suffix to indicate a playful or pretend version of something. The exact historical derivation is uncertain.