I would like to add scripting capabilities to my C ++ game engine.
I have Engine.exe , Physics.dll , Audio.dll , and I'm adding Scripting.dll , which is a high-level Racket shell.
Engine.exe downloads Physics.dll and sets up the physical world, loads Audio.dll and sets up the world of audio. It is supposed to download Scripting.dll , establish bindings to Physics.dll , Audio.dll and load game scripts.
AFAIK, there are two possible ways to insert Racket into a C ++ program:
Using the external interface seems strange due to the need to download Physics.dll , Audio.dll two times: first from Engine.exe , and then from the game script.
Writing Extensions looks more attractive because it allows you to do script bindings on the C ++ side. On the other hand, you need to build the extension using raco ctool , link it with the mzdyn object file, which also looks inconvenient: why not make the mzdyn static library?
I would like to implement one method, for example. setupScriptBindings() , both in Physics.dll and in Audio.dll , and call it from Engine.exe at startup.
Is there an easy way to do this?
source share