AnBuiii / Skribbl

Skribbl is a word guessing game mobile application. Built with Kotlin Multiplatform, Compose Multiplatform, Ktor, Koin, Voyager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Skribble πŸ–ŒοΈ

Skribbl is a SIMPE word guessing game! Through this project, I want to demonstrate how we could use Kotlin Multiplatform technology to build an wonderful app!

About

  • This game got inspired from Philipp Lackner, you can look for original game Doodle Kong
  • The original game built with old Android technology, so I want it to be updated with modern stuff ☺️
  • Client and Server communicate through RESTful API and Websocket, you can look for my Skribbl-Server here

The game 🎲

  • It is a guessing word game!
  • In each room, each row, there is a player chosen to be a draw player.
  • That player have to draw on a canvas about some mistery word so that orther player can guess it.
  • The score gained from each guessed is inversely proportional to the time needed to guess.

Built with πŸ”¨

  • Kotlin - Official programming language for Android development.
  • Kotlin Multiplatform - Share code between different platform
  • Compose Multiplatform - Framework to share UI across multiple platform
  • Ktor - Ktor is a framework for building asynchronous server-side and client-side applications
  • Kotlin-Serialization - Kotlin multiplatform / multi-format serialization
  • Voyager - A pragmatic navigation library for Jetpack Compose, Multiplatform supported
  • Settings - A Kotlin Multiplatform library for saving simple key-value data
  • Koin - The pragmatic Kotlin & Kotlin Multiplatform Dependency Injection framework
  • Koin-compose - Koin Inject in Compose code
  • KotlinX-Datetime - KotlinX multiplatform date/time library

Architecture

This project use KMP-Wizard as template generator This is a Kotlin Multiplatform project targeting Android, iOS. Here are resouces about Kotlin Multiplatform

  • /composeApp is for code that will be shared across your Compose Multiplatform applications. It contains several subfolders:
    • commonMain is for code that’s common for all targets.
    • Other folders are for Kotlin code that will be compiled for only the platform indicated in the folder name. For example, if you want to use Apple’s CoreCrypto for the iOS part of your Kotlin app, iosMain would be the right folder for such calls.
  • /iosApp contains iOS applications. Even if you’re sharing your UI with Compose Multiplatform, you need this entry point for your iOS app. This is also where you should add SwiftUI code for your project.

Project Structure 🏭

com.anbui.skribbl        # Root Package

.
β”œβ”€β”€ composeApp                             # Project entry point
β”‚   β”œβ”€β”€ src
β”‚   β”‚   β”œβ”€β”€ androidMain                    # Android target module
β”‚   β”‚   β”‚   β”œβ”€β”€ di                         # DI for android module
β”‚   β”‚   β”‚   β”œβ”€β”€ platform                   # Android Platform actual implementation
β”‚   β”‚   β”‚ 
β”‚   β”‚   β”œβ”€β”€ iosMain                        # IOS target module
β”‚   β”‚   β”‚   β”œβ”€β”€ di                         # DI for IOS module
β”‚   β”‚   β”‚   β”œβ”€β”€ platform                   # IOS platform actual implementation
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ commonMain                     # common module for shared code, each code is NOT depend on platform, library or stay in common module of library
β”‚   β”‚   β”‚   β”œβ”€β”€ composeResource            # UI compose resources
β”‚   β”‚   β”‚   β”‚   
β”‚   β”‚   β”‚   β”œβ”€β”€ core                       # The core module look very similar to normal android module thanks to Compose Multiplatform 
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ data                   # data module 
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ local              # DI for android module
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ remote             # DI for android module
β”‚   β”‚   β”‚   β”‚   β”‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ presentation           # UI 
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ component          # Common UI component
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ theme              # Comon theme system
β”‚   β”‚   β”‚   β”‚   β”‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ repostory              # Implement for domain repository
β”‚   β”‚   β”‚   β”‚   β”‚
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ utils                  # Some utilities 
β”‚   β”‚   β”‚   β”‚   
β”‚   β”‚   β”‚   β”œβ”€β”€ di                         # DI for common module
β”‚   β”‚   β”‚   β”‚   
β”‚   β”‚   β”‚   β”œβ”€β”€ domain                     # domain for common module
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ model               
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ repository     
β”‚   β”‚   β”‚   β”‚ 
β”‚   β”‚   β”‚   β”œβ”€β”€ feature                    # Seperate each screen or use case to feature
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ createRoom      
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ...  
β”‚   β”‚   β”‚   β”‚  
β”‚   β”‚   β”‚   β”œβ”€β”€ main                       # Entry point for common module
β”‚   β”‚   β”‚   β”‚ 
β”‚   β”‚   β”‚   β”œβ”€β”€ platform                   # Expected Implementation
β”œβ”€β”€ config                                 # Detekt configuation
β”‚   β”œβ”€β”€ detekt
β”œβ”€β”€ iosApp                                 # Entry point for ios app

TODO

  • Implement game profile
  • Drawing color
  • Enhance UI
  • Circle or Straight line predict?

Lint

Detekt is Static code analysis for Kotlin

Contribute πŸͺ–

Any contributions are welcome! Here are some note

  • Open issue to report a bug and make your suggestion.
  • Fork this repo and do your changes. Remember to follow project's code style.
  • Open PR against main branch with nice description and you are good to go 😊. Skribbl is an open source project developed by me. My purpose is to demonstrate my knowleadge in Android Development, Kotlin Multiplatform, Server Development and share with everyone who interested ☺️. Please do NOT use for commercial purposes.

License

This application is released under Apache license 2.0 (see LICENSE). Some of the used libraries are released under different licenses.

About

Skribbl is a word guessing game mobile application. Built with Kotlin Multiplatform, Compose Multiplatform, Ktor, Koin, Voyager

License:Apache License 2.0


Languages

Language:Kotlin 98.5%Language:Swift 1.5%