Learning Kotlin by Building Android Games — book cover
✓ Free online edition

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.

30 Chapters Kotlin Android AI-assisted

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.

30chapters, free online
16games & projects you build
4Acts, from scratch to shipping
£0no sign-up, no paywall

A few screens from the book — a glimpse of the Android games you'll build.

An endless runner on an Android phone — a character running across a blue sky with grass and a brick platform.
A full endless runner, on Android.
A particle swarm on a phone — hundreds of particles drifting across the screen.
Hundreds of particles, driven by a list.
A tap-the-enemies game on a phone — blue squares and red circles descending, with score and lives.
A hierarchy of enemies, built with inheritance.
Star Defender on a phone — a space shooter with the player's ship, enemies and bullets, showing score, lives and wave.
Star Defender — the finished final game.

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

Bouncing Ball Fruit Catcher Particle Swarm Level Grid Lambdas & null safety OOP in Kotlin Threaded game loop Sprites & audio Endless Runner Vibe Runner (AI) Vibe Space Shooter (AI) Star Defender

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.

Start here

Before the code: what you'll build, who the book is for, and how to get the most from it.

More to explore

Android Programming for Beginners →

Go beyond games into full Android apps — Kotlin, Jetpack and real-world apps, now in its 4th edition.

Learning C++ by Building Games →

Prefer C++? The same hands-on approach, from a blank file all the way to a roguelike. Free to read online.