Script vs Hard Code


#1

Is there a list or general guideline of what was/is programmed in c++ and what is in lua, as well as any other languages that might be floating around out there. Any idea of what can be changed without having to recompile the engine?


#2

I’ll answer specifically related to the new engine.

These are the general guidelines (they are quite vague):

  • Basically the heavy lifting should be done in C++
  • Parts that are tweaked much should be in AngelScript
  • Things that rely on parts of the scripts should also be in scripts (as MicrobeComponent is defined in a script everything that uses it is also a script)

This basically results in there being a few cell_stage related things in c++ like the membrane system and a few others and basically every other cell handling function is in the scripts.

Any file not in thrive/ThirdParty/leviathan can be changed without having to recompile the engine; changing any of the thrive files requires only thrive to be recompiled (except the scripts which don’t require recompiling, only running cmake to copy them to the bin folder).


#3

Angelscript or Lua, currently I see even in the Engine Refactor that all the scripting files are in Lua.


#4

AngelScript. The new engine has no lua bindings. I just haven’t deleted the lua files yet as they are quite useful to have in the same folder to compare against the AngelScript versions.