built a game prototype where you use gpt-4 to social-engineer NPCs into giving up secrets. amidst all the hype around llms changing how we interact with npcs, i kept asking — where are the actual games? everyone talks about "dynamic npcs" but nobody ships them. so i made one.
the core loop: talk to characters, extract information through dynamic conversation, piece together a corporate conspiracy. no pre-written dialogue trees. every conversation is different. you walk into an office, start talking to the receptionist, compliment the art on the walls, ask about the company culture, steer toward the project you're investigating. the npc responds dynamically based on its gpt-4 personality prompt and whatever information you've already extracted from other characters.
the fun part was watching the npc contradict itself if you pushed hard enough. gpt-4 has no concept of a consistent backstory unless you force it. tell the npc you spoke to their colleague and they'll often agree with whatever you claim the colleague said, even if it contradicts what they told you ten minutes ago. the game essentially became "how fast can you make an ai lie to itself." the inconsistencies became the puzzle — cross-reference statements, find the contradictions, use them to extract more information.
the technical challenge was context management. each npc needs to know what it knows, what it's been told, and what it should never reveal. gpt-4's context window fills up fast when you're maintaining a full conversation history plus character background plus plot state. had to implement a sliding window with summary compression — keep the last 10 messages in full, summarize everything before that. the summaries sometimes lost critical details which created accidental plot holes. unintentionally realistic for a corporate environment.