Inspiration

Tabletop Mafia is a great game, and it is also slow, loud and easy to wreck. You need eight people, one patient moderator, and a group that agrees on the rules. Most nights, you have none of that.

I wanted the fun part, which is the lying, the guessing and the vote, in a form that starts in seconds and fits in a room with one person. Mixed reality on Quest 3 gave me a way to do that. The game already has a table, so it can use yours.

What it does

Mothlight is a social deduction game for 8 seats. It is played seated and with your hands only. There are no controllers.

  • A small village of 8 glowing houses grows out of your real table. Each house has a lantern.
  • A Lamplighter, the virtual moderator, stands in the village square and runs the game.
  • You get a secret role. Two players are Moths, and they know each other. One is the Glassblower, who can protect a lantern. One is the Firefly, who can check whether a house is friend or foe. Four are Lanternkeepers.
  • At night, your real room fades to dark, and the lanterns are the only light. Everyone points at a house in secret and pinches to lock the choice.
  • At dawn, a moth flies to a lantern, and one lantern may go out. In the day, each living player gets a short turn to speak. Then everyone points to accuse, and raises a hand or pokes a token to vote. A ring and a ticking sound show how much time is left. The first night is a scout night, so nobody goes out.
  • The Keepers win when both Moths are out. The Moths win when the village goes dark.

A full game takes about 6 minutes (bot games average 6 minutes, and a game ends at 10 minutes at the latest). Practice and Host both give a judge a full game.

You can play alone in Practice mode. Bots fill every empty seat, so one player always gets a full game. You can also play online with a room code. A bot takes the seat of any player who leaves, so a dropped headset does not end the game for everyone.

The whole game uses a few hand actions: point at a house (or touch its roof) and pinch to lock your pick, raise a hand to vote, poke a Yes or Spare token on your house to vote, poke a bell to end your turn, poke a Skip token to move a bot on, and poke menu buttons. Every house is within about 0.6 m of your head, so you never need to reach or stand.

How I built it

  • Engine and SDKs: Unity 6, Meta XR SDK, Interaction SDK for pointing and the raised-hand pose, and the Mixed Reality Utility Kit (MRUK) to find your table and anchor the village to it.
  • Fallback place: if MRUK finds no table, the village appears at seated height in front of you, on its own painted ground. The game works in a room I never tested.
  • Purposeful passthrough: the night phase changes the real room by lowering the passthrough opacity. The room dims and keeps its real colours, and the lanterns stay bright. Lanterns use emissive materials and there is no per-house light, to keep the frame rate high.
  • Online: Photon Fusion 2. One headset is the host. It holds the game state, the bots and the secret roles. Each player receives only their own role card, and only the Firefly receives the Firefly result.
  • Voice chat (built, not yet tested on a headset): Photon Voice. Only the speaker's microphone is open, so the voice follows the speaking turn. The turn rule and the voice link are tested on a PC. A headset test is still open, so check this line before you submit. (The demo video illustrates this scene with generated voices.)
  • Bots: each bot has a suspicion score built from votes and accusations. Bot Moths sometimes lie in their lines.
  • Sound: every sound effect is made in code, so there are no sound effect files to ship. The Lamplighter speaks with 40 generated voice clips, and every line also shows as a subtitle.
  • Teaching: the Lamplighter explains each phase once, in your first game only. There is no text tutorial.
  • Clarity: a ring around the lamp post counts the time down. A moth flies to a lantern at dawn. A Firefly result stays on the house all day.
  • Code structure: the rules, bots and timings live in a pure C# assembly with no Unity code. I tested it with EditMode tests, including thousands of simulated bot games, before I put it on a headset.

Challenges

  • Balancing the game. Two Moths made the game tense, but at first the Moths won about 60 % of bot games. I tuned how bots vote, lie and trust claims, added a scout night so a game lasts at least 3 rounds, and the Keepers now win about half the time.
  • Keeping everything in reach. I placed every interactable on the table so that hand tracking stays reliable while you sit.
  • Testing online play with one headset. Two-player tests on 18 Nov found bugs that the unit tests could not find, for example a joining player's actions that did not reach the host.

What I am proud of

  • A game that starts with nothing but a table and your hands.
  • The night phase. Your real room changes, and that change is the game rule, not a decoration.
  • A full game for one person, with no waiting for friends.

What I learned

  • Netcode and sound were new to me

What is next

  • More roles and bigger games than 8 seats.
  • Real voice recordings for the Lamplighter, in place of the generated clips.
  • More villages and seasons.

Built With

  • c#
  • interaction-sdk
  • meta-xr-sdk
  • mixed-reality-utility-kit
  • photon-fusion-2
  • quest
  • unity-6
Share this project:

Updates

Submission history