S
S
sanek20052020-12-18 12:26:55
C++ / C#
sanek2005, 2020-12-18 12:26:55

How is the scripting engine arranged?

I don’t understand at all how his architecture is built, how he reads scripts and executes them, and how this is connected with the logic in the engine

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuriy Vorobyov, 2020-12-18
@YuriyVorobyov1333

Almost every engine consists of several main components:

  • main game code with logic
  • rendering engine
  • sound engine
  • physics engine
  • AI

It is clear that this list may change from implementation to implementation. Usually, some kind of abstraction is rolled on top of all this, so that all this can be used normally without getting into the source codes, this is how the Unity / Unreal / Cry Engine, etc. appeared. As a result, we get a set of tools and libraries for handling low-level functions, such as drawing objects, and therefore, instead of writing code for drawing, the developer simply creates an object of the sprite class. As a developer, you usually have a canvas (scene) where you arrange objects and then bind scripts to objects, during assembly, all this is the arguments of some function or constructors of some class, which starts to execute and bind all this logic. If we are talking about the popular engines mentioned above, then they have an Entity Manager,
It is important to understand that the implementation and internal mechanisms change from case to case. Here and here and here you can read about engines in general, and here and here you can see how smart uncles write these same engines before your eyes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question