{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreidokrs7yb36mnzrpemfq4xll2wccpvlr6k7tgjsyrp3ao3xo6gaiq",
"uri": "at://did:plc:25rdn5elo5izoxrmtis34zuk/app.bsky.feed.post/3moprm4smxvq2"
},
"coverImage": {
"$type": "blob",
"ref": {
"$link": "bafkreieayruzethvmckwudcqscz64dmngo4jbgznnvvotxe27bdvq24yve"
},
"mimeType": "image/webp",
"size": 40216
},
"path": "/mirshah12/among-liars-the-7th-player-isnt-human-345h",
"publishedAt": "2026-06-20T11:24:32.000Z",
"site": "https://dev.to",
"tags": [
"devchallenge",
"gamechallenge",
"gamedev",
"amongliars",
"June Solstice Game Jam",
"https://amongliars.vercel.app",
"https://github.com/abbasmir12/amongliars"
],
"textContent": "_This is a submission for the June Solstice Game Jam._\n\nI built **Among Liars** , a realtime multiplayer elimination where six humans join a room, but the game secretly adds a seventh player: a **Gemini-powered AI** hiding inside the Spy side.\n\nThere are two teams:\n\n * **Detectives** are trying to expose the hidden AI.\n * **Spies** are trying to protect the AI long enough for the Detectives to run out of chances.\n\n\n\nThe game is inspired by the **Turing Test** , but instead of asking _\"Can AI answer like a human?\"_ , it asks something more playable:\n\n> Can AI survive being socially judged by humans?\n\nWhen the game begins, six human players are split into two teams: **three Detectives** and **three Spy Agents**. A hidden **Gemini-powered AI** is then added to the Spy side, creating a team of **four spies**. The Detectives must identify the AI, while the Spy Agents work together to keep it hidden.\n\nEach round starts with a **2-minute warmup** where teams can plan in private rooms. Detectives discuss who feels suspicious. Spies coordinate how to protect the AI.\n\nThen one Detective asks a wildcard-style question to the Spy side. The question is automatically sent to every living Spy player and also to the Gemini AI. Everyone answers under pressure, and the Detective has to read the answers like evidence.\n\nThe trick is that Spy-side players receive **new cover names every round** , so Detectives cannot simply track the AI by name or position. They have to judge tone, timing, weirdness, confidence, and emotional detail.\n\nA question like:\n\n> \"Describe a tiny mistake you made today without making it sound important.\"\n\nis much harder than a normal trivia question because it asks for texture, not correctness.\n\nThat is where the game becomes interesting.\n\nSometimes AI sounds too polished.\n\nSometimes humans sound fake on purpose.\n\nSometimes the suspicious answer is suspicious because it is AI.\n\nSometimes it is suspicious because a Spy is protecting the AI.\n\nThat tension is the core of **Among Liars**.\n\nYou can play it here:\n\n**Live Demo:** https://amongliars.vercel.app\n\n## Video Demo\n\n## Live App\n\nhttps://amongliars.vercel.app\n\n## GitHub Repository\n\nhttps://github.com/abbasmir12/amongliars\n\n## How I Built It\n\nThe frontend is built with:\n\n * React\n * Vite\n * Framer Motion\n\n\n\nand a custom black-and-white visual style.\n\nThe backend uses **Supabase** for:\n\n * Room creation\n * Random matchmaking\n * Player state\n * Role assignment\n * Realtime chat\n * Private team rooms\n * Round state\n * Answer storage\n * Eliminations\n * Win conditions\n\n\n\nI used **Supabase Realtime** instead of a custom WebSocket server, so messages, answers, player changes, and round changes update live across browser tabs and devices.\n\nThe game includes:\n\n * 6-player waiting room with automatic countdown\n * Private role reveal\n * Detective-only and Spy-only private rooms\n * Public chat\n * 2-minute planning/warmup phase\n * Rotating Spy cover names every round\n * Wildcard question flow\n * 90-second Detective question window\n * 45-second Spy answer window\n * 30-second Detective final read window\n * Gemini AI answer generation\n * Evidence cards\n * Detective guess phase\n * Round result screen\n * Eliminated player tracking\n * Detective/Spy win states\n\n\n\n## Round Flow\n\nEach round is designed to feel like a small interrogation.\n\nFirst, there is a **2-minute warmup**. During this time everyone can continue talking publicly, but the private rooms are where the real strategy happens.\n\n### Detective Strategy Room\n\nDetectives discuss:\n\n * Who sounds too clean\n * Who is avoiding pressure\n * What question would expose the AI\n * Which answer patterns felt suspicious in previous rounds\n\n\n\n### Spy Strategy Room\n\nSpies coordinate:\n\n * How to protect the hidden AI\n * How messy or natural their answers should feel\n * Whether to draw suspicion away from one player\n * How to make the room harder for Detectives to read\n\n\n\nAfter warmup, one living Detective is selected.\n\nThat Detective receives a **90-second question window**.\n\nThe Detective writes a wildcard pressure prompt. Once submitted, the question is automatically sent to every living Spy-side player, including the human Spies and the hidden Gemini AI.\n\nThe Spy side then receives a **45-second answer window**.\n\nHuman Spies type their responses while Gemini generates its answer through a Supabase Edge Function.\n\nAll responses are stored in Supabase and displayed as evidence cards.\n\nFinally, the selected Detective receives a **30-second final read window** and must click the answer card they believe belongs to the AI.\n\n### Resolution\n\nThe resolution is intentionally asymmetric:\n\n * If the Detective guesses wrong, that Detective is eliminated.\n * If the Detective guesses correctly, one human Spy bodyguard is eliminated.\n * The AI survives until all human Spies are gone and it has nowhere left to hide.\n\n\n\n## Undercover Names\n\nOne of the most important mechanics is the rotating identity system.\n\nSpy-side players never keep the same visible name between rounds.\n\nA player might be:\n\n * `TAVI` in Round 1\n * `ORION` in Round 2\n * `MICA` in Round 3\n\n\n\nThis prevents cheap detective work.\n\nDetectives cannot simply memorize player names, positions, or patterns tied to a specific identity.\n\nInstead, they must judge the answers themselves.\n\nPrevious round results preserve the original cover names, so historical evidence remains readable even after identities rotate.\n\n## Wildcard Questions\n\nThe wildcard question is the heart of the game.\n\nThe best questions pressure the difference between a lived human answer and a generated answer.\n\nExamples:\n\n * \"Describe a tiny mistake you made today without making it sound important.\"\n * \"What is a smell that makes you trust a place?\"\n * \"Say something you would only text, not say out loud.\"\n * \"Which answer in this room feels rehearsed, and why?\"\n\n\n\nThese questions are not about facts.\n\nThey are about texture.\n\nThey force players to produce awkward, emotional, sensory, or social details under pressure.\n\nThat is where the Turing Test becomes playable.\n\n### Gemini Integration\n\nThe Gemini integration runs server-side through a **Supabase Edge Function**.\n\nWhen a Detective submits a question, the function:\n\n 1. Checks the current room and round.\n 2. Finds the hidden AI player.\n 3. Reads the AI's current cover name.\n 4. Sends the question and game context to Gemini.\n 5. Receives a short in-character answer.\n 6. Saves the answer into Supabase.\n 7. Broadcasts it alongside the other Spy answers.\n\n\n\nThe Gemini API key is never exposed to the browser.\n\nI also added multiple AI behavior styles so Gemini does not always respond with the same personality.\n\nSometimes it answers plainly.\n\nSometimes it is guarded.\n\nSometimes it is short, awkward, or oddly direct.\n\nThe goal is not to make the AI sound perfectly human every time.\n\nThe goal is to make it difficult to separate from the Spy side.\n\n## Prize Category\n\nI am submitting for both optional prize categories.\n\n### Best Ode to Alan Turing\n\nAmong Liars is built directly around the idea of the **Turing Test**.\n\nBut instead of making the test a static question-and-answer screen, I turned it into a social game.\n\nThe AI is not judged by one answer alone.\n\nIt is judged by how it survives inside a room full of humans who are actively suspicious of it.\n\nThe game asks:\n\n> Can a machine imitate a human well enough to survive pressure, suspicion, and social reading?\n\nThat felt like a more interactive tribute to Alan Turing's original imitation game.\n\n### Best Google AI Usage\n\nGemini is not a decorative feature in this project.\n\nIt is the hidden player.\n\nThe entire game loop depends on Gemini:\n\n * Gemini receives the Detective's wildcard question.\n * Gemini answers as a Spy-side player.\n * Gemini uses the current room context and cover name.\n * Gemini's answer becomes evidence the Detective must judge.\n * The game cannot fully exist without the AI participant.\n\n\n\nI integrated Gemini through a server-side Supabase Edge Function so the API key remains protected and the AI response becomes part of the realtime game state.\n\nThe AI is also given its current undercover identity and round context, allowing it to behave like a player inside the match rather than a generic assistant.\n\n## Final Thoughts\n\nAmong Liars started from a simple question:\n\n> What if the Turing Test was not a test, but a game night?\n\nThe result is a tense social deduction game where humans are reading AI, humans are imitating AI, and nobody can fully trust what \"normal\" sounds like.\n\nThat is the fun part.\n\nIn this game, the AI does not need to be perfect.\n\nIt just needs to survive.",
"title": "Among Liars -> The 7th Player Isn't Human"
}