~/talk

Building a Joystick Controller using Compose Multiplatform

Talkat AndroidMakers by droidcon 2024 · on Friday, 2024-04-26· at 15:20· [kotlin, flutter]

A working on‑screen joystick and full gamepad is implemented with Compose Multiplatform Gesture APIs using pointerInput and awaitPointerEventScope then routed through a single immutable gamepad state and per‑control handlers. Direction uses theta from atan2 and a polar to Cartesian conversion to cap the thumb at a fixed radius, D‑pad yields eight discrete values while analog gives continuous offsets, face buttons use circle packing, haptics use expect/actual generators, code is open source and demo runs on cloud gaming for iOS and Android.

AI-written summary · about

  1. 0:00Introduction
  2. 1:48Jam.gg controller challenges
  3. 2:31Compose gesture APIs
  4. 5:47First joystick prototype
  5. 7:53Joystick with trigonometry
  6. 15:17Full gamepad controls
  7. 18:07Input state architecture
  8. 23:08D-pad and analog controls
  9. 28:06Face buttons design
  10. 30:55Haptic feedback UX
  11. 33:22Gamepad layout
  12. 34:26Open-sourcing library
  13. 35:07Cross-platform demo
  14. 38:45Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.