What technologies are involved in developing an engine

       What technologies are involved in developing an engine

Concept of game engine

  Game engine refers to the core components of some edited computer game systems or some interactive real-time image applications. These systems provide game designers with various tools needed to write games, and their purpose is to allow game designers to make game programs easily and quickly without starting from scratch. Most of them support multiple operating platforms, such as Linux, Mac OS X, and Microsoft Windows. The game engine includes the following systems: rendering engine (ie "renderer", including 2D image engine and 3D image engine), physics engine, collision detection system, sound effects, script engine, computer animation, artificial intelligence, network engine, and scene management. [From Baidu]

The technology involved in the game engine

1. Rendering engine

  The rendering engine consists of a rendering manager. This manager is responsible for sending data to the GPU and activating the correct shader.
  To render pixels on the screen, you need to communicate with the GPU. To do this, you need a medium. This medium is called OpenGL.
  OpenGL is not a programming language, its purpose is to transfer data from the CPU to the GPU. Therefore, as a computer graphics developer, your task is to send data to the GPU through OpenGL objects. For this, the GPU needs three sets of data:

  1) Attributes data: used by GPU to assemble geometry, apply lighting and images to game characters.
  2) Uniforms data: Provide spatial data to the GPU.
  3) Texture data: A texture is a 2-D image used to wrap the character.

The GPU consists of four shaders:

  1) Vertex
  2) Surface
  3) Subdivision surface
  4) Geometry

  shader is a program that exists in the GPU. They are programmable and allow manipulation of geometry and pixel colors.
  Details link

2. Physics engine

  The game physics engine mainly includes: particle mathematics, law of motion, particle physics engine, resultant force, elastic force, hard constraints, mass body physics engine, mathematical knowledge of rotation operation, rigid body operation law, rigid body physics engine, collision detection, collision generation, collision Handling schemes, static contact and friction, stability and optimization issues, integration schemes, and other physics engines.

3. Game sound effects

classification

  Judging from the sound structure of the current domestic games, they can be simply classified as follows: Classification
  by sound effect format and production method:
  1) Monophonic sound effects
  2) Composite sound effects
  3) Music sound effects
  are classified by function:
  1) Interface sound effects
  2) NPC sound effects
  3) Environmental sound effects
  4) Skill sound effects
  5) Background sound effects

format

  1) Wav/mono(stereo)/44.1KHZ/16 bit
  2) mp3/stereo/128K
  3) The ACC
  format itself is not good or bad. You can decide which format to use according to the compatibility of the game engine.
  Details link

4. Script engine

  The script engine is an interpreter of a computer programming language. Its function is to interpret and execute the user's program text, translate it into machine code that can be executed by the computer, and complete a series of functions.

  Early desktop databases such as dbaseIII, foxbase, etc. also belong to scripting programming languages.

The operating mechanism of the scripting language

  1) A major disadvantage of scripting languages ​​is execution speed. The execution of the traditional scripting language will be slower than the compiled C, C++ language, or slower. The reason is that the scripting language is parsed and executed by something called a virtual machine (virtual machine VM). The virtual machine is an independent module of the software, which is part of the program itself. The virtual machine grafts a bridge between the main game program and the script (see 2). The virtual machine here is actually the so-called script engine.
  2) The script is parsed by the virtual machine in real time, and if your main program or game engine integrates the virtual machine, then as far as the developer is concerned, you can access the things in the script at any time, such as methods, variables or other objects. Similarly, scripting languages ​​can access methods and objects in the program. So you can use the script language to expand the function of the fixed code at any time, because you can write new methods in the script file and be used in the program.

Why add a script engine to the game

  Because the script provides a capability that allows you to write the main functions of the game without compiling the entire game engine. For example, most component modules of the game, such as AI, UI, game events, save and load game functions, and so on. The script provides an editing tool to change the logic of the game and can run in real time.
  In Unity, the c# you write is a scripting language, which runs on mono.

5. Computer animation

There are two types of computer animation:

  1. Computer-created animation: It refers to the creation and production together with 3D animation.
  2. Computer-made animation: refers to the use of PS plane software to make animation pages, which can save a lot of costs.

