Introducing Harbor Defender

Harbor Defender is the name I’ve chosen for the game you begin in this chapter. The game surface consists of a fortress, a harbor defined by a pier, attacking boats, and cannons that can sink the attackers with bullets. Figure 8-1 is an image of the game surface you assemble by the end of this chapter. In Chapter 9 you add the user controls, but for now you need a surface that the player will eventually interact with. It gives you an idea how the mechanics will work.

images

Figure 8-1. The beta version of Harbor Defender

The object of Harbor Defender is to destroy ships approaching the fortress through the harbor before they can invade it. The player repels the boats by firing cannons located on the pier that encloses the harbor. Each of the pier pieces can hold one cannon, but the user must aim it in the proper direction. To make the game more challenging, users can’t create an unlimited number of cannons. Rather, users are given a limited number of cannons, and they must therefore be judicious in the cannons’ placement. As mentioned, in this chapter you set up the game environment; in the next chapter you add user interaction.

You can make the boats approach at increasing rates later, and the user will have to quickly delete and move cannons in order to maximize their efficiency. Now, let’s look at the items and activities that you must create in order to make this game a success.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.52.200