A word puzzle game based on android jetpack compose.
This project is open-source and every one is most welcome to contribute but remember that before uploading to play store, modify all resources e.g., images, audios etc. All the resources that belongs to the project/author including brand "LexiLink" are strictly prohibited to use in your commercial release due to copy right act. In case of violation, your app will be reported and suspended from play store/app store when your app/game will be on peak.
Some major changes made. Data classes are seperated to increase readability. So completely update the project
Used Technologies:
- Jetpack Compose
- Canvas
- Animation
- Dagger-Hilt
- Room Database
- MVVM
- Navigation Component
- Single Activity and Multiple Screens
- Only 200 levels available
- Just Clone the repo and done!.
Data Structure (Models)
- Chapter: is a kind of group
- Level: Chapter has many levels
- Solution: Levels has many solutions
There are two screen composables (screens) Main Screen which have play/settings buttons and gameview which have the actual game. It is quite simple and easy to understand.
Every thing resides in ui>screens>gameview package. This package containes two files, one is viewmodel and second is gamveview composable.
GameView is divided into two parts, one is top and second is bottom. The top section contains the solution pad where letters will be showed invisible/visible. Second and the bottom part contains keypad which can be used to select letters.
Gems are initialized on this screen: SplashActivity.kt
CoroutineScope(Dispatchers.IO).launch{
//Check if app is installed first time. if
//First time then initial free gems are provided
GemShopManager.initializeSharedPrefs(mContext)
if(GemShopManager.isFirstInstallation()){
GemShopManager.initializeGemsTotal()
GemShopManager.setFirstInstallationStatus(false)
}
}
Code below in GameScreen.kt is responsible to initialy prepare the level/
GameScreenViewModel.kt has all related methods
LaunchedEffect(Unit) {
viewModel.prepareLevel()
}
Top bar contains two sections. One to display level and second is to show available gems. It takes two params, level and gems which is already provided by viewmodel.
fun TopBar(level:String, gems:Int)
It has two callbacks, one to trigger hint and second to shuffle the letters.
On hint, gems are first checked, if it has enough gems then gems are consumed and hint is provided.
Note: GemShopManager.kt which is responsible to manage gems, resides in utils package
BottomBar(
onHintClicked = {},
onShuffleClicked = {}
)
Add button is only visible if gems are not enough to consume. The consume amount can be changed in GemShopManager.kt
val adbuttonmodifier = Modifier
.size(80.dp)
.align(Alignment.CenterEnd)
ButtonWatchAd(
modifier = adbuttonmodifier
){
//Show your add here
}
To add more levels, go to the dJango python project. Download the repo, run server and add more levels. Next generate the database which is compatable with kotlin room database on Chapters page. Next copy that database (wordgame.db) to asset folder. Python project: https://github.com/farimarwat/word-connect-database-populator/
Note: I will gradually update the documentation.
31/07/2023
Major changes of seperating data models in Chapter. Chapter has levels. Level has solutions.
18/07/2023
- ad indicator added
- hint indicator added
- error sound added
Initial release
If you want to donate then you are welcome to buy me a cup of tea via PATREON because this encourages me to give you more free stuff and continue to maintain this library