Skip to content

Kazoroo/Tavern-Farkle

Repository files navigation

Tavern Farkle

Tavern Farkle is an Android dice game inspired by the mini-game from Kingdome Come: Deliverance.
The game is varied with special dice and multiplayer mode. The gameplay is about rolling several dice and choosing that ones, which gives the most points. You have to outscore the opponent, and be careful to not end up with no scoring dice.

Tavern Farkle icon

Key features:

  • Singleplayer with opponent gameplay algorithm
  • Multiplayer using Firebase Realtime Database for state storage
  • Special dice allowing to compose a strategy
  • AdMob ads for bonus coins
  • Betting system to win or lose coins on games
  • Music and sounds effects utilizing SoundPlayer and MediaPlayer
  • Onboarding tutorial for new players
  • Translations to 6 languages

Tavern Farkle icon Tavern Farkle icon

Architecture

The app follows a clean architecture pattern.
A single GameViewModel observes the game state stored in a GameRepository, which has two implementations:

  • LocalGameRepository for singleplayer mode
  • RemoteGameRepository for multiplayer mode

In multiplayer, the game state is stored both locally and in Firebase.
When a player takes an action, they immediately see the result, while the opponent's view updates in real-time by listening to the same database node.

The flow is simple:

  1. The host creates a lobby visible to all players.
  2. Another player joins it from the lobby screen.
  3. Once the game ends, the lobby node is deleted, and the winner receives the reward.

obraz

Feel free to contribute!

Packages

No packages published

Languages