6 ms·
C++ is very common in gamedev largely for the performance, less learning another language and more direct. UnrealScript in previous Unreal versions was simple b
by drawkbox 6y ago
C++ is very common in gamedev largely for the performance, less learning another language and more direct. UnrealScript in previous Unreal versions was simple but so is the necessary C++ for Unreal 4. Developers can make pure C++ games, or they have a simpler way using Blueprints that you can add into C++/Blueprint mixed games [1][2], or purely Blueprint that helps for non programmers though they are slower. There was lots of work to keep UnrealScript synced with the engine. Without that middle layer of a DSL, going direct is also important since everything needs to perform on mobile but also be native/AOT compiled. Helps for consoles, desktops and web as well.
Fun fact: Unity was going to go to C++ in 2013 during the Apple blocking Flash and other JIT tools, Unity thought they were going to be blocked from mobile publishing. [3] Since you can't run interpreted code Unity was going to go C++, I wish they had with C# as a scripting language maybe. Instead Mono had AOT compiling around that time but since the Mono license was expensive they built IL2CPP which takes byte code and makes C++ from it. About a year later Mono was bought by Microsoft and it would have been free for Unity to integrate. Though I still wish they would have went C++ with C# scripting that creates C++, would have been an easier route. I believe much of their problem is all these complicated legacy/translation systems at the base of the engine, which just going direct C++ would be easier with scripting on top of that that directly converts to C++.
Godot you can also use C++ and other languages including C#, GDScript. [4]
Early days of Unity you could use C#, Javascript, Boo (Python flavor) or anything that Mono supported.
[1] https://docs.unrealengine.com/en-US/Resources/SampleGames/ARPG/BalancingBlueprintAndCPP/index.html https://docs.unrealengine.com/en-US/Resources/SampleGames/AR...
[2] https://docs.unrealengine.com/en-US/Gameplay/ClassCreation/CodeAndBlueprints/index.html https://docs.unrealengine.com/en-US/Gameplay/ClassCreation/C...
[3] https://blogs.unity3d.com/2010/07/02/unity-and-ios-4-0-update-iii/ https://blogs.unity3d.com/2010/07/02/unity-and-ios-4-0-updat...
[4] https://docs.godotengine.org/en/stable/tutorials/plugins/gdnative/gdnative-cpp-example.html https://docs.godotengine.org/en/stable/tutorials/plugins/gdn...