Compose UI Canvas API Community Challenge

ScribbleDash

A highly interactive digital canvas drawing app exploring raw Android UI drawing performance in Jetpack Compose.

ScribbleDash Mockup

The Overview

ScribbleDash is a drawing app that pushes Android's native drawing APIs through Jetpack Compose. Game modes like "One Round Wonder" challenge the player with canvases of increasing difficulty, with real-time gesture capture, vector stroke rendering, and an Undo/Redo history stack.

The Challenge

Drawing in Compose means recalculating Bezier paths on every pointer event. Without a careful rendering strategy, the draw loop stutters.

It gets harder once you keep paths in memory for an Undo/Redo stack of custom brush strokes (long sessions can hit out-of-memory errors fast), while still keeping the package layout clean enough to extend later.

Architecture & Technical Decisions

The drawing surface is a native Jetpack Compose Canvas wrapped in a multi-package layered architecture.

Instead of redrawing the full canvas on every frame, paint strokes are cached as Path objects so deep recomposition only fires when it has to. The Undo/Redo state holds the last few vectors for fast cycles. The app is single-module, but packages like features/gamemodes/ and features/draw/ are kept horizontally isolated so a new game mode can be added without bleeding logic across boundaries. Koin handles dependency injection, keeping each game mode's state decoupled from the Compose UI layer.

Impact & Results

  • Consistent 60FPS draw loop, achieved by narrowing recomposition scope under high-frequency pointer events.
  • Undo/Redo engine that holds up across long sessions without runaway heap growth.

The Tech Stack

Language Kotlin
UI Framework Jetpack Compose
DI Framework Koin
Design System Material Design 3
Testing & Debug JUnit & Timber