摘要
文中利用Cocos2d-x游戏引擎,在Visual Studio 2017开发环境下,结合LUA脚本语言,开发一款适用于Android系统的休闲益智游戏,即"贪吃蛇"。首先提出Android游戏开发的总体框架,总结Android游戏开发涉及的关键技术,包括开发环境配置技术、逻辑功能设计技术及碰撞检测技术。对Cocos2d-x手机游戏引擎的部分源码进行深入分析,对不适用于贪吃蛇游戏框架搭建的代码采用继承、重写等方式进行改进。经测试表明,系统可实现贪吃蛇基本功能,对基于Cocos2d-x手机游戏的设计和实现有一定参考价值。
A relaxation puzzle game called Gluttonous Snake suitable for the Android system is developed in the Visual Studio 2017 development environment by using the Cocos2d-x game engine and combining with the LUA script language.The overall framework of Android game development is proposed.The key technologies involved in Android game development are summarized,including the development environment configuration technology,logic function design technology and collision de-tection technology.Part of source codes of the Cocos2d-x mobile phone game engine are deeply analyzed,and the codes unsuit-able for framework establishment of the Gluttonous Snake game are improved by using ways like inheritance and rewriting.The test results show that the system can achieve the basic functions of Gluttonous Snake,and has a certain reference value for de-sign and implementation of the mobile phone game based on Cocos2d-x.
作者
吴晓雪
何南
缪新颖
王魏
WU Xiaoxue;HE Nan;MIAO Xinying;WANG Wei(School of Information Engineering,Dalian Ocean University,Dalian 116023,China)
出处
《现代电子技术》
北大核心
2018年第24期106-109,113,共5页
Modern Electronics Technique
基金
国家自然科学基金项目(51679024)资助
辽宁省普通高等教育本科教学改革研究项目(UPRP20160333)资助
辽宁省国际教育"十三五"科研规划课题(16LNGJ045)资助~~