Scripting languages can be a can of worms. I want to make sure I open that can for the right reasons!
I want the code that does any heavy lifting of the generation to be in C++ for performance reasons (and debugging!). I also want the generation steps of objects to have rapid iteration in a forgiving environment, as in without hitting asserts or crashes. My game framework allows this to potentially be in C++ as it supports reloading DLLs on the fly so generation logic could be in DLLs, but it's not what I'd call 'rapid' iteration. Other approaches are runtime CPP compilation, JIT (C#) or byte code scripting language. I'm going to try to not tie myself down to one particular approach if I can help it. Easier said than done though.
I'll probably start with a simple game targeted scripting language such as GameMonkey or Angel Script.
Also aside from scripting the generation having a scripting language hooked up to your engine makes auto testing easier. Having good tests is going to be a life saver in the long run.
I'll put down some sketches of how I imagine the generation process for objects will work and how scripting will help in the near future, with some examples.
Advertisement
Latest Entries
Planet Generation Plans
9585 views
Random Progress - May 2018
2258 views
Debug Text
2528 views
Generator Testbed V6 Video
2262 views
Prototyping In Javascript
2511 views
Expanding Earth Theory
3384 views
Code Status & Geodesic Spheres
2707 views
Scripting Languages
2519 views
Changing the universe
2407 views
Coordinates & Compressed Space
2607 views
Advertisement
Advertisement
Check out LuaJIT. It's pretty fast, and simple to hook up. Use the C function binding method if in doubt. There are some Lua-C++ OO binding libraries but I for one am not comfortable with their complexity.