Font Size: a A A

Design And Implementation Of AI Game Framework Based On Extensible State Machine

Posted on:2022-05-13Degree:MasterType:Thesis
Country:ChinaCandidate:D G LuFull Text:PDF
GTID:2518306527454934Subject:Software engineering
Abstract/Summary:PDF Full Text Request
With the popularization of smart terminals,casual game has become to a kind of entertainment suitable for everyone.Because of the use of more and more excellent artificial intelligence algorithms in the process of design,the casual game has been more interesting and educational,and it becomes simpler and easy-to-use.For developer,the difficulty of development process has been greatly reduced due to the game engine in the market.However,for different game request,the developer still needs to design and develop the structure above the engine layer according to the specific gameplay.According to the problems above,the thesis analyzes the structure of common casual games,and provides an AI game framework based on an extensible state machine.Based on the game framework in the article,there are four embodiments developed and shown in the paper,and which are respectively named as: Beast Chess,Greedy snake,Duck Fighting,and World of Tanks.The specific research content includes:(1)Demand analysis for a game framework development.Propose the functional requirements,performance requirements and structural requirements of a game framework according to the in-depth research for a game request,which lays a solid foundation for proposing a reusable,easy-to-use,and extensible game framework.(2)Detailed design of the game framework development.Using the object-oriented technology,divide the game framework into modules and design each module in detail to ensure the reusability,ease of use,and stability of the framework,and at the same time,it needs to meet the low coupling of each module.(3)Implementation of AI game framework based on extensible state machine.According to the demand analysis and design of the game framework,It is implemented separately from the client side and the server side,including the realization of each module class,the relationship between each class,the main processing flow in the class,and the development and realization of auxiliary toolkits.By introducing state machine management for each scene and each object in the scene,the logic of each state of the scene and the logic of each state of the elements in the scene are divided to ensure that developers can add,delete or modify any one state logic at any time as needed,without affecting other modules in the game;the implementation of the AI module only provides the call interface and the return of the calculation result to the outside.The developers can focus more on the development of the game logic without the need for the specific implementation process of each algorithm;at the same time,the auxiliary toolkit provided by the framework allows a large part of the developer’s coding work,operation and maintenance work to be completed in one click,which greatly improves the development efficiency.(4)Verify the practicability of the game framework.After the game framework is implemented,in order to verify the practicability,the game of Beast Chess and other games are finally developed and released online based on the framework.Through actual case development,it is verified that the game framework does have the characteristics of reusability,ease of use,and scalability,which can simplify the game development process to a large extent.
Keywords/Search Tags:Extensible state machine, game framework, AI, game development, auxiliary toolkit
PDF Full Text Request
Related items