RCC++ is the new trend when it comes to rapid game code development.
But I have some problems with the idea. I have read a bit about it and checked the code on the github (RCC++), but there are too many caveats to consider adding it.
My main directive for the game engine is to have very simple concepts and code governing the logic of the engine, RCC++ doesn’t seem to abide to that rule, at least in my perception. The first thing that basically ended my journey was that I needed to use some interfaces to keep track of stuff, that’s it, end of story.
I think the best solutions for my need of simplicity would be:
- Simple handle based C-API – the C++ script creator will not deal with pointers and direct structs, only with setting properties and executing actions
- Lua – good old logic scripting, scripts called when needed, not necessary onUpdate every frame, but event-driven. Also helped by LuaJIT for speed
- Visual Scripting – data driven logic, very nice for game/level designers
- Direct C++ engine API modules – DLLs which can be recompiled and hot reloaded, user will have to take care of the objects created, serialize any state at the moment of the module unload and deserialize when reloaded. This mode is dangerous and it will crash the engine if the module does not behave, but for development mode, it’s ok.
So, all these methods should be actually supported by the engine, they’re straight to the point, require minimal maintenance and are clear to understand.
The handle based C-API can be easily exposed to Lua. The visual scripting is a different beast but nice/interesting to implement. The direct C++ engine API usage is again, dangerous if not used wisely/properly, highly dependent code on the low level engine API, but really fast.
These are my alternatives or mixed ideas for C/C++ as a scripting language, the current implementation of RCC++ it’s not really in line with my ideas for a simple RAD system, even if in the end might take care of a lot of things and make it work.
Also, for the C++, one could also use a C++ interactive interpreter or some C++ scripting engine, and on production you could truly compile that C++ code into a native binary.