Learning Kotlin by Building Android Games
Learn Kotlin from scratch and build Android games on the Canvas API — with AI to speed you up. The whole book, free to read online.
Reading online is completely free — browse the contents below and start anywhere. Prefer it on your shelf or your Kindle? It's on Amazon too.
A few screens from the book — a glimpse of the Android games you'll build.




Never written a line of code? Start here. You'll learn Kotlin the way it's actually used — by building Android games on the Canvas API, one project at a time, with every idea introduced because a game needs it. The pace is gentle at the start and real by the end: a threaded game loop, sprite sheets and sound, and a complete Star Defender you build across the final chapters, with AI brought in to turbo-charge the work. The whole second edition is free to read online.
What you'll build
Contents
Thirty chapters and three appendices, every one free to read online — with a hands-on project roughly every other chapter. Start at the beginning, or jump to whatever you want to see first.
Before the code: what you'll build, who the book is for, and how to get the most from it.
From your first app to a complete Fruit Catcher, learning Kotlin one small game at a time.
if and when so your code can react.
5Interactive Tap ProjectRespond to the player's touches and draw to the Canvas.
6Loops and IterationRepeat work without repeating yourself, with for and while.
7Pattern Drawer ProjectPut loops to work drawing patterns on the Canvas.
8FunctionsBreak a program into named, reusable pieces you can call anywhere.
9Act 1 Capstone: Fruit Catcher ProjectPull the act together into a complete catch-the-fruit game.
Collections, lambdas and null safety — the structure for something larger.
Object-oriented Kotlin, a threaded game loop, and real-time graphics and sound.
Real-world Kotlin, building with AI, and a complete final game across three chapters.
Quick references, and a place to look things up.
