Advertisement

Are game engines just interpreters?

Started by August 05, 2017 08:23 AM
4 comments, last by FRex 7 years, 3 months ago

I was developing a 2D game engine in c++ and it went pretty well, until I got to the point of exporting the game.

You see, I was using lua in a virtual machine (sandbox) for the scripting of the game; now I realized that my game engine is just a lua interpreter if I try to share the game I'll distribute the game files (sounds, images, etc..), my scripts and my "interpreter" .exe this means that if I share my game with someone they'll have access to the game logic instead of a stand-alone .exe.

How do other engines compile scripts into a stand-alone executable i'm really confused on this mater.

Some game engines are 'just' interpreters, yes. Others are not. For example, Unreal expects you to extend it with C++, and even its visual scripting Blueprints are compiled in the end. Same with Unity; the scripts get compiled. Often the script is compiled to some sort of intermediate language which runs on a virtual machine, but that's no different from a typical Java or C# program - the source code (and the logic inside it) certainly isn't distributed as a human-readable part of the game.

Advertisement
1 minute ago, Kylotan said:

Some game engines are 'just' interpreters, yes. Others are not. For example, Unreal expects you to extend it with C++, and even its visual scripting Blueprints are compiled in the end. Same with Unity; the scripts get compiled. Often the script is compiled to some sort of intermediate language which runs on a virtual machine, but that's no different from a typical Java or C# program - the source code (and the logic inside it) certainly isn't distributed as a human-readable part of the game.

How would I go about 'extending' my engine with c++ code should I compile it to a dll?

If you are developing your own engine then you just add whatever code to it that you want.

SCUMM (VM) is one of few examples on an engine that is just (kinda) an interpreter for a genre specific scripting language and data files.

http://wiki.scummvm.org/index.php/SCUMM

This topic is closed to new replies.

Advertisement