I'm interesting in making games in my future, and I've heard that my favourite game's engine is made with c++, but its embedded with python. I have little experience with programming, but I greatly understand how object orientation works.
What is the purpose of embedding a scripting language into a programming language in a game engine?
204 Views Asked by Cainan Crenshaw AtThere are 2 best solutions below
On
Why would someone need/want to embed a scripting language into a programming language?
The main reason obviously is to allow to provide extensions to the game engine without need to recompile the entire game executable program, but have the extensions loaded and interpreted at run time.
Many game engines provide such feature for extensibility.
... but I greatly understand how object orientation works.
Object orientation comes in with the interfaces declared, how to interact with the particular scripts.
So python is itself an object oriented language which supports OOP principles quite well.
For instance integration of non OOP scripting languages, like e.g. lua scripts (also oftenly used for extensions), makes that harder, but not impossible after all.
There are many reasons, but the primary motivations are customization and "playback". By playback, I mean the ability to automate or repeat a series of tasks in the program without requiring programming expertise. Blender is a good example of this.