基于 unity3d 的塔防游戏的设计与实现摘 要塔防,即炮塔防御(Tower Defence),也统称 TD ,指一类通过在地图上建造炮塔或类似建筑物,以阻止游戏中敌人进攻的策略型游戏,要有阵图。塔防受众很广,游戏模式简单而且可玩性极强,时至今日,塔防在游戏应用中依然是最热门的下载类型之一,比较经典的像《植物大战僵尸》。本设计使用当前流行的跨平台游戏引擎 Unity3d,编程语言为 C#。在游戏中,玩家可以在任何空白的地块上建造各种防御塔用于攻击不同类型的怪物,怪物会按照预定的路线前进,当进入目的地的怪物到达一定数量后游戏会失败;当进入目的地的怪物没有到达指定数量且所有怪物都被击杀后游戏通关。使用 Unity3d 引擎来设计让 UI、游戏地图的布置大幅简化。并通过使用拓展性强的类,使得开发者能快速添加新的怪物、防御塔等提高开发效率的同时,还降低了游戏的开发成本。本文主要从选题背景与意义、可行性与需求分析、游戏设计与功能实现、测试等四个方面,按照制作的流程对本次设计进行论述,对开发的思路、实现以及实现过程中的主要问题都予以描述记录。关键词:游戏;塔防;Unity3d;PC1Design and Implementation of a virtual city building gameAbstractTower defense, that is, turret defense, also known as TD, refers to a kind of strategic game that blocks the enemy's attack in the game by building turrets or similar buildings on the map. Tower defense has a wide audience, simple game mode and strong playability. Today, tower defense is still one of the most popular download types in game applications, such as the classic "Plants vs. Zombies".This design uses the current popular cross platform game engine unity3d, and the programming language is C. In the game, players can build various defense towers on any blank land to attack different types of monsters. Monsters will advance according to the predetermined route. When the number of monsters entering the destination reaches a certain number, the game will fail. When the number of monsters entering the destination does not reach a s...