Scripting Languages

Published August 29, 2014
Advertisement
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.
0 likes 1 comments

Comments

tnovelli

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.

September 02, 2014 02:23 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement