Skip to main content
Three places. Sixteen guests. One killer. Too many lies. The lights went out, at a party in a manor in a storm, at a gala dinner on a ship in the fog or on the opening night of a snowed-in theatre, and when they came back somebody was dead. The player is the detective: they search the rooms of a doll’s house, question the guests aloud, press the ones who dodge until they crack, tie clues together with red string on a cork board, and name the killer, the weapon and the motive before dawn. Where Not Amused has one character in one conversation, this game has five to seven suspects in every case, from a cast of sixteen, and they must not know what the others know. This page is its architecture; the code samples are cut down to the idea.
Play it in your browser at lokutor.com/games/most-suspicious, with no key and no download. The browser version has nine of the guests, so that it downloads sooner (Games in a web browser).

The pieces

A case that can be solved

The model is good at playing a part and bad at keeping a plot consistent across six people. So the plot is not left to it: the game makes the case first, as data, and each suspect is told their part of it.
The roles are what make it solvable, and the evidence runs on four axes. The trace left at the scene (flour, soot, engine oil, glitter…) is on the murderer and on an innocent or two. The smell: a witness passed somebody in the dark, and everybody smells of something. Where everybody was: innocents lie about themselves out of embarrassment (on the hard level two of them were secretly together), and what is found in the room where they really were proves it; shown the proof, they confess, and say who did or did not come in, which is where the murderer says they were. Why: everybody disliked the victim, some had a dark motive (an inheritance, a debt, blackmail…), found in a room or blurted out by somebody who cracks. Every rule the player is told (“things found never lie; innocents may lie about themselves, never about others, and tell the truth once caught”) is a rule the generator keeps, and a solver checks every case before it is played: one murderer, one weapon, one motive, and the liars must be caught to get there. A test runs it for thousands of seeds, at every level, in every place and in every language. The same solver gives the hints: case.next_step(known, tied, met) says what to do next from what the player has found and tied.

One agent, every suspect

When the detective questions somebody, the conversation of the last one ends and a new one starts with this guest’s mind:
As in Not Amused, the actions and the rules arrive after the greeting, with add_action and set_persona. Before that, a persona with a list of actions in it is one the model may read aloud.
The persona is written from the case for that suspect alone: their alibi, word for word, and if it is a lie, what they were really doing and when to give it up; what they saw; what they have on them and why; their grudge. About the others: you know nothing useful, never accuse anybody, never invent anything about them. A suspect who knows nothing cannot leak the solution.
  • The murderer is told never to confess, whatever they are shown. The liar is told to hold on until shown proof, and then to confess in the words of the confession card, so what they say matches what goes on the board.
  • tell is how the game knows what was said. What it is given is still checked: a card goes up when the topic was asked and the answer came, by tell or by the words of the question.
  • The faces and gestures in act are not tag words (happy is a face; [happy] is a tag), and the tags the voice performs are listed separately, with where they go.

Questions as voice

Every question is spoken: the microphone is always open, and there are no question buttons. A speech bubble beside the suspect suggests what to ask (where they were, what they saw, what is on their clothes, their grudge, and to press them if they wriggle), ticks what has been asked, and says under it whether the suspect is listening, from the agent’s state. The words of what the player says (player_said) tell the game which of those was asked. The one thing that is not said by the player is showing a proof, and it does not send text either. A LokutorVoice with the detective’s voice says it, and its sound goes into the suspect’s ears (the self-playing demo asks its questions the same way):
The suspect hears a question the same way whoever asks it, and the player hears it too. While the detective speaks, the microphone’s frames are taken off the agent, so they do not go in between the question’s (with speakers, the microphone would also hear the question a second time).

Showing the proof

When a lie is tied to its proof on the board, the lounge’s only button appears: Show the proof. It puts the proof in front of the suspect as a fact of the moment, and asks:
The liar’s persona already says what to do when shown proof; the murderer’s says to wriggle.

Nerves

Every suspect has a number, and everything the detective does raises it: a question by one, a hard one (“Tell me the truth!”) by two, a proof by three. When it crosses a threshold the suspect is told how they feel now, as another fact of the moment:
The prompt for each level asks for shorter answers, more tags and stronger ones. At the breaking point the murderer still never confesses, but an innocent who knows somebody else’s dark secret blurts it out, and it goes on the board. The voice is the same; what changes is what the agent is told about the moment, never who they are.

Tags: feelings often, sounds seldom

Every voice in the game performs expression tags: they are what makes a suspect sound caught out. The prompt asks for a feeling at the start of most sentences, and a sound ([laugh], [sigh]) at most once in an answer, only where it fits: a sound on every sentence comes out as throat-clearing, and [breath] is left out. Each suspect has favourites of their own:
The liar is told to give up “with a [sigh]” and confess “[sad]”; the murderer, accused, to pour it out with a mad [laugh]. Constable Dumpling’s written lines carry them too ([surprised] Now that doesn't add up!). The detective’s questions get feelings only: a [laugh] in the question’s sound would go into the suspect’s ears as well. Captions show none of them: Lokutor.strip_tags(line).

The helper has written lines

Constable Dumpling introduces each guest, reacts to every string tied on the board (Now that doesn’t add up!), and gives hints, computed by the game from what is known and tied. None of it is improvised: a LokutorVoice says exact lines, and the hint costs twenty minutes of the night.

Sound and settings

Every voice in the game, the agent and both LokutorVoices, plays on its own audio bus (voice_bus = &"Voices"), next to Music and Effects, so the options menu has a slider for each. While a suspect speaks, the agent’s state ducks the music and the effects under them. The language, one of Lokutor’s nine, is picked on the title or in the options; it changes the words on screen, Constable Dumpling’s lines, the detective’s questions and the language the suspects are told to speak. English and Spanish are written into the game; each other language is one file of data, merged into the same tables when the game loads, with its own grammar hooks (contractions, a word for a man or a woman, German and Basque case endings). Their prompts stay in English with an order to speak the language, and what they must say word for word in it.

Testing it

game/demo_plan.gd writes, from a seed, the steps that solve that case, and what each suspect answers to each question: a script for the development server, with one session per conversation, chosen by the words the prompt begins with. game/demo.gd plays the steps with a pretend pointer: rooms, magnifying glasses, question buttons, pins. Against the development server it is the same every time, and can be recorded; against the API, the real suspects answer, which tests the prompts with no hands.

Make your own

The structure carries to any game of several minds: a case or a world made first as data, each character told only their part, one agent that becomes whoever the player is facing, and a game that keeps the facts and judges the reasoning.