Animation software

  The mainstream computer animation software includes: 3ds max, maya, flash, poser, Xara3D, etc.
  Details link

6. Artificial intelligence

  Artificial Intelligence (Artificial Intelligence), the English abbreviation is AI. It is a new technological science that studies and develops theories, methods, technologies and application systems used to simulate, extend and expand human intelligence.
  Artificial intelligence is a branch of computer science. It attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robotics, language recognition, image recognition, Natural language processing and expert systems, etc. Since the birth of artificial intelligence, the theory and technology have become increasingly mature, and the field of application has continued to expand. It is conceivable that the technological products brought by artificial intelligence in the future will be the "containers" of human wisdom. Artificial intelligence can simulate the information process of human consciousness and thinking. Artificial intelligence is not human intelligence, but it can think like humans and may exceed human intelligence.
  Artificial intelligence is a very challenging science, and people who are engaged in this work must understand computer knowledge, psychology and philosophy. Artificial intelligence includes a very wide range of sciences. It is composed of different fields, such as machine learning, computer vision, etc. Generally speaking, one of the main goals of artificial intelligence research is to make machines competent for some tasks that usually require human intelligence. Complex work. But different times and different people have different understandings of this "complex work". [^1] [Artificial intelligence is taken from Baidu Encyclopedia]
link for
  details

7. Network engine

  Internet search engines are special sites on the World Wide Web, designed to help people find information stored on other sites.

Engine composition:

1. Searcher

  Its function is to roam in the Internet, discover and collect information;

2. Indexer

  Its function is to understand the information searched by the searcher, extract index items from it, and use it to represent the document and generate the index table of the document library;

3. Retriever

  Its function is to quickly retrieve documents in the index database according to the user's query, carry out relevance evaluation, sort the results to be output, and reasonably feedback information according to the user's query needs;

4. User interface

  Its role is to accept user queries, display query results, and provide personalized query items.

5、robots

  Robots protocol, the website tells search engines which pages can be crawled and which pages cannot be crawled through the robots protocol. The Robots protocol is a common ethical code in the Internet community for websites. Its purpose is to protect website data and sensitive information and ensure that users' personal information and privacy are not violated. Because it is not a command, it needs to be consciously followed by search engines.

Current mainstream network engine

ACE: http://www.cs.wustl.edu/~schmidt/ACE.html
ASIO: www.boost.org
RakNet: http://www.jenkinssoftware.com/
Domestic network engine products are: http:// www.joy70.com/

8. Scene management

Reference article

http://www.cnblogs.com/kex1n/archive/2012/08/26/2657054.html About scene management overview
http://www.cnblogs.com/wangchengfeng/p/3495954.html?utm_source=tuicool common three-dimensional Scene management
http://blog.csdn.net/zhanxinhang/article/details/6706217 quadtree and octree
http://blog.sina.com.cn/s/blog_6471e1bb010135w1.html bsp tree species portal count
http:/ /www.cnblogs.com/eyeszjwang/articles/2429382.html kd tree principle
http://www.cnblogs.com/v-July-v/archive/2012/11/20/3125419.html kd tree detailed explanation

Common scene management technology

  For a 3D scene with many objects, the easiest way to render the scene is to use a List to store these objects and send them to the GPU for rendering. Of course, this approach is quite inefficient in terms of efficiency, because the objects that really need to be rendered should be objects in the frustum. In addition, from the efficiency of cropping algorithms and collision detection algorithms, using this data structure is also quite inefficient. A better way is to use a spatial data structure with a hierarchical structure to store the objects to be rendered, such as BVH (Bounding Volume Hierarchy), BSP (Binary Space Split) tree, quad tree, octree and fuzzy KD tree, etc. Reduce the time complexity from O(n) to O(logn) when performing spatial search or elimination. Of course, the corresponding cost is that when each frame is updated, the corresponding spatial data structure needs to be updated.

Common scene management methods

多层次包围盒(BVH)
四叉树
八叉树
BSP树
k-d树 

Original link: https://blog.csdn.net/u012234115/article/details/47156217

Guess you like

Origin blog.csdn.net/weixin_44870508/article/details/102794230