当前位置:网站首页>Structure and development layering of games104 b1+b2 engine
Structure and development layering of games104 b1+b2 engine
2022-07-23 05:45:00 【Liu jingyiru】
Preface :
You can't have fear or illusion about things you don't know , But to keep understanding , Demystify the !
The harvest of this class is still relatively large , Mainly let me from the right “ How to make an engine is unknown ” Deep fear , To do the engine of things have a relatively specific understanding , To think that there is a way to make an engine .
( One ) Introduction to the engine :
1. myth : Once thought that engine development is graphics . However , Complete an engine development , In graphics knowledge only 5% The rest are extensive 95% Good computer knowledge . For learning , When building an engine , Learn to design architecture , Extensive access to knowledge , But graphics knowledge is still the only main line . But for work , There should be a professional ! So we still need to dig a deep field in graphics .
2. Virtual and real-time rendering . The engine constructs a virtual world in limited time and space , It can be big or small , It can have different features and functions . This is what attracts me behind boring knowledge , We will observe more laws of the world .
Real time rendering . This aspect introduces many cutting-edge technologies , Such as multithreading , Real time lighting , Multi person online synchronization ( Synchronous frame technology ) Many involve network knowledge .
3. Engine several major systems :
An engine can start from update Function start . It means in different time periods , The program should run again quickly . First of all, a sigh , Programmers will change the world .
MVVM: This should be well understood .View--->ViewModel<===>Model.. stay MVVM In the frame , Data and views are not allowed to communicate directly , Only through ViewModel To communication , and ViewModel Observed data changes , Update the view content ,ViewModel Monitor view changes , And be able to notify the functional data of changes . So it reflects the encapsulation of the engine .
Render System : How to make the rendering speed of the picture reach the required frame rate .
Animation system : Play with the model , How to do the transition of animation .
Physical systems : Interaction with the world , But we need to describe realistic laws as realistically as possible . Physics this is a huge challenge !
GamePlay System : This part is the core architecture of the whole game . The rules of the world are expressed by the event system and script system , Combine into one tool .
Special effects system , Camera system , Wayfinding system, etc , These are not necessary , But it also reflects the designer , Game developer's for effect “ High customization ”, I'm afraid it's a system designed by techno beauty .
It can be seen that these major systems still have different emphasis on the capabilities required by developers . Rendering system is more suitable for learning status and career choice .
( Two ) Engine layering :
In the project of large-scale system development , We often advocate “ More combinations , Low coupling ”. Therefore, the engine layered development can reduce the development complexity .
The development of engine can be divided into five layers :
1)Tool Layer Tool layer 2)Function Layer: Functional layer 3)Resource Layer: Resource layer 4)Core Layer: Core layer 5)Platform Layer: Hardware and software platform layer
Overall, the complexity of developing an engine is very high , For different layers, we should learn relevant knowledge , No less than the development of an operating system , So in terms of learning , We should grasp the main roads , Then how long is one specialty !
First of all ,Resource Layer: Resource layer , Mainly manage the life cycle of assets , To achieve an effect, our demand for resources actually seems to be the most intuitive . A few key points :(1) Efficient format of resources (importing), from resource become Assets; For several MAX,PSD If the file is directly put into the engine , It often brings more burden to the engine , So we should first convert them into an efficient format and then use them for the engine , Each asset has a unique identification number .(2) Real time asset manager . For war games , Because players need to operate in real time , Therefore, resources should also be loaded in real time . So we should set up a better system GC To manage resources .
Solved the problem of resource layer , It's about to be solved Function Layer: Functional layer . On a function is a game effect , It still belongs to engine effect , This aspect is controversial , therefore “ Carding logic ” It is very important to embody in the function layer . For example, in the third person shooting games : The shaking feeling of the camera .
The process of the game can be regarded as the time process of the program (unity Li Cheng update). With a moment (tick) The continuous advance of time , Logic will change , The scene will change .Logic+Render Constitute a game process . Therefore, when writing logic, writing the two separately can better sort out logic . The better way to organize the game process is multithreading , So try to design the underlying code of the engine from the perspective of multithreading , The tricky part is that there may be complex dependencies between threads , You can't simply ignore logic and distribute a threaded task to multiple threads !
Next , say Core Layer: Core layer . The core layer can be regarded as a huge Mathematical Library , It should serve the efficiency of the engine and require high code quality .(1) linear algebra . It generally involves the application of matrices and vectors . Continuous optimization of the engine requires a lot of algorithmic knowledge , such as Carmark Calculation 1/sqrt(x), You need to consider SIMD( Single instruction multiple data instruction )(2) Data structures and containers . Mainly used in memory management .C++17,C++21 Of STL The library expands a more efficient data structure is the implementation . So I'm putting C++98 Of STL After thorough understanding, I think I can experience . In addition, memory management , Hardware is also part of the solution . Be close to CPU The cache of is sometimes the core card . General engine developers mainly face the function layer and tool layer , So this part is also a watershed for engine developers .
Let 's talk about it again Platform Layer: Hardware and software platform layer , The entry point is to hide the differences of platforms . At present, the platform only knows Windows, But you can also learn in the future linux.
Finally, let's talk about it Tool Layer Tool layer , It is mainly used to improve the generation efficiency , Such as graphic editor ,Ui Editor ,shader Editor . Another function is DDC, Let the assets of other software be imported into the engine without damage , You need to be an exporter of assets , And asset importer .
As the superstructure of engine development , Tool layer and function layer , It is often modified . So be more flexible . But it is relatively stable for the core layer and platform layer , Generally no modification . For example, you can use Qt Development interface ,C# Development controls .
Some newly released software supplements
CMake:
Compile applications for complex projects ---CMake It's a cross platform Makefile Generation tool . Read in all source files (.c;.h;.oc) after , Automatic generation makefile. Different platforms and languages have their own Make, however CMake It's still outstanding .
Git:
Git It's a version control system , Is the main content of any software development project . It is mainly used for code backup and code version control .

