Book Image

Python Game Programming By Example

Book Image

Python Game Programming By Example

Overview of this book

Table of Contents (14 chapters)
Python Game Programming By Example
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

The tower defense gameplay


The genre of tower defense challenges the player to stop enemy characters from reaching a certain position by placing strategically different towers so that they can defeat the enemies before they arrive at that point. The towers shoot autonomously towards the enemies that are within their firing range. The game is over when a concrete number of enemies reach the end point.

In our version, the scenario will be a meandering road in the desert, and we have to protect a bunker that is placed at the end of this road, as shown in the following screenshot. At the far end, enemy tanks will be spawning randomly, and we must place turrets that destroy them before they reach our bunker. The turrets can be placed in specific slots, and each turret spends part of our limited resources.