Refactor C++ code to use a scripting language?
- by Justin Ardini
Background:
I have been working on a platformer game written in C++ for a few months. The game is currently written entirely in C++, though I am intrigued by the possibility of using Lua for enemy AI and possibly some other logic. However, the project was designed without Lua in mind, and I have already written working C++ code for much of the AI. I am hoping Lua can improve the extensibility of the game, but don't know if it would make sense to convert existing C++ code into Lua.
The question:
When, if ever, is it appropriate to take fully functional C++ code and refactor it into a scripting language like Lua?
The question is intentionally a bit vague, so feel free give answers that are not relevant to the given background.