Building an Offline Android Multiplayer Game Without a BackendBuilding an Offline Android Multiplayer Game Without a Backend
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
No internet. Two phones. One game. How do you make that work?
When I built PlayTable, an Android app of 2-player games, the goal was simple. Friends should be able to play together anywhere, even with no Wi-Fi or mobile data.
The hard part was connecting two phones without any server. Here is how I solved it
- Bluetooth for direct phone-to-phone play
- Network Service Discovery (NSD), so phones on the same Wi-Fi find each other with no room codes
- Socket connections to keep every move in sync
- Pass and play mode for when there is only one phone
All built natively in Kotlin with Jetpack Compose.
The lesson for me. Not every app needs a backend. Sometimes the best feature is that it keeps working when the internet does not.
Have you ever built something that had to work fully offline? What was the trickiest part?
Post image
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started