基于Lua语言的多平台高效移动应用引擎的深入研究与实现
本文选题:多平台 + Lua ; 参考:《北京邮电大学》2016年硕士论文
【摘要】:智能终端和4G网络的发展揭开了移动互联网的新时代,移动应用开发市场前景广阔。当下移动应用繁多,更新换代频繁,只有品质过硬、开发迅速并且有创新功能点的移动应用才能获得更大的市场优势。目前市场上的一些引擎涵盖了游戏开发的全套解决方案,但在具体项目开发中仍存在一些问题,例如易用性不高、底层核心库过于庞大、开发难度较高等。在上述背景下,本文研究了如何高效快速开发跨平台移动应用的问题。本课题对Lua与C++的交互理论进行了深入研究,基于分层、OCP等多个设计原则,构建了两大层高效移动应用引擎结构:其一是结合Cocos2d-x和自主实现的C++模块的底层重组引擎,其二是基于Lua语言的上层通用模块引擎。两层相结合后,用户可以只进行游戏业务逻辑的开发,极大地缩短了开发周期。同时,本文对应用的跨平台移植过程进行了详细的研究与实现。为了能够更加快速地开发应用,课题研究并实现了许多通用模块,其中包括UI、场景绘制、资源管理、声音处理、数据存储和资源加载等模块。此外,为了提高开发效率、丰富引擎,引擎还从开发者角度出发,设计并实现了许多开发过程中需要使用到的便捷功能和算法,例如CSV解析工具、调试模块、脚本打包更新机制和一些人工智能算法等等。基于上述研究,本文提出并实现了一种具有可移植性、通用性和高效性的多平台移动应用引擎。本课题的另一个重点研究内容是一种基于Cocos2d-x开源引擎的Sprites碎片动画技术,本文对传统游戏动画技术进行了理论研究与分析,同时结合现有的动画需求,提出了一种新型的碎片动画技术。在文中对该碎片动画技术实现的整体流程进行了详细的介绍。首先介绍了作为本技术核心部分的Sprites碎片动画动作实现类和动作管理类的构造原理;其次在引擎的碎片动画和图形渲染的基础上,介绍了 Sprites碎片动画技术在内存和资源管理等方面的优化;最终介绍了在Lua多平台高效引擎中使用Lua语言对其进行封装引用的通用方案。基于此Sprites碎片动画技术,移动应用可以在节省内存的基础上,开发出丰富的动画效果。最后基于测试技术理论的分析,采用黑盒功能测试方法,辅助白盒脚本测试方式对本文提出的引擎框架进行了功能测试和扩展性测试。通过两个具体项目开发的实际效果图、各项测试数据、扩展代码耦合度、开发周期等结果的分析,论证了基于Lua语言的多平台移动引擎的可靠性、高扩展性和高效性。
[Abstract]:The development of intelligent terminal and 4G network has opened a new era of mobile Internet and has a bright future in mobile application development market. At present, mobile applications are numerous, frequently updated, and only mobile applications with excellent quality, rapid development and innovative functions can gain greater market advantages. At present, some engines in the market cover the full range of solutions for game development, but there are still some problems in the development of specific projects, such as low ease of use, too large core library, and high difficulty in development. Under the above background, this paper studies how to develop cross-platform mobile applications efficiently and quickly. In this paper, the interaction theory between Lua and C is deeply studied. Based on several design principles, two layers efficient mobile application engine structure is constructed: one is the bottom recombination engine which combines Cocos2d-x and C module. The second is the upper general module engine based on Lua language. After combining the two layers, the user can only develop the logic of the game business, which greatly shortens the development cycle. At the same time, this paper carries on the detailed research and the realization to the application cross-platform transplant process. In order to develop applications more quickly, many general modules are studied and implemented, including UI, scene rendering, resource management, sound processing, data storage and resource loading. In addition, in order to improve the development efficiency and enrich the engine, the engine also designs and implements many convenient functions and algorithms that need to be used in the development process, such as CSV parsing tools, debugging modules, etc. Script package update mechanism and some artificial intelligence algorithms and so on. Based on the above research, this paper proposes and implements a portable, universal and efficient multi-platform mobile application engine. Another important research content of this subject is a Sprites fragment animation technology based on Cocos2d-x open source engine. This paper makes a theoretical research and analysis on traditional game animation technology, and combines with the existing animation requirements. A new debris animation technique is proposed. In this paper, the whole process of the implementation of the fragment animation technology is introduced in detail. This paper first introduces the construction principle of Sprites fragment animation implementation class and action management class, which is the core part of this technology; secondly, on the basis of the engine fragment animation and graphics rendering, This paper introduces the optimization of Sprites fragment animation technology in memory and resource management, and finally introduces the general scheme of encapsulating and referencing it with Lua language in Lua multi-platform efficient engine. Based on this Sprites fragment animation technology, mobile applications can develop rich animation effects on the basis of saving memory. Finally, based on the analysis of the theory of test technology, the function test and extensibility test of the engine framework proposed in this paper are carried out by using the black box function test method and the auxiliary white box script test method. Through the analysis of the actual effect diagram, test data, extended code coupling degree and development cycle of two specific projects, the reliability, high extensibility and high efficiency of the multi-platform mobile engine based on Lua language are demonstrated.
【学位授予单位】:北京邮电大学
【学位级别】:硕士
【学位授予年份】:2016
【分类号】:TP311.52
【参考文献】
相关期刊论文 前9条
1 宋梅;;4G移动互联网时代的思考[J];计算机光盘软件与应用;2014年09期
2 陈华;;基于创新视角的软件设计编程研究[J];无线互联科技;2012年06期
3 陆钢;朱培军;李慧云;文锦军;;智能终端跨平台应用开发技术研究[J];电信科学;2012年05期
4 谷艳昭;苏贵斌;曹森;;面向对象设计中的设计原则实践[J];软件导刊;2012年02期
5 邓正阳;陈和平;苏鹏;;动态脚本语言Lua与C++交互方法的研究与实现[J];计算机系统应用;2010年05期
6 李广松;陈荣征;;基于Lua的网络游戏脚本系统设计[J];现代计算机(专业版);2009年12期
7 张文瑞;;游戏开发的脚本机制及其应用[J];科技情报开发与经济;2009年09期
8 于造波;;脚本技术在游戏引擎中的应用[J];电脑知识与技术;2008年19期
9 周政春;吴楷;万旺根;;内存管理算法优化及在游戏引擎中的实现[J];微计算机信息;2006年15期
相关硕士学位论文 前10条
1 李勇;基于Cocos2d-x引擎的游戏架构设计与实现[D];北京邮电大学;2015年
2 李旭;多平台移动游戏移植方案设计与实现[D];北京交通大学;2014年
3 刘廷勇;基于iOS的移动多媒体交互应用的研究与实现[D];北京邮电大学;2014年
4 谢宾;小型2D游戏引擎设计和实现[D];电子科技大学;2013年
5 周飞龙;Cocos2d-X引擎中MVC框架的设计与实现[D];华中科技大学;2013年
6 王琦;简单游戏引擎的设计与开发[D];吉林大学;2012年
7 丁静;基于Google云平台的iOS游戏社区[D];大连理工大学;2012年
8 翟鑫瑞;基于状态机的交互式角色动画实时感知与模拟技术研究与实现[D];电子科技大学;2012年
9 潘婧;手机游戏软件界面交互的设计与实现[D];华中科技大学;2011年
10 袁会杰;骨骼动画技术的研究与实现[D];电子科技大学;2010年
,本文编号:1990408
本文链接:https://www.wllwen.com/kejilunwen/ruanjiangongchenglunwen/1990408.html