refactoring - Refactor C++ code to use a scripting language? -


Background:

I'm working on a platform game The C ++ game for the months is currently fully written in C ++, though I am afraid of using Lua for enemy A and possibly some other arguments. However, this project was made without Lua, and I have already worked in AI for C ++ code. I hope Lua can improve the game's excesses, but it does not know whether to replace the current C ++ code into Lua.

Question:

Whenever it is appropriate to take a fully functional C ++ code and reuse it in a script language like Lua ?

The question is deliberately unclear, so the free answer is not related to the given background.

Scripting languages ​​are useful for things that can often change or expand, and Can afford business at speed

It will not be the meaning of using a script language in your original libraries, because they are relatively static (they all do more than the content of the process) and hurry them. But for things like AI, this is an ideal idea. You can tweak AI without recompiling, and allow changes in the future quite well. Once you ship, you can compile the scripting language in advance and it's called good.

It is also best for excesses to provide a Lea interface for your game and anyone can write plugins using a simple language without the need to compile. Your Lua interface can be more flashed, more expressive and powerful those plugins.

If you have already got everything, unless you intend to try to improve it or allow extension, then I do not really see a reason to snatch it; done. It will have to be kept in mind for your next game engine.

He said, if you are not doing it completely and it is a hobby / practice, I would recommend that you do this. You will be introduced to add scripting capabilities to this game engine. When you build larger and more complex engines, you will not need to do anything new.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -