A modern Android implementation of the popular party game "Heads Up!" where players have to guess words displayed on their phone screen based on their friends' clues while holding the phone to their forehead.
- Multiple themed decks (Pop Culture, Mime, Animals, Celebrities)
- Motion-based gameplay using device sensors
- Real-time video recording of gameplay sessions
- Interactive animations and particle effects
- Sound effects and countdown timers
- Score tracking and game statistics
- Dynamic word loading from JSONBin.io API
- Responsive UI with material design elements
- Android Studio Arctic Fox or newer
- Android SDK 33 or higher
- Java 11
- Device with:
- Accelerometer sensor
- Gyroscope sensor
- Front-facing camera
- Internet connection
- AndroidX Libraries
- Material Design Components
- Retrofit2 for API calls
- CameraX for video recording
- GSON for JSON parsing
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
- Clone the repository:
git clone https://github.com/yourusername/headsup.git
-
Open the project in Android Studio
-
Sync Gradle files
-
Build and run the application
- Launch the app and select a deck category
- Hold the phone in landscape orientation to your forehead
- Wait for the countdown timer
- Friends describe the word shown on screen
- Tilt phone down for correct guess, up to pass
- View your score and recorded video at the end
The app follows a modular architecture with distinct components:
APIManager
: Handles API calls to fetch word listsCameraManager
: Controls video recording functionalityGameSensorManager
: Manages device motion sensorsSoundManager
: Handles game sound effects
CardFlipAnimator
: Manages card flip animationsCircularTimerView
: Custom view for countdown timerParticleSystem
: Handles particle effectsShakeAnimator
: Controls shake animations
Deck
: Represents game categoriesWordResult
: Stores word attempt resultsCardResponse
: API response model
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />