AI Instructor Live Labs Included

OpenAI: Dungeon Quest — Build an AI-Powered RPG

Build a playable web RPG step by step using the OpenAI API. Add a game master, NPC dialogue, combat narration, structured output, streaming, and voiced speech narration — one exercise at a time.

Intermediate
6h 25m
3 Lessons
SMU-OPENAI-RPG
OpenAI: Dungeon Quest — Build an AI-Powered RPG Badge

View badge details

About This Course

Build a fully playable web-based RPG powered by OpenAI. You'll start with a complete game engine rooms, characters, combat, pixel art, the whole dungeon and progressively breathe life into it using the OpenAI API. Each exercise adds a new AI capability: a game master that remembers your adventure, NPCs with real personalities, dynamically narrated combat, structured output for reliable state changes, streaming responses, and finally voiced narration with the OpenAI Speech API. By the end you'll have a game you actually want to play, and a solid understanding of how to build multi-turn, multi-persona, multi-modal AI applications.

Course Curriculum

3 Lessons
01
Lab Exercise
Lab Exercise

Dungeon Quest Lab 1 — Game Master and NPC Voices

2h 5m 2 Exercises

Wire up the OpenAI client to a working Flask + vanilla JS dungeon shell. In this first lab you'll build a game master with full conversation memory and the ROOM_CHANGE signal that moves the player between rooms, then give every NPC their own private system prompt and conversation history so the same model becomes Marta the innkeeper, Grimtooth the goblin merchant, and Aldric the wizard.

02
Lab Exercise
Lab Exercise

Dungeon Quest Lab 2 — Combat and Structured Output

2h 5m 2 Exercises

Pick up where Lab 1 left off — the GM and NPC dialogue are already wired in. In this lab you'll build a real combat loop with stat-based damage + AI-narrated rounds + in-character enemy taunts, then upgrade the GM to JSON-mode structured output so room changes, item finds, and gold drops arrive as reliable structured data instead of regex-parsed prose.

03
Lab Exercise
Lab Exercise

Dungeon Quest Lab 3 — Streaming and Voice

2h 15m 2 Exercises

Pick up the dungeon from Lab 2 with the GM, NPC dialogue, combat, and structured JSON output already in place. In this final lab you'll stream the GM's narration token-by-token over Server-Sent Events with JSON-aware token forwarding and bounded memory compression, then add voiced narration with the OpenAI Speech (TTS) API mapped per character.

This course includes:

  • 24/7 AI Instructor Support
  • Live Lab Environments
  • 3 Hands-on Lessons
  • Completion Badge
OpenAI: Dungeon Quest — Build an AI-Powered RPG Badge

Earn Your Badge

Complete all lessons to unlock the OpenAI: Dungeon Quest — Build an AI-Powered RPG achievement badge.

Skill Level Intermediate
Total Duration 6h 25m
OpenAI: Dungeon Quest — Build an AI-Powered RPG Badge
Achievement Badge

OpenAI: Dungeon Quest — Build an AI-Powered RPG

Awarded for completing the OpenAI Dungeon Quest course — building a fully playable web RPG powered by the OpenAI API, including a memory-keeping game master, NPCs with personalities, narrated combat, structured outputs, and streaming responses.

Course OpenAI: Dungeon Quest — Build an AI-Powered RPG
Criteria Complete all five exercises in OpenAI: Dungeon Quest — Summon the Game Master, Give the Characters a Voice, Make Combat Actually Hurt, The GM Levels Up (Structured Output), and Streaming and the Long Memory.

Skills You'll Earn

OpenAI Chat Completions API Multi-turn conversation history System prompt design Persona-based NPC dialogue JSON-mode structured output Streaming responses (SSE) Flask application development Game state management

Complete all lessons in this course to earn this badge