C H A P T E R  9

A One-Player Strategy Game

Part 2: Coding the Game

With the framework in place, you can now write the code to create a playable game. The trick here is always to make your code as efficient as possible. When games become more complex and involve more sprites, they can begin to slow as the processor struggles to keep up. You avoid this with some clever techniques that can ease the load.

Keeping the end goal in mind as you progress is also critical because you must have a functioning game before you can add the bells and whistles that differentiate your work from others. In fact, in my experience, knowing when to stop working on a game and release it is always the trickiest part. There is a fine line between a game that is too ...

Get Beginning Android Tablet Games Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.