随着各种技术的发展,尤其是编程语言飞速发展而诞生的一项新的开发语言。坦克大战是基于unity语言设计开发的,本设计采用面向对象的设计模式,对游戏中的所有物体赋予对象的概念和属性。在开始游戏后,启动客户端,在主程序运行的线程中,画面刷新将以一定的频率采用双缓冲技术对屏幕重绘,实时反映整个游戏的进行状态。用户控制的坦克运行在主线程中,随屏幕刷新的频率而移动。坦克将在游戏开始时进行初始化,然后将坦克绘制在地图的上层。本设计主要实现的功能是让坦克能向八个方向移动,并且打出炮弹,子弹击中敌人坦克,子弹和敌人坦克同时消失,产生爆炸,敌方坦克能智能的移动并且打出炮弹。能够支持单人对战和两人对战两种模式。
本游戏通过Microsoft Visual Studio 2017平台开发环境及环境搭建,坦克大战游戏应用程序采用C/S模式,从需求分析到系统的设计、实现、调试,最终实现实现坦克大战游戏的功能。并经过严格的测试,可以在手机上正常使用。
关键词:unity;游戏引擎;游戏;坦克大战
With the development of various technologies, especially the rapid development of programming language, a new development language is born. Tank war is based on unity language design and development, this design uses object-oriented design pattern, all objects in the game are given the concept and attribute of the object. After starting the game, start the client. In the thread of the main program, the screen refresh will redraw with double buffer technology at a certain frequency to reflect the status of the whole game in real time. The user controlled tank runs in the main thread and moves with the frequency of screen refresh. The tank will be initialized at the beginning of the game and then drawn on the top of the map. The main function of this design is to make the tank move in eight directions, and hit the enemy tank, the bullet and the enemy tank disappear at the same time, produce explosion, the enemy tank can move intelligently and hit the shell. It can support single player versus two player versus two mode
The game through the Microsoft Visual Studio 2017 platform development environment and environment construction, tank war game application using C / S mode, from the demand analysis to the system design, implementation, debugging, and finally realize the function of tank war game. After strict testing, it can be used normally on mobile phones.
Key words: unity; game engine; game; tank battle