Inspiration
We were heavily inspired by the recent surge in "anomaly detection" and observation games, where paranoia is the primary gameplay loop. However, we noticed that most of these games rely on static, pre-programmed rules and repetitive visual cues. We wanted to push the genre further by introducing unpredictable, dynamic interactions. Setting the game in a localized watchpost—Kampung Sambau—added a layer of grounded, community-focused tension, asking the question: How well can you really spot a monster when it can talk back and mimic human behavior?
What it does
Kampung Sambau : Gatekeeper places you in the shoes of a lone watchpost guard tasked with protecting a secluded village. You must scrutinize every visitor requesting entry. The gameplay loop involves:
- Document Verification: Cross-referencing ID cards with physical appearances.
- Physical Commands: Asking NPCs to "Jump" or "Turn Around" to catch physics glitches, hidden appendages, or unnatural movements.
- AI-Powered Interrogation: Utilizing Apertus AI, players can freely chat with NPCs. You must analyze their responses, looking for uncanny valley moments, memory lapses, or a failure to grasp basic human concepts.
How we built it
We developed the core game in the Unity engine, utilizing custom shaders to create the subtle, unsettling visual glitches that trigger when an anomaly is forced to jump or turn around.
For the conversational engine, we integrated the Apertus AI API. We routed the conversational logic through a lightweight backend deployed on Vercel, using Firebase to manage session states and dialogue histories. The mathematical model governing the AI's "suspicion meter" operates on a weighted probability decay, loosely defined as $P(Anomaly) = 1 - e^{-(\alpha \cdot t + \beta \cdot c)}$, where $t$ represents physical tells and $c$ represents conversational inconsistencies.
Challenges we ran into
Integrating a Large Language Model (Apertus AI) into a real-time Unity environment brought significant latency challenges. We had to ensure that the NPC didn't stand completely frozen while waiting for an API response, so we implemented localized idle animations and "thinking" states to mask the delay. Additionally, tuning the AI prompts was a delicate balancing act—if the anomalies were too weird, the game was too easy; if they were too perfect, the game became impossible and frustrating.
Accomplishments that we're proud of
We are incredibly proud of the seamless blending of traditional UI-based deduction (checking ID cards and dates) with generative AI conversations. The AI doesn't feel like a gimmick; it feels like a core interrogation mechanic. Getting an NPC to break character and reveal their anomalous nature through a clever line of questioning is deeply satisfying.
What we learned
We learned a massive amount about prompt engineering for specialized game states, particularly how to constrain an AI to a specific persona (a terrified villager vs. a cunning shape-shifter). On the technical side, we significantly improved our skills in managing asynchronous API calls within Unity's frame-by-frame update loop without causing stuttering.
What's next for Kampung Sambau : Gatekeeper
We plan to expand the lore of Kampung Sambau by adding a wider variety of villagers and more complex physical commands. Most excitingly, we are exploring a port to Spatial Computing/VR. Bringing the watchpost to a VR headset would make the physical proximity of the anomalies exponentially more terrifying, allowing players to physically lean in to inspect IDs and stare directly into the eyes of the impostors.
Built With
- apertus
- docker
- express.js
- fiber
- github
- node.js
- openusd
- python
- react
- three
- three.js
- typescript
- vite
- webgl
Log in or sign up for Devpost to join the conversation.