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 ...
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.