I'm researching game engines and would like to know if Godot has support for dynamic compilation and loading of c++ code (think hot reload). One of the game's requirements is to allow a player to write code to alter the state of an object in the game, preferably through a scripting language like python that compiles to c++ and is then loaded into the game. I wasn't able to determine if this is supported by reviewing the documentation or the existing forums posts. Does Godot have support for this?
Hot reload supported?
Yes and no. You can change a lot of the game while it is running in the editor when you are playing. This is typically with GDScript, which is similar to Python and is what I would recommend. C# is also supported, but it is not as seamless and C++ is a headache you don't want to deal with (though it can be useful for specific optimization).
So you can alter objects, change the speed or variables of an object, move them, whatever, and it updates in real time. It is better than how it works in Unity, and can work remotely. I've even done it from PC to an Android phone wirelessly. Some simple code changes can work but, most of the time, if you make any real changes to the logic, it won't update properly.
So in general, you just want to expose variables you are interested in (called export variables) and tweak them while you are playing. Or adjust the scale/rotation/position of objects and some simple stuff like that. It's not a problem. But large code changes will require you to stop and play the game again. But GDScript is dynamic, so the compilation is very fast. On a small project it is instant, or on a large 3D game it could be like 30 seconds at the most probably.
Also, you should verify your account by clicking the email we sent you. That way you can post freely in the future. Thanks.
Ah ok, sounds like I'll need to use something with a bit more control in regards to this issue, thanks so much for your detailed response!