O'Reilly logo

Beginning Android Tablet Games Programming by Jeremy Kerfs

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Assembling Harbor Defender

Here is a breakdown of what Harbor Defender entails. In this section you explore these elements and how to handle them:

  • The pier: The blocks of the pier support your cannons and define the harbor through which the invading boats must navigate. The pier itself doesn’t do anything, but it’s used when referencing cannon placement. You use XML data to quickly code the location of each and every piece. Each piece is implemented as a sprite; sprite objects give you much more functionality than merely putting images on the screen.
  • Ground: The ground is part of the background, and you don’t test it or use it. It’s important, however, that you use it because it saves you from having to use a much larger and resource-intensive ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required