Skip to content

Conversation

Copy link

Copilot AI commented Nov 23, 2025

Built a complete social deduction game where players identify an Imposter through hint-giving rounds. All players except the Imposter receive the same word; the Imposter only knows the category.

Architecture

MVVM with Firebase Realtime Database

  • FirebaseRepository: Centralized data operations (party management, voting, store)
  • GameViewModel: State management via StateFlow with automatic navigation
  • Jetpack Compose UI with Material 3 dark theme

Core Features

Multiplayer Flow

  • Party creation with unique 6-char codes (collision-checked)
  • Quick match via matchmaking queue
  • 3-8 player lobbies with real-time sync
  • Host-initiated game start

Game Loop

// Word assignment
val (word, category) = GameWords.getRandomWordAndCategory()
val imposterId = playerIds.random()

// 3 hint rounds with real-time updates
repository.submitHint(partyCode, playerId, hint)

// Voting with automatic winner determination
repository.submitVote(partyCode, voterId, votedPlayerId)
// Awards 50 coins to innocents or 100 to imposter

Economy

  • In-game store: 4 avatars, 4 accessories
  • Purchase with earned coins
  • Item ownership tracking per player

Implementation Details

Constants - All game config centralized in GameConstants.kt (player limits, rewards, round count)

Error Handling - User-friendly messages, no internal exception exposure

Data Structure

/parties/{code}
  - players: Map<id, Player>
  - word, category, imposterId
  - hints: Map<id, List<String>>
  - votes: Map<voterId, votedId>
/players/{id}
  - coins, avatarId, accessoryIds
/store/{itemId}
/matchmaking

Configuration

Requires Firebase Realtime Database. Template config at app/google-services.json.example.

Original prompt

Here is a ≤500-character version with all critical elements kept:

Create a shady-tone Android game where players create characters and join parties via code. When a match starts, all get the same word except one Imposter, who only knows the category. Players give hint rounds, then vote out the Imposter. Includes quick match with random players, currency rewards for wins, and a store for avatars and accessories. Use real-time sync and lobbies.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add shady-tone Android game with character creation Implement Android social deduction game with real-time multiplayer Nov 23, 2025
Copilot AI requested a review from Cloudbyte-code November 23, 2025 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants