Font Size: a A A

Design And Application Of A Mobile Game Client Framework Based On Unity3D

Posted on:2019-09-03Degree:MasterType:Thesis
Country:ChinaCandidate:J GongFull Text:PDF
GTID:2428330563993378Subject:Computer technology
Abstract/Summary:PDF Full Text Request
In the mobile game development process,there are lots of common and repetitive problems such as view presentation and management,view transition event processing,data transmition between subsystems.However,there lacks solutions to these problems in commercial game engines.Aware of aforementioned problems,a generic game framework was designed and implemented in this thesis,which employed multiple design patterns and some innovative ideas.Firstly,three major components of the game framework were presented.They are the game framework core,event center and navigator.The core is based on dependency injection and is interface-oriented.It dramatically decouples the system and makes it flexible and extensible.The event center is based on observer pattern,which ensures efficient and loosely-coupled data transmition in the system.It decouples the publisher and the subscriber.With the employment of the enumeration type,to add an event,we only need to add an enumeration item,which ensures type safety,and makes the event-oriented programming more convenient and flexible.The navigator in the framework is based on reflection and factory pattern and is responsible for the life cycle operation of the view,loading the transition information and handles the transition events,and eliminates the conventional tedious and repetitive operations such as setting the jump target in the code.To solve the explosion of lines in the configuration file which is resulted by factory pattern with reflection,a special unity plug-in is innovatively designed and implemented for the transition editing,which enables the user to directly select the source of the transition event and specify its target view and controller and to easily find the controller script corresponding to a target view from the editor,which improved the editing efficiency.Lastly,the framework was applied in the refactor process of game "The Clash of Animals".The framework effectively decouples the services in the game and demonstrated its usefulness,making the code of the game loosely-coupled,testable,extensible and easy to maintain.
Keywords/Search Tags:Mobile Game Development, Unity3D, Event, Client Framework, Navigator
PDF Full Text Request
Related items