c++ - Script system in application -
i'm developing game , want make script system it.
now have abstract class object inherited game objects. have write lot of technical code, add new object type enum, register parser function each object (that function parses object's params file).
i don't want make such work. idea script system (boost.python example, because i'm using boost in project). each object simple python-script, @ c++ side load , run scripts.
python isn't hard -typed can register functions, build types dynamically without storing enum, etc. bad part writing lot of binding-code makes once.
are ideas right?
can give rough idea of how large game going be?
if you're not careful, give lot of work without benefit, planning sounds might help. important questions "what parts of program want simplify?", "do need scripting language simplify them? , "can scripting language simplify them?".
you mentioned don't want have manually parse files. python's pickle module handle serialization you, .net. if you're using visual studio, may find easier write code in c# in python.
you should ways simplify code without adding new language. example, might able create simple binary file format , store data structures without parsing. there other things can do, require more detailed knowledge of program.
Comments
Post a Comment