An open API service indexing awesome lists of open source software.

https://github.com/rajashekarraju/hangman-compose

:video_game: Hangman Game for Android :robot: build with Compose :rocket:. Built with jetpack components, Room for saving game history, preferences for loading game settings, ViewModels for persisting game state, LiveData/States for observing states, Koin for DI, minimal compose animations for good UX, Light/Dark theme :rainbow: MD3.
https://github.com/rajashekarraju/hangman-compose

composable compose-android compose-navigation hangman-game jetpack-components jetpack-compose koin-injection kotlin-android material-design repository-pattern room-database viewmodel

Last synced: 13 days ago
JSON representation

:video_game: Hangman Game for Android :robot: build with Compose :rocket:. Built with jetpack components, Room for saving game history, preferences for loading game settings, ViewModels for persisting game state, LiveData/States for observing states, Koin for DI, minimal compose animations for good UX, Light/Dark theme :rainbow: MD3.

Awesome Lists containing this project

README

          

# :video_game: Hangman - Built With Compose Multuplatform :paintbrush:

[![Deploy Web (Production)](https://github.com/RajashekarRaju/hangman-compose/actions/workflows/pages-production.yml/badge.svg)](https://github.com/RajashekarRaju/hangman-compose/actions/workflows/pages-production.yml)
[![Build Packages](https://github.com/RajashekarRaju/hangman-compose/actions/workflows/packages.yml/badge.svg)](https://github.com/RajashekarRaju/hangman-compose/actions/workflows/packages.yml)
[![Tests](https://github.com/RajashekarRaju/hangman-compose/actions/workflows/tests.yaml/badge.svg)](https://github.com/RajashekarRaju/hangman-compose/actions/workflows/tests.yaml)

Game Banner

## Play / Download

| Platform | Access |
|---------------| --- |
| ๐ŸŒ Web | [Play in browser](https://rajashekarraju.github.io/hangman-compose/) |
| ๐ŸŽ macOS | [Download DMG](https://github.com/RajashekarRaju/hangman-compose/releases/download/desktop-latest/hangman-macos.dmg) |
| ๐ŸชŸ Windows | [Download MSI](https://github.com/RajashekarRaju/hangman-compose/releases/download/desktop-latest/hangman-windows.msi) |
| ๐Ÿง Linux | [Download DEB](https://github.com/RajashekarRaju/hangman-compose/releases/download/desktop-latest/hangman-linux.deb) ยท [Download RPM](https://github.com/RajashekarRaju/hangman-compose/releases/download/desktop-latest/hangman-linux.rpm) |
| ๐Ÿค–๏ธ Android | [Download APK](https://github.com/RajashekarRaju/hangman-compose/releases/download/android-latest/hangman-android.apk) |
| ๐Ÿ“ฑ iOS | Run locally on macOS + Xcode: `bash scripts/run-ios-sim.sh` |

### Thanks to [Cicero Hellmann](https://github.com/cicerohellmann) For giving this cool idea to build Hangman game with Compose for Android.

## :sparkler: What's New: v0.2.0

- [x] Kotlin Multiplatform architecture (`app`, `composeApp`, `game-core`, `core/*`, `feature/*`, `navigation`)
- [x] Platform support: Android
- [x] Platform support: Web (WASM + GitHub Pages)
- [x] Platform support: Desktop (JVM: macOS/Windows/Linux)
- [x] Platform support: iOS (Xcode project + simulator flow)
- [x] Gameplay: 60-second timer per level
- [x] Gameplay: hints (`Reveal`, `Eliminate`) with cooldown
- [x] Gameplay: persistent game settings + history
- [x] Gameplay: scoring improvements
- [x] Difficulty: Introduced `VERY_HARD` difficulty for words >= 11+ chars
- [x] Categories: Introduced new categories and extended vocabulary.
- [x] Responsive game layout (mobile/desktop/web) with previews and shared creepy design system.
- [x] Cross-platform sound support (Android/Web/Desktop/iOS)
- [x] Navigation3 update

### Screenshots (v0.2.0)

#### Foldable

| Onboarding | Game | History |
| --- | --- | --- |
| ![Foldable Onboarding](/assets/fold_onboarding.png) | ![Foldable Game Screen](/assets/fold_game_screen.png) | ![Foldable History](/assets/fold_game_history.png) |

#### Mobile

| Onboarding | Game | Summary |
| --- | --- | --- |
| ![Mobile Onboarding](/assets/mobile_onboarding.png) | ![Mobile Game Screen](/assets/mobile_game_screen.png) | ![Mobile Game Summary](/assets/mobile_game_screen_summary.png) |

| History | Select Category | Select Difficulty |
| --- | --- | --- |
| ![Mobile History](/assets/mobile_game_history.png) | ![Mobile Select Category](/assets/mobile_select_category.png) | ![Mobile Select Difficulty](/assets/mobile_select_difficulty.png) |

## Initial Version (v0.1.0)

- [x] Players will be challenged with unique words only.
- [x] Players can view their score/game history.
- [x] Players should know how many unique words can still guess.
- [x] Players can see how many attempts they have to guess the word.
- [x] Players can try out letters in any order they want.
- [x] Players can to know how many points made when I completed a word.
- [x] Players can to know how many points scored by completing all levels.
- [x] Persist the game state at any point of the game.

## Local Development

### Common commands

- Run Android app:
- `./gradlew :app:assembleDebug`
- Run Desktop app:
- `./gradlew :composeApp:desktopRun`
- Run Web locally:
- `./gradlew :composeApp:wasmJsBrowserDevelopmentRun`
- Build Web distribution:
- `./gradlew :composeApp:wasmJsBrowserDistribution`
- Run iOS simulator (from repo root, macOS + Xcode required):
- `bash scripts/run-ios-sim.sh`

### Tests

- CI-equivalent local test run:
- `./gradlew :app:testDebugUnitTest :game-core:desktopTest :feature:onboarding:desktopTest :feature:game:desktopTest :feature:history:desktopTest`
- Broader KMP module tests:
- `./gradlew :composeApp:allTests :core:data:allTests :core:designsystem:allTests :feature:common-ui:allTests :feature:game:allTests :feature:history:allTests :feature:onboarding:allTests :game-core:allTests :navigation:allTests`

## CI / Releases

- `.github/workflows/tests.yaml`
- Runs on pull requests
- Runs JVM unit + desktop tests
- Runs Android instrumentation on push/workflow_dispatch
- `.github/workflows/pages-production.yml`
- Deploys web app to GitHub Pages
- `.github/workflows/packages.yml`
- On `master` push:
- builds Android APK
- builds desktop installers (DMG/MSI/DEB/RPM)
- updates release artifacts

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md).

- Open an issue for bugs.
- Open a discussion for feature ideas.
- Send a PR with focused changes and passing checks.

## Credits

- Game sounds: [Pixabay](https://pixabay.com/)
- Font: [Creepster](https://fonts.google.com/specimen/Creepster#about)
- Icons/background assets: modified assets from [unDraw](https://undraw.co/) and [iconscout](https://iconscout.com/)
- Sound license documents: [pixabay-license](https://github.com/RajashekarRaju/hangman-compose/tree/master/pixabay-license)

## License

Apache License 2.0. See [LICENSE](LICENSE).

```
Copyright 2022 Rajasekhar K E

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```