I try to write a game and implement scripts so that later in development I do not have to recompile everything when I want to change the numbers.
My problem is that I do not know how scripts should interact with the game. The scripting language I use is angelscript .
Now I have a state: intro state, which I use as a test for most modules in my game engine (this looks more like a free collection of classes). It will load and draw an image and draw text, and also use scripts to update itself and, possibly, later switch to a dummy state to check the state manager.
During the recording, I realized that using a script for most of the update would require me to register most of my game engine modules with a script and pretty much move the bulk of the code into a scripting language. Personally, I would prefer that part of C ++ do most of the work, and the scripting language comes up with numbers that need to be used in formulas / drawing / independently.
However, if I am right, this will lead to a large number of different update modules for most of the things in the game that need to be updated, and require that all of them be loaded, and that C ++ code must run each update function individually.
Or, is there a way to achieve script and software compatibility that I miss. Anyway, can someone help me figure out what is the best way to get the scripts implemented in my game?
source
share