News icon

Batch Inference is now generally available on Runpod Serverless

Building a Halloween Mystery Game Powered by Runpod

Build Murder at Hollow Manor, a browser-based Halloween murder mystery with AI-powered suspects you can interrogate in your own words, using Python, Qwen3 32B and FLUX.1 Schnell on Runpod Public Endpoints.

Building a Halloween Mystery Game Powered by Runpod

It’s Halloween, which means there’s nothing better than getting into the spirit of the season by building a spooky game. Using Runpod, Python, Qwen3 32B, and FLUX.1 Schnell, you can build your own murder mystery game to kick off the season.

Murder at Hollow Manor is a Halloween-themed mystery in which players become detectives investigating a murder at a haunted masquerade ball. You’ll build an interactive web game featuring AI-powered suspects that players can question in their own words, AI-generated character portraits, and a Coroner who helps uncover clues. Using Python and Runpod, you’ll bring the manor to life and challenge players to identify the killer before making their final accusation.

This blog post will walk you through how to get started building on Runpod this Halloween. The full code is available on GitHub. You can see a working example here.

Prerequisites

  • Python 3.9 or later installed on your computer.
  • Git to clone the project repository.
  • A coding agent such as Codex or Claude.
  • A Runpod account with available credits and an API key with Public Endpoint access.
  • Basic familiarity with Python and the command line to run the server and configure environment variables.
  • A web browser and an internet connection to play the game and access the hosted AI models.

How this application is built

The game connects a browser interface to a small Python server, which keeps the case details and Runpod API key on the server. Qwen3 32B AWQ generates suspect dialogue and the final reveal, while FLUX.1 Schnell creates the scene and character portraits, which are cached for reuse. The server handles the game rules, rate limits, and spending caps, while Runpod handles inference.

To generate the dialogue, each question includes the character’s instructions and recent conversation history so the suspect can respond in character. This excerpt uses the project’s helpers to submit the request and extract the response:

‍

def chat_input(messages, max_tokens=300, temperature=0.8):
    return {
        "messages": messages,
        "sampling_params": {
            "max_tokens": max_tokens,
            "temperature": temperature,
        },
    }

def chat(messages, max_tokens=300, temperature=0.8):
    output, stats = run_job(
        LLM_ENDPOINT,
        chat_input(messages, max_tokens, temperature),
    )
    return chat_text(output), stats

‍

The Python server checks whether the player chose the correct suspect. It then submits the reveal as an asynchronous job, returning the verdict and job ID so the browser can display the result while waiting for the story.

‍

# Inside the accusation handler, after preparing the reveal prompt:
correct = body["suspect"] == case.KILLER

job_id = submit_job(
    LLM_ENDPOINT,
    chat_input(
        [{"role": "user", "content": prompt}],
        max_tokens=600,
    ),
)

return 200, {
    "correct": correct,
    "jobId": job_id,
}

‍

These are focused excerpts that use helpers defined in the project’s server.py.

Running locally

In your terminal, you can run the following. Be sure to replace rpa_your_api_key with your own API key:

‍

git clone https://github.com/JessicaGarson/hollow-manor-mystery.git
cd hollow-manor-mystery
export RUNPOD_API_KEY=rpa_your_api_key
python server.py

‍

If you open http://localhost:8666 in your browser, you should see the game appear and a page that looks similar to this:

The Murder at Hollow Manor game running locally in a browser

To learn more, check out the deployment guide for public hosting, spending limits, and the optional Coroner setup.

Playing the game

To play the game, you question five suspects, gather clues, and consult the Coroner about the evidence. You can ask questions in your own words and watch for contradictions as you piece together what happened. When you’re ready, accuse the person you think committed the murder. You only get one chance to name the killer, or you have to play it again.

Questioning a suspect in Murder at Hollow Manor

Building your own version with your agent

You can also build your own version with an AI coding assistant, such as Claude, using our MCP server. To learn more, be sure to check out the Runpod MCP server’s GitHub repo or our documentation on the subject.

To download the MCP server, you can enter the following into your terminal:

‍

npx @runpod/mcp-server@latest add

‍

Then give your coding assistant a prompt like this:

‍

Build a Halloween murder mystery in the browser. Players question
five AI suspects, examine clues, and accuse the killer.

- Use Runpod Public Endpoints: qwen3-32b-awq for dialogue
  (put max_tokens inside sampling_params) and FLUX.1 schnell
  for portraits. Generate each portrait once, then cache it.
- Write one Python standard-library server plus static HTML/JS.
  Keep the killer’s identity and API key on the server.
- Show the accusation verdict immediately, then generate the
  reveal story as an asynchronous /run job that the browser polls.
- Include per-player rate limits, a daily spending cap, generic
  errors, and Cache-Control: no-cache on static files.

Run it and play one full game before calling it done.

‍

From here, you can change the setting, characters, and clues in the prompt to make the mystery your own.

Next steps

As a next step, you may want to update the game to randomize the killer or package the game with Docker so you can host it for others to play more robustly. The repository includes a Dockerfile that bundles the Python server and game files into a container, making it easier to deploy on a Runpod CPU Pod or another hosting platform.

If you build anything Halloween-themed, let us know on Discord, in the #built-on-runpod channel 🎃

Build what’s next.

Build, train, and scale AI workloads on Runpod with cloud GPUs, Serverless, and Clusters.

Star field background