Word Puzzle/Connect Game

A word puzzle game based on android jetpack compose.

Video Demo (Click on image):

Note:

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.

Documentation

Used Technologies:

  1. Jetpack Compose
  2. Canvas
  3. Animation
  4. Dagger-Hilt
  5. Room Database
  6. MVVM
  7. Navigation Component
  8. Single Activity and Multiple Screens
  9. Only 200 levels available

How To Use

  1. Just Clone the repo and done!.

Screens

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 which letters will be showed invisible/visible. Second and the bottom part contains keypad which can be used to select letters.

Getting Started

Splash Screen

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)
            }
        }

Prepare Level

Code below in GameScreen.kt is responsible to initialy prepare the level/

GameScreenViewModel.kt has all related methods

LaunchedEffect(Unit) {
        viewModel.prepareLevel()
    }

Top Bar

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)

Bottom Bar

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 = {}
)

Ad button

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
            }

Note: I will gradually update the documentation.

Support Me

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

Buy Now!

GitHub

View Github