摘 要:本文使用Unity 中的NetWork 组件实现局域网的互联,搭建游戏场景,在场景中以第一人称视角控制人物角色,进行游戏对战。在游戏设计过程中,添加了人物视野,使人物能够自由切换视角。游戏中人物的每个动作有相应的动画,做下一个动作后,会取消之前的动画,当给人物添加枪支后,能产生子弹、发射子弹,并设计了子弹的移动路线,当子弹射出时,有闪光动画以及子弹射到物体上的弹痕效果,实现了人物的血量和子弹的伤害值计算,在游戏中找到敌人并将他射死,那么游戏就会结束。这款3D 射击游戏最终实现了局域网多人对战,相对于以往的射击游戏有着更加良好的视听效果以及丰富的游戏体验。
关键词:射击游戏;角色控制;Unity3D;游戏设计
中图分类号:TP317 文献标识码:A 文章编号:2096-4706(2019)24-0089-04
The Design and Implementation of Shooting Game Based on Unity3D
XIE Honglan
(Jiangxi Youth Vocational College,Nanchang 330045,China)
Abstract:The paper uses the Unity of network components for LAN interconnection,build game scenes in the scene to control the characters in the first person perspective,the game play against. In the game design process,it adds character vision,so that people can be free to switch perspective. In the game,characters each action there is a corresponding animation,do the next action,cancels the panimation;when people add to firearms,to produce bullets,firing bullets,bullet design movement routes;when a bullet was fired,there is a flash animation and effects bullet strikes on the object;people realized the damage value calculated blood and bullets;find the enemy in the game and he was shot,then the game will end. The 3D shooter ultimately LAN multiplayer,compared with the previous shooter has more good visual effects and a rich gaming experience.
Keywords:shooting game;character control;Unity3D;game design
参考文献:
[1] 孙嘉谦.Unity 3D 详解与全案解析:基于多平台次世代手游《黑暗秩序》 [M]. 北京:清华大学出版社,2015.
[2] DEAN J.Unity Character Animation With Mecanim [M].Birmingham:Packt Publishing,2015.
[3] 刘俊生,陈煜.3ds Max 游戏场景制作 [M]. 湖北:华中科技大学出版社,2015.
[4] 黄远,许广彤. 游戏动画设计与制作 [M]. 北京:人民邮电出版社,2009.
[5] KENNY L.Unity着色器和屏幕特效开发秘笈 [M].晏伟,译. 北京:机械工业出版社,2014.
作者简介:谢宏兰(1974.10-),女,汉族,江西宁都人,讲师,本科,主要研究方向:计算机图形图像、高职教育。