Pirates Code is an educational Android game designed to teach children basic programming logic through directional commands and puzzle-based navigation. Built using Kotlin and Jetpack Compose, the game includes animated gameplay, parent–child account linking, and automatic progress tracking.
Pirates Code introduces core programming concepts such as sequencing, planning, and testing through a visual, kid-friendly interface. Children guide a pirate ship across a grid by assembling directional commands, while avoiding obstacles and trying to reach the treasure.
Parents can register linked accounts and review the child’s performance through a dedicated dashboard.
- Direction-based programming (Up, Down, Left, Right)
- Three animated levels with increasing difficulty
- Obstacle types: Rocks, Shipwrecks, Whirlpools
- Visual grid with smooth animations
- Success / failure detection with contextual pop-ups
- Automatic tracking of:
- Moves used
- Level completions
- Attempts
- Total playtime
- Secure login for parents
- Access to detailed child statistics
- Clean parchment-style layout
- Statistics stored persistently on the device
- Data includes:
- Total moves
- Total completed levels
- Total attempts
- Total playtime (minutes/seconds)
- Parent and child accounts can both be created
- Accounts are stored locally for simplicity
- Parent login opens the statistics dashboard
- Child login launches the game
- Password-protected login for both roles
- Animated home screen with floating clouds and title sway
- Intro ship animation on launch
- Pirate-themed button animations (sway and press feedback)
- Supports phones and tablets
- Fully offline experience
- Clean architecture and repository-based user storage
- Kotlin
- Jetpack Compose
- Android ViewModel & State APIs
- File-based local persistence
- Animated UI (InfiniteTransitions, Tween animations)
com.example.pirates_code
│
├── data
│ └── UserRepository.kt
│
├── ui
│ ├── home
│ │ ├── HomeScreen.kt
│ │ └── ParentScreen.kt
│ ├── login
│ │ ├── LoginScreen.kt
│ │ └── RegisterScreen.kt
│ └── game
│ └── GameScreen.kt
│
└── MainActivity.kt
All child progress is saved to a local file inside the app’s internal storage.
The repository tracks:
- Total moves (added per run)
- Levels completed (incremented on success)
- Attempts (incremented every run)
- Playtime (measured per session)
These values update automatically after every gameplay attempt.
- Clone the repository
git clone https://github.com/JderenthalCS/Pirates_Code.git - Open the project in Android Studio
- Sync Gradle
- Run on a device or emulator (Android 8.0+ recommended)
This project is developed for educational and academic purposes.


