Boggle-Multiplatform
Boggle-Multiplatform copied to clipboard
đšī¸ A simple Boggle game App using Kotlin and Compose Multiplatform for Android, iOS, Desktop and Web
Boggle Multiplatform
A simple Boggle game inspired on this site, the App is implemented with Kotlin and Compose Multiplatform, have fun searching words in a 4x4 board of letters, the idea behind this App is to explore and play with KMP and CMP.
đ˛ Game mechanics
You will play with a 4x4 board looking for words with minimum 3 letters, each word guessed will give you points
that you'll see in the Score value, the game is finished when you find the total words available for the board,
now, here's some details of the game:
- There's a
Scoremarker next to aWords found/ Total wordscounter. - A Boggle board with a progress line around it (it works but needs to be improved đ )
- An
Use API solver: this option let's you choose either to solve the board with the local or the API solver, the main difference is that the local solver will find less words than the API, is checked by default. Englishtoggle: you can play looking for words on English or Spanish, by default the board is on English, to change for a Spanish board you'll need to first uncheck theUse API solvercheckbox.- The
Rotatebutton will rotate the board so it might help you to see new words. - The
New gamebutton will start a new game. - The
Give me a hintbutton will help you with a word if you can't think on one. - There's a
Words countersection from which you'll see the the number of words available per number of letters. - You can click on each word guessed to see it's definition.
đĸ Important mentions
- Local solver
getBoardSolutionOnewas implemented and adjusted based on Ryan Grasell's repo - Local solver
getBoardSolutionTwowas implemented and adjusted based on Ali Shalabi's repo, here's the article that explains his implementation. - API solver url is from Codebox Boggle solver
- Word definitions are obtained from the Free Dictionary API
- Huge thanks to Andres Rojas for helping me with the initial steps of the project.
đŊī¸ Showcase
Android
https://github.com/alejandro-rios/Boggle-Multiplatform/assets/10689052/8bed288b-3a23-44db-915a-bb56a71e4232
iOS
https://github.com/alejandro-rios/Boggle-Multiplatform/assets/10689052/fb97fa43-0c40-4107-96fb-577f89984a42
Desktop
https://github.com/alejandro-rios/Boggle-Multiplatform/assets/10689052/e3fb9226-3e85-4d3b-800a-02c3d2b059fb
Web
https://github.com/alejandro-rios/Boggle-Multiplatform/assets/10689052/77167768-94ba-4dc7-96a5-a1e21d265908
đ Tech stack
- Compose Multiplatform: Declarative framework for sharing UIs across multiple platforms.
- Ktor: A framework for building asynchronous server-side and client-side applications with ease.
- Kotlin Coroutines: Simple library used to run Asynchronous or non-blocking calls.
- Kotlin Serialization: Simple library used to serialize data.
- KStore: A tiny Kotlin multiplatform library that assists in saving and restoring objects.
- Jetpack ViewModel: A business logic or screen level state holder.
- Koin: A smart Kotlin injection library.
- Turbine: A small testing library for kotlinx.coroutines Flow.
- Mokkery: The mocking library for Kotlin Multiplatform, easy to use, boilerplate-free and compiler plugin driven.
âī¸ Architecture
The architecture used for the application consists of the following:
- Clean Architecture.
- Repository pattern.
- MVVM pattern.
This project uses a basic UiState (BoggleUiState) to handle the application interface state at a given moment.
đ Notes and considerations
This project is not finished, there's a lot of improvements that can be made, and I'm pretty sure that the app has some performance issues (on the Compose side) that are going to be fixed.