Skip to content
Ozan Doruk Yavuz logo Ozan Doruk Yavuz

Online Okey Game

For the PiPlayBox group project, I designed the UI on mobile and developed the online logic for Okey tiles and gameplay actions for each player in their sessions using pure Flutter and Dart. Player moves on the frontend are sent to the server with socket communication from Raspberry Pi device. Thanks to this communication, game logic is synced and simultaneously updated on both the mobile game and 3D desktop simulation for the admin.

  • Flutter
  • Dart
  • Android Studio
  • C++
  • Git
  • GitHub

PiPlayBox is a group project where game sessions are shown in 3D on a desktop and played locally with friends on mobile, with a Raspberry Pi server tying it together over web sockets. My part was the mobile side.

System diagram
The system.

I enjoyed working with the desktop and server teams, but the mobile app was my responsibility: the UI (profiles, lobbies, the Okey game) and the logic behind it.

Mobile UI
The UI parts I built
  • Sign-in that works over the web sockets.
  • A profile screen that loads each user's info and picture.
  • Lobbies that show the game type and where players sit, up to four.
  • Page and route management for the app.
Okey tiles

I also wrote the whole multiplayer Okey logic from scratch in Flutter and Dart, without a game engine.

The multiplayer logic
  • Every tile and rack, assigned to each player.
  • Turns that start with an extra tile and pass to the right as it is tossed.
  • Players wait for the active player's draw, but can still arrange their own tiles.
  • Two separate game sessions running at the same time.
End game
The game rules
  • The joker tile that can stand in for any tile.
  • Valid tile orders: repeats up to four, or runs of increasing numbers.
  • End-game checks for the right order and spacing.
  • Passing a tile to the right, and drawing from the left or the middle.
  • The draw case when the middle is empty.
  • Scoring from the tiles left on each player's rack.

The workload and the time were a challenge, but it was good practice. In an agile team I saw how much teamwork and communication matter, and I am grateful for the people I worked with.

Questions

What did you build on this project?

The mobile UI and the full multiplayer Okey logic, written in Flutter and Dart with no external game engine.

How do players stay in sync?

Moves go to a Raspberry Pi server over web sockets, and the game state updates on both the phones and a 3D desktop view at the same time.