基于Unity的飞船大战游戏设计与开发
2021-08-09郭欣桐
郭欣桐
摘 要:该文讲述了基于Unity的飞船大战游戏的设计与开发过程,游戏以第三人称视角控制主角躲避太空陨石进行游戏对战。该系统以Unity为开发平台,加载三大游戏场景,即游戏开始场景、游戏关卡场景以及游戏结束场景。使用C#编程语言实现主角以及陨石的移动、主角发射炮弹攻击、主角与陨石碰撞以及炮弹伤害计算等游戏状态控制以及游戏核心功能。该系统最终实现了整个游戏流程通过友好的人机交互界面以及相关操作,增强用户的游戏乐趣,利用碎片化时间缓解压力、休闲放松。
关键词:游戏制作 Unity C# 飞机大战
中图分类号:TP311.5 文献标识码:A文章编号:1672-3791(2021)04(b)-0067-03
Design and Development of Ship War Game Bsed on Unity
GUO Xintong
(Heilongjiang college of business and technology, Harbin, Heilongjiang Province, 150025 China)
Abstract: This paper describes the design and development process of the spacecraft war game based on Unity. The game controls the protagonist to avoid the meteorite from the third person perspective for game to battle. The system takes Unity as the development platform, loading three major game scenes, the game start scene, the game level scene and the end of the game. The game state control and core functions of the game, such as the movement of the main character and meteorite, the attack of the main body launching shell, the collision between the protagonist and meteorite, and the shell damage calculation, are realized by using C # programming language. The system finally realizes the whole game flow through friendly human-computer interaction interface and related operations, enhance the user's game fun, and use fragmented time to relieve pressure and relax leisure.
Key Words: Game making; Unity; C#; Aircraft war
隨着电脑用户的不断增多,电脑游戏逐渐成为人们主要的休闲娱乐方式。根据现代人对电脑游戏的需求,设计开发一款游戏内容轻度、简单易操作的飞船大战游戏。Unity3D作为目前主流的3D游戏开发引擎,集图形、音频、物理和网络等多功能为一体,可编辑地形、搭建3D场景、通过其强大的物理引擎,模拟更加逼真的场景,增强游戏的真实性[1-2]。故该游戏采用Unity平台,搭建3D场景,选用Unity编程语言C#实现游戏基本流程以及核心功能。游戏类型定位为PUZ,即益智类游戏,采用第三人称视角,游戏规则简单,操作易上手,受众面较广。通过友好的人机交互界面以及玩家自身的游戏操作,达到增强用户游戏乐趣,利用碎片化时间缓解压力、休闲放松的目的[3]。
1 游戏设计开发准备
1.1 开发工具以及编程语言
Unity3D是一款功能强大,一次性多平台开发的交互式游戏引擎。……
