Skip to content

CCernusca/petal-drift

Repository files navigation

Petal Drift

An arcade scrolling game for Android where you guide a petal through a wildwood landscape to restore lost flowers using vertical momentum.

image

Gameplay

You control a white petal drifting through a side-scrolling forest. Hold the screen to catch a gust of wind and rise; release to let gravity pull you down. Navigate through gaps in vine obstacles while collecting and delivering colored petals to bald flowers.

image
  • Collect floating colored petals — they trail behind you in a chain (up to 25)

  • Deliver by flying into a flower whose required color matches the lead petal of your trail

    • Correct match: flower blooms, nearby vines retreat, +150 score
    • Wrong color: flower vanishes, −30 score
  • Complete a species (all petals of one color delivered): +500 bonus, loose petals of that color clear from the level

  • Die by hitting a vine or the bottom of the screen

  • Pause the game by pressing the pause symbol at the top to view your stats or quit to menu

  • image

The goal is to restore all flower species before dying.

Scoring

Event Score
Collect floating petal +10
Correct flower delivery +150
Wrong color delivery −30
Complete a species +500
image
  • View your exact achievements
  • Marvel at procedually generated bouquets showing your progress
  • Save & Share your bouquets

Scoreboard

image
  • Saves all previous attemps
  • Shows scoring screen again when clicked

Tech Stack

  • Language: Kotlin
  • UI: Jetpack Compose with Canvas-based rendering
  • Min SDK: 24 (Android 7.0) — Target SDK: 36 (Android 15)

Project Structure

app/src/main/java/com/ccernusca/petal_drift/
├── GameEngine.kt        Physics, collision, spawning, game state
├── GameScreen.kt        Rendering (Canvas) and input handling
├── MainActivity.kt      Entry point and screen navigation
├── MenuScreen.kt        Title screen with parallax background
├── DrawUtils.kt         Tree drawing utilities
├── ScoreRepository.kt   High score persistence (SharedPreferences)
├── ScoreScreen.kt       Victory / defeat summary
└── ScoreboardScreen.kt  High score leaderboard

Building

Open in Android Studio and run on a device or emulator (API 24+), or build from the command line:

./gradlew assembleDebug

Use