Politburo

status-badge docs-badge

Politburo is a game of social deduction and intrigue that pits friends against each other in a struggle for power.

Defining the problem

The program in question, Politburo, fills in the gap between historically accurate gameplay (history buff appeal), social deduction, and backstabbing among players. Politburo is a game inspired by the game Secret Hitler, in which the liberals need to find out who the fasicasts are before they pass enough policies to win. Politburo is a card game that takes that idea of social deduction and historical background and adds a backstabbing aspect. The client for this project, Nicholas Doan is a history buff and plays a wide range of strategy and history adjacent games in his spare time. During our interview, he provided some great insight on enhancing the intrigue aspect of the game, and provided some useful feedback on the gameplay and themes.

The Proposed Product

Our game will be implemented using Bevy's 2D game engine, and networking will be done with the libp2p library, allowing us to mostly forgo a central server. We will still need a central server running the reference libp2p server for connecting and hole-punching players. The client will use the identify protocol to connect to the central server. For matchmaking, the kademlia protocol will be used to find open lobbies. Once an open server is identified a peer-to-peer connection is established using the DCUtR protocol. The user will interact with the chat functions using the bevy_egui library (which will render the chat as a window in the game) and the game will be played with digital interactable cards on a digital interactable Politburo desk.

Success Criteria

  1. Players can connect to others via lobbies
  2. Multiplayer is reliable and doesn't drop players mid-game
  3. A variable number of players should be able to play the game
  4. Players can communicate over in-game chat
  5. Positions on the Politburo can only be held by one player at a time
  6. Players can see what cards they have in their hand
  7. Players can play and challenge cards
  8. When not enough players are in the room, an AI can fill in the gaps
  9. Chat messages are expressive and support a markup syntax like djot
  10. Players are having enough fun to not want to leave mid-game

Appendix A

  • Rowan: The game I want to make? Have you ever heard of Secret Hitler?
  • Mr. Doan: Yes, I have heard of Secret Hitler
  • Rowan: Okay, so imagine that, but not at all.
  • Mr. Doan: Okay, well that’s good because I don’t know the rules.
  • Rowan: I was inspired by that to make something like this while I was walking down the street, I thought ‘what if [I made], Secret Hitler but like, not Secret Hitler? What if Death of Stalin [was] a card game?’ Anyway, so that’s the basic idea, it’s Death of Stalin but [a] card game
  • Mr. Doan: I see.
  • Rowan: So the basic idea on how it’s going to run is that there is a situation already in play or a situation card gets placed down. And the Politburo works to solve it. Or in theory they work to stall it. In reality, solving some problems will help some players over other players so some players would want to stall the solution. The ultimate aim of the game is to have your department be sufficiently popular with the people and having enough ‘decision making power.’ A situation card is placed down [this part is skipped if a situation card is already in play], then you move onto the next phase of the game where each player gets 1 private conversation with every other player, which is meant to [foster] secret alliances and communications between players. And then the cards are played and the points are counted and then if the situation is solved, the current situation card is discarded and a new one is played. That’s the basic gameplay loop.
  • Mr. Doan: Alright. Now what happens if a situation is not solved?
  • Rowan: It continues to the next turn, and if it continues for long enough the country collapses and everybody loses.
  • Mr. Doan: I see.
  • Rowan: Yeah. I have a few questions for you: Other than what I have described, what kind of historical aspects of such a power struggle would you like to see in such a game.
  • Mr. Doan: First of all, I don’t know why you are asking me [that question] because I am not an expert of Soviet internal politics.
  • Rowan: Let me put it this way: What kind of features do you want to see in the game?
  • Rowan: It’s mostly, yeah, the latter, the players are given a position on the politburo - Chief of the Army, Minister of Internal Security, Minister of Propaganda, etc… I was kind of thinking about [a scandal mechanic] where each player gets a secret.
  • Mr. Doan: Yeah, I think you need some kind of random secret in order to make things interesting. You can of course just fabricate secrets as well, that totally works, but if the evidence isn’t there… So then I think you need some kind of investigation mechanic where someone can accuse someone and there can be an investigation and if you haven’t done it right where you haven't paid off or bribed some key witnesses or planted fake evidence then the investigation’s gonna turn up like “No, that was false.” And then it gets turned back on you. Now people can accuse you of libel and falsely blaming people and all sorts of stuff.
  • Rowan: All right. How long do you think this would go on?
  • Rowan: Max 8.
  • Mr. Doan: Ooh, that could go on for a little bit. Because that’s a lot of talking that you need to do. Well, you said only a minute for each player. I’d say at minimum 30 to 45 minutes to an hour. You’d need to run playtests. This sounds very similar to Model UN Crisis ad hoc conferences which feel like they can go on for a little bit. Although, we completed ours in like 2 days, but that was with everybody calling for unmods and “we need to write papers” and whatnot so I actually think 30 minutes is reasonable.

