I’m implementing RTS using C++ code for simulation and Ogre3D as renderer. I separated simulation and rendering by using proxy classes which contain only that data that is needed for graphics (like position, rotation and animation settings) to present previous simulation tick. Ten times per second I synchronize and exchange data (to proxies) between sim and renderer as simulation is multi-threaded.
I have separate editor for creating mechanics (units, skills, upgrades, etc.) in C# which serialize everything to XML file. Project is running fine but the problem is that I need map editor and scripting language (for maps and creating e.g. upgrades that modify game mechanics).
UE4 would be perfect as map editor and blueprints are good as “scripting language” but I have questions about integrating my code with Unreal. First of all should I reimplement mechanics editor in Unreal Editor (add UPROPERTY macros and create blueprints for e.g. skills) or not? I need support for creating collections of polymorphic objects (different types of skill areas and effects) and editing them directly in editor (I click “add” and choose object type, then edit it’s properties). I have tried to do that but I’m not sure if it is possible in UE by using blueprints. Maybe the better solution is to create proxy objects as blueprints and communicate with C++ by interface? However there is a problem: I would like to simply drag unit blueprint onto the map and create a mesh that was set in the mechanics editor (in “unit base”). To do that I need to load data from XML file when instance of blueprint is created (to read mesh name).
First option would be better because I would have everything in one place and I could create units that are not only meshes but something more complicated (like a couple of meshes :P).
Thanks in advance.