Checkmate on Compose Part 1
Article Summary
Zsolt Kocsi from Bumble built a chess app in Jetpack Compose to solve a problem that's frustrated beginners for years: engines tell you a move is bad, but never explain why.
As Bumble's team adopted Compose, Kocsi created Chesso, an open-source chess app with a unique twist: visual overlays that show pressure on squares, blocked pieces, and escape routes. This deep dive covers the architecture decisions behind building a moderately complex game in Compose, from data modeling to UI state management.
Key Takeaways
- Separate Board, GameSnapshotState, GameState, and GamePlayState into distinct layers
- Use pseudo-legal moves filtered by check constraints for all edge cases
- Pass UI state to composables, not business logic state
- Include selection state in LazyList keys to prevent rendering bugs
- MutableState objects beat delegation for managing multiple dialog states
Critical Insight
Building a chess app revealed that Compose handles UI state brilliantly, but complex game logic still benefits from traditional Reducer patterns.