Font Size: a A A

Research And Design Of Game Engine Based On HTML5

Posted on:2018-01-21Degree:MasterType:Thesis
Country:ChinaCandidate:S S JiaFull Text:PDF
GTID:2348330515484671Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Driven by the world's major Internet vendors,HTML5 technology has been rapidly researched and applied.Among them the game engine based on HTML5 is an important tool for HTML5 game development.Currently,game engine based on HTML5 mainly has Egret,Cocos2d-JS and so on,these engines are powerful and ideal for developing heavy games.However,in the current Internet,most of the HTML5 game is small,light,and a large part of them ar e not based on game engine,these caused the low utilization rate of the code,maintenance difficulties,long development cycle,debugging difficult issues.Regarding the issue above,this article is based on the study of existing HTML5-based game engines,designs and implements a small HTML5 game engines which suit for the development of small and lightweight game and improves and implements a collision detection algorithm which based on mixed monkey algorithm,and the algorithm has been applied to the game engine.The main work of the paper is as follows:(1)In the game engine,using HTML5 Canvas technology to implement t he rendering of the game elements.Engine adopts modular development method,dynamic manage dependence between the module,makes the module independent of each other,avoids the conflict between logic and game engine core,improves the scalability of the engine.Engine combines event handling mechanism to the engine's development and implementation,this greatly improves convenience between the parts of game engine's mutual communication,and makes the coupling between the parts is reduced greatly,and the mechanism also provides custom event capabilities for engine users.Engine provides the perfect aspect oriented programming mechanism,which can make the logic of the game separate from other operation,improve the degree of maintainability.(2)This paper improves and implements a collision detection algorithm which based on mixed monkey algorithm,the algorithm uses the principle of the shortest distance calculation between objects to carry out collision detection,experiments show that the algorithm can be more accurate calculation of the object spacing.(3)This paper designed the engine running process,the game development process and the overall structure of the engine,and the function design and concrete realization of each module of the engine are descr ibed in detail.And perform all functional tests on all modules of the engine,completed verification of the feasibility of the engine by two lightweight game cases based on this engine.Experimental results show,the game engine degined and implemented by this paper,can be used to quickly develop light games,has good maintainability and scalability.
Keywords/Search Tags:HTML5, Game engine, Canvas, Collision detection, Mixed monkey algorithm
PDF Full Text Request
Related items