Getting started with the Snake game
To get started, make a new project called Snake
. This time, we will use the Empty Activity template as we will not be creating any UI whatsoever.
- Rename the Activity Name to
SnakeActivity
. - Uncheck the Generate Layout File option—we do not want a layout generated as we will be laying out every pixel ourselves.
- Uncheck Backwards Compatibility (AppCompat)—we won't need it for our game and it will still run on almost every phone and tablet. We will be working with the plain vanilla
Activity
class in this final project.
Note
All the code and assets for this project are in the Chapter 28
folder of the download bundle. Note that for this project, the completed game, as it will be by completing the steps up to the end of ...
Get Android Programming for Beginners - Second Edition 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.