Currently for the 3D game Mobile development, the Unity3d engine almost occupied the majority of the share, unity is characterized by fast and the market plug-ins more, which also shows that its architecture design is very good, with so many people involved in the application of the engine has been an unprecedented increase. But for the beginner programmers of the game company or the novice programmer, in the actual project development, is writes the basic logic, for the underlying architecture design is not very clear. This is very unfavorable to their own development, here to introduce several game development commonly used in architecture design, but also tell you how to learn.
In the process of learning, we should be familiar with several classical patterns in the design pattern: single-case mode, Factory mode, abstract Factory mode, State mode. Next we will take the game client as an example to tell you how to design a game architecture.
In client development, the UI is designed first, and there is a lot of UI development logic in the game. In order to be able to meet the needs of the game transformation, this requires that we have to do a framework. The purpose of the architecture is to facilitate the programmer's extension, and the decoupling of the modules is reduced.
First of all, UI design, UI is the main function of the interface between the switch and the interface of the data display, which just satisfies the MVC architecture pattern, model represents the Data transformation, view represents the display of the interface, control represents the controls.
The basic logic of this interface is written in view, and control represents the display of the controlled view, and the model represents the data change. They can be used to listen to and distribute links between messages. Specific to the author of the "Unity3d actual combat core technical details" published in the electronic industry publishing books, there is a detailed explanation of the MVC architecture design and code cases.
Besides the character design after entering the game, the character has many actions and skills. Different actions can switch between each other, skills are the same, the number of movements is limited, the skills are limited, this is very consistent with the FSM finite state machine design. The code design can be based on the first design of a state transformation of the base class, different actions or skills can inherit the base class. The transformations between them can be switched using state, which is very useful. The author in "Unity3d actual combat core Technology detailed" a book dedicated to a chapter on its detailed explanation.
These two parts are the most important, and others involve the management of various management classes of encapsulation. are relatively isolated module design, these modules can be used in a single-case approach. Finally, to tell the reader a very important thing is to first module design re-coding, according to the planning requirements of the whole framework. Avoid the need to get the document to start writing, after the change very frequently, to put their own pit dead.
At present, the individual has also opened the Personal homepage website: www.vr3d-edu.com Welcome everybody to visit.
This article is from the "Jiang Xiewei personal blog" blog, please be sure to keep this source http://jxwgame.blog.51cto.com/943299/1883543
How to improve your skills quickly