Conclusion :
Start from understanding , Go deep , The knowledge to learn is endless .
边栏推荐
- Building wheel for hdbscan (pyproject.toml) did not run successfully.
- 用两个栈实现一个队列。
- unity中3dUI或者模型始終面向攝像機,跟隨攝像機視角旋轉丨視角跟隨丨固定視角
- RPC-BDY(2)-注册多个服务
- Code random notes_ Array_ 977 square of ordered array
- FMETP Steam v2 使用方法(二)
- PHP one sentence Trojan horse - error prone syntax - Beginner's record
- Code random notes_ Array_ 27 remove elements
- Unity3d audio system aduio sound music control audio playback audio pause audio control
- day6_ Jigsaw puzzle follow-up - switch interface, random pictures and package exe
猜你喜欢

"Dial" out the number on the number of digits - a variety of ideas to achieve reverse output of a four digit number

2021-10-25 how to jump after searching for too many boost treeview component nodes?

关于 pycharm 中无法导入自定义库的解决办法

Vscode environment configuration management

课后练习01---QQ登录

Espressif plays websocket

unity中3dUI或者模型始终面向摄像机,跟随摄像机视角旋转丨视角跟随丨固定视角

Digital twin demonstration project -- from the simple pendulum (1)

Vrtk reactivates the scene, jumps to the scene handle, and the UI interaction function is lost

How to use C language to realize headless one-way acyclic list single list?
随机推荐
What to do if the browser plug-in is damaged? How to delete | install the plug-in
CreateProcess output redirection
Debug No2 按流程检查错误
软件生命周期模型-----V模型
大一暑假实习day7总结
The new business form of smart civil aviation has emerged, and Tupo digital twin has entered the civil aviation flight network of the Bureau
数据可视化的工具
VRTK功能教学(一):手柄传送丨手柄瞬移丨触摸板瞬移丨传送
Principle and implementation of Ping
按照是否查看原代码划分: 白盒测试和黑盒测试
项目实战--传智健康
ImageView realizes zoom, pan and fling
2021-10-25 how to jump after searching for too many boost treeview component nodes?
Debug No3 多张纹理叠加
其他测试: 回归测试 , 冒烟测试 , 随机测试
摄像机画面变换和第一人称的移动
How to use C language to realize headless one-way acyclic list single list?
DOM - node operation
Day7 summary of freshman Summer Internship
Recursive function to realize prime number judgment