Skip to content

joeyouss/AmongDevs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AmongDevs

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.

What It Teaches

The main game path teaches seven Codex concepts:

  1. Prompting
  2. Customization
  3. Memories
  4. Sandboxing
  5. Subagents
  6. Workflows
  7. 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.

Tech Stack

  • 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.mjs using the built-in node:http module for local static hosting and OpenAI API proxy routes

There is no frontend framework or package install step.

Project Structure

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

Run With OpenAI API Features

Set OPENAI_API_KEY before starting the server:

OPENAI_API_KEY=your_key_here node server.mjs

With 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.

Gameplay Flow

  1. The player starts in the ship.
  2. The active room glows.
  3. The player moves with WASD, arrow keys, or on-screen controls.
  4. Entering the active room opens a briefing modal.
  5. The briefing teaches the concept first.
  6. The player accepts the task.
  7. The player chooses the best answer.
  8. Correct answers play a horn sound and unlock a takeaway card.
  9. Pressing OK unlocks the next room.
  10. The run ends after all seven concepts are repaired.

OpenAI API Usage

AmongDevs uses OpenAI in two ways:

  1. As curriculum content: the game teaches Codex and OpenAI API concepts.
  2. 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.

Production Notes

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.

Future Agent Upgrade

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.

Development Tips

  • Keep lesson content in script.js close 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 4173 is busy, run with another port:
PORT=5173 node server.mjs

Then open:

http://127.0.0.1:5173

About

Simplifying Codex concepts for Devs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors