triggair
Guides

User-generated content

Author, publish, play, and remix player content — with moderation and remix lineage.

UGC lets players create content (levels, decks, skins) that others browse and play. Create a draft, then publish it; titles/content are moderated on the way in.

const { id } = await tg.ugc.create({ title: 'My Level', data: { grid: [] } });
await tg.ugc.submit(id);   // publish
const feed = await tg.ugc.browse({ sort: 'top' });

The growth loop: remix + lineage

Anyone can remix published content — it forks with attribution, and tg.ugc.lineage(id) returns the ancestry so original authors get credit. Plays, ratings, and likes are abuse-resistant social signals that surface the best content.

const remix = await tg.ugc.remix(sourceId, { title: 'My Remix' });
await tg.ugc.rate(id, 5);
await tg.ugc.play(id);

← All guides · API reference