Design Flowchart

Open Flowchart

Screen Prototypes

Data table

See documentation

Algorithms

Calculating action cards’ effects on the game

#![allow(unused)]
fn main() {
//After the ‘debate’ phase, when all card challenges and supports have been resolved…
supporting_influence<opposing_influence {
	do_not_resolve_effects();
else {
	match card.effect {
		progress => match beneficiary{/* Checks player position against card position */}
		influence => player.influence += card.effect.effect_number;
		/*there are many other effects, not all of which I am listing.*/
	}
}
}

Calculating player position effects on the game

Depending on the position, the effects will be resolved in much the same way.

Each position has an effect which might be resolved at different times. For example, the minister of propaganda gains influence based on his public opinion. His effect would be resolved much like this:

#![allow(unused)]
fn main() {
//resolved before influence is collected
if PropagandaChief.exists() {
	PropagandaChief.influence += (PropagandaChief.public_view / 2);
}
}

Or the economic minister, who gets influence gain for every 7 cards successfully played.

#![allow(unused)]
fn main() {
//resolved after the debate phase
if EconomyChief.exists() {
	if EconomyChief.played_card() && EconomyChief.played_cards%7 == 0{
		EconomyChief.influence_gain++;
	}
}
}

The other positions do not yet have specific effects, but they will be done in a similar way.

Test Plans

Joint test plan

Step descriptionInputDesired Output
User looks at the situation card in playNo inputAll users can see the progress towards each solution and how much time until game over.
User solves a situationPlaying the game- Button clicksAll users can see that the situation has changed, and that a new situation has been placed down.

Isaac's test plan

Step descriptionInputDesired Output
User clicks “Connect to lobby” buttonButton clickUser successfully connects to a lobby and can select a position.
User clicks “Make lobby” buttonButton clickUser opens a lobby for other users to join. Can start game after 3 players have joined and selected politburo position
User clicks “start game” button with only 1 player in the game.Button clickUser receives message saying “You must have at least 3 players to play Politburo.”
User clicks “start game” button with 3 users in the gameButton clickUser begins the game
User clicks “start game” button when at least 1 other user has not selected a positionButton clickUser receives message saying “Not all players have selected a position. Please be patient.”
User clicks on an open position in the politburoButton clickUser successfully selects that position.
User clicks on a closed position in the politburoButton clickUser does not select that position.
User types a message into a chat boxKeystrokes, button clickUser on the receiving end receives the sender’s input.

Rowan's test plan

Step descriptionInputDesired Output
User hovers over [card] handMouse movesMakes the hand more prominent on the screen so that the user can see it.
User clicks on a cardButton clickThe card is magnified so that user can clearly see influence cost, effects, and the card art.
User clicks on a card to play itButton clickUser plays a card on the table and can see other player’s played cards
User clicks on a card that another player placed down during the ‘debate phase’Button clickTwo choices (“Support” and “Challenge”) pop up under the card.
User clicks on either “Support” or “Challenge”Button clickA counter pops up which allows you to spend influence to challenge the card.
User looks at their info card on the bottom rightNo inputUser can see how much influence they have and how much influence they gain each turn. User can see how much public opinion they have. User can see their position and its effects.
User clicks “single player”Button clickUser can select a position and start playing
User plays a game of politburo with AI Playing the gameAI is at least semi-competent and wins at least 1 of the games.
User meets win conditionPlaying the gameUser is shown a screen saying that they won the game and gives them the option to return to multiplayer or to close the application.
User loses the gamePlaying the gameUser is shown a screen saying that they lost and gives them the option to return to multiplayer or to close the application.

Design/Program Complexity

See documentation