AmongDevs is a small browser game for learning Codex and OpenAI platform concepts through an Among Us-inspired spaceship task flow.
The player moves a crewmate-style character around a spaceship, enters concept rooms, learns a concept, answers a task prompt, and unlocks the next room. The goal is to make developer education feel interactive instead of reading a static checklist.
The main game path teaches seven Codex concepts:
- Prompting
- Customization
- Memories
- Sandboxing
- Subagents
- Workflows
- Cyber Safety
The app also includes an OpenAI API Atlas that explains where major OpenAI APIs fit in a production developer workflow, including Responses, Structured Outputs, tool calling, Realtime, Audio, Images, Videos, Embeddings, Files, Vector Stores, Containers, Agents SDK, Assistants/Threads, ChatKit, Batch, Evals, Fine-tuning, Moderation, Models, Skills, and organization/admin APIs.
- HTML for the app structure
- CSS for the spaceship UI, modals, HUD, responsive layout, and accessibility states
- Vanilla JavaScript for game state, movement, room unlocks, quiz flow, audio controls, and the API Atlas
- Node.js
server.mjsusing the built-innode:httpmodule for local static hosting and OpenAI API proxy routes
There is no frontend framework or package install step.
AmongDevs/
index.html # App markup and modal structure
styles.css # Game, HUD, modal, room, and API Atlas styling
script.js # Game logic, lesson data, OpenAI API Atlas, client API calls
server.mjs # Local static server and OpenAI API proxy routes
assets/ # Generated room art output when using the Images API
Set OPENAI_API_KEY before starting the server:
OPENAI_API_KEY=your_key_here node server.mjsWith an API key, these routes become active:
-
POST /api/explain-concept- Uses the OpenAI Responses API.
- Generates a short structured explanation for the current concept.
-
POST /api/narrate- Uses the OpenAI Audio Speech API.
- Turns lesson text into spoken narration.
-
POST /api/generate-room-art- Uses the OpenAI Images API.
- Generates room art and stores it under
assets/generated/.
Without an API key, the game still runs. It uses built-in lesson text, fallback room art, and browser speech synthesis where available.
- The player starts in the ship.
- The active room glows.
- The player moves with WASD, arrow keys, or on-screen controls.
- Entering the active room opens a briefing modal.
- The briefing teaches the concept first.
- The player accepts the task.
- The player chooses the best answer.
- Correct answers play a horn sound and unlock a takeaway card.
- Pressing OK unlocks the next room.
- The run ends after all seven concepts are repaired.
AmongDevs uses OpenAI in two ways:
- As curriculum content: the game teaches Codex and OpenAI API concepts.
- As optional live functionality: the local server can call OpenAI APIs for explanations, narration, and generated room art.
The API key is intentionally used only on the server. Do not put OPENAI_API_KEY in browser JavaScript.
Before deploying this project, the biggest concerns are:
- Cost control: cache generated explanations, audio, and images.
- Latency: keep fallback content so the game never feels blocked.
- Rate limits: prevent repeated button clicks from causing repeated API calls.
- Security: keep API keys server-side and add request validation.
- Observability: log endpoint, model, latency, success/failure, and cache hit/miss.
- Evals: test generated concept explanations before changing prompts or models.
- Data handling: review what user-provided text or uploaded files are sent to OpenAI.
For a production version, pre-generate static room art and common narrations, then use live OpenAI calls only for personalized explanations or adaptive tutor behavior.
AmongDevs is currently an interactive learning game, not a full agent. It could become agentic by adding a mentor agent that can:
- Track player progress
- Explain concepts at different difficulty levels
- Generate custom quizzes
- Recommend the next room
- Use tools such as docs search or project file search
- Remember learning weak spots
- Produce structured actions that update the game UI
The clean next step would be an AmongDevs Mentor panel powered by the Responses API or Agents SDK with Structured Outputs.
- Keep lesson content in
script.jsclose to the task definitions. - Keep OpenAI calls in
server.mjs, not the browser. - Add fallbacks for every AI feature.
- Use the browser console for frontend debugging and the server terminal for API route errors.
- If port
4173is busy, run with another port:
PORT=5173 node server.mjsThen open:
http://127.0.0.1:5173