PITBULL — Devpost / hackathon write-up
Copy the sections below into your submission.
Inspiration
We took inspiration from the small, loud meltdowns everyone recognizes: exam panic, nosy relatives, chai gone wrong, group projects where you’re the only one working, a cracked phone screen, and winning an argument online so hard you start a podcast in your head. Most AI demos act like polite assistants. We wanted the opposite—a character you have to talk down using empathy, logic, and humor. Culturally, we leaned into desi / Hinglish chat energy and short, replayable game loops you’d actually send to a friend.
What it does
PITBULL is a timed conversational game in the browser. You pick English or Hindi, choose one of eight relatable scenarios, set a stubbornness tier (ALPHA → GAMMA), and have about three minutes to shift PITBULL’s mood toward CONVINCED before the timer ends. The character answers with short, in-character lines (no “as an AI…” breaks). Dialogue is powered by Google Gemini on the backend, with a full scripted fallback mode so judges and players still get a coherent experience if the key is missing, the quota hits, or the network fails.
How we built it
- Frontend: React (Create React App + Craco), Tailwind-style UI, React Router for the flow (landing → scenarios → setup → intro → chat). A countdown and mood display keep pressure on every exchange. MetaMask gates the “Start” path on the landing page (with hooks for future on-chain ideas); the chat API itself is plain HTTP and does not require a wallet.
- Backend: Node.js + Express with
GET /api/scenarios,GET /api/scenarios/:id,POST /api/chat, andGET /api/health. Each scenario bundles localized copy and a long system prompt that encodes the story arc and tone. - AI layer: Gemini chat sessions with system instructions and carefully ordered history so the model stays on persona. When anything fails, we fall back to deterministic, mood-aware lines so the game never “dies” mid-demo.
Challenges we ran into
- Gemini chat history rules: the API expects the first message in history to be from the user, not the model. Starting with a synthetic model line looked fine in code but forced silent failures and pushed every request into fallback until we fixed the conversation shape.
- Bilingual + tone: keeping Hindi and English scenarios funny and readable without breaking the mood arc took a lot of prompt and copy iteration.
- Difficulty design: GAMMA had to feel brutally stubborn but still winnable within the timer; balancing mood rules, turn count, and player psychology was trickier than we expected.
- Demo reliability: API keys, CORS, model names, and quotas are classic hackathon footguns—fallback mode was our safety net for a smooth live pitch.
Accomplishments that we're proud of
- A cohesive character that feels like one voice across eight very different stories.
- True bilingual content—not a thin translation layer on a single script.
- Resilient architecture: Gemini when it’s available, smart offline dialogue when it isn’t—judges still see a full game.
- A clear win condition (mood + timer) that makes each round feel like a mini arc, not an endless chat.
- A small but complete stack: React client, documented REST API, health endpoint, and a path to production hosting.
What we learned
- Prompt and session structure are as important as model choice; one invalid history shape can make the “AI” disappear with no obvious UI error.
- Graceful degradation isn’t optional for game-like experiences—players assume the character will always talk back.
- Short rounds + strong scenario writing beat open-ended chat for engagement; constraints create comedy and tension.
- Shipping a wallet-gated entry flow taught us to separate UX flair (connect wallet) from core mechanics (stateless chat API).
What's next for PITBULL
- More scenarios (seasonal packs, creator collabs, or community-submitted ideas with moderation).
- Leaderboards & accounts (fastest win on GAMMA, fewest turns to CONVINCED)—optional sign-in or deeper wallet identity.
- Analytics on win rate per scenario/difficulty to tune prompts and timers.
- PWA / mobile polish and optional voice or streamed tokens for a more “live” feel.
- If we lean Web3: achievements or badges tied to wallet, without forcing chain calls into the core chat path.
Log in or sign up for Devpost to join the conversation.