Comment by pjc50
6 hours ago
C++ is really not very amenable to this because every change to the contents of a class messes up your entire memory layout. "game as DLL" is definitely a viable solution to that, but so is "game in scripting engine": many games delegate a lot of their mechanics to e.g. Lua precisely because it's so easy to tweak in-engine if you just want to change a bonus from 5% to 10% and so on.
> C++ is really not very amenable to this because every change to the contents of a class messes up your entire memory layout
I think even `dotnet watch` at some point nopes out when you change too much. I think they call it "rude edit" and ask you to completely restart the program in that case. So I don't expect every possible C++ edit to be manageable by hot reload. But changing a few if conditions or constants should be fine or not?
I'm more and more questioning scripting languages in games. What are the main reasons to use something like Lua? I think it's having not to rebuild the engine, no compile times, changing stuff while the game is running and being more accessible to non-programmers. But I think it's rather infuriating, all those points could be less relevant if the tooling for "real" programming languages was better. And with coding agents becoming more wide-spread I guess accessibility to non-programmers also becomes less of a point. I guess it's just my personal dislike for scripting languages in games, but really, it would be so much nicer imo if there was only need for one language that does it all. But seems like a difficult thing to achieve.