C++ vs C# vs JavaScrpit vs Python

Started by
4 comments, last by Shaarigan 3 years, 6 months ago

Which one is better for coding video games? C++, Javascript, C# or Python and why?

Advertisement

Looking at AAA games running on PC or Console we can assume the game engine (graphics, sound, animation, network, loading assets) is written in C++ almost always.
The game itself is often partially written in a scripting language like C#, even if it runs on top of a C++ engine.
If it's a browser game, JS may be the choice because every browser has support and there is no need to install something before.

So yeah, with no given information about the game (is it Tic Tac Toe or Call of Duty) we can not make any recommendations on what's eventually ‘best’ for you.

about four foot 3 inches

C++, Javascript, C# or Python ?

yes ?

… and why?

why?

Small games like card games or some simple games like up to the complexity of minecraft don't matter which language you are using. It depends on how good your deployment process is so do customers get an error message because they don't have certain runtime installed or is your setup script clever enougth to solve that too. How complex is your runtime to install and what is needed to get it to run on your client's desktop system. It is as same possible to compile Javascript into an executeable (Adobe Action Script for example is a Javascrip derivate which runs on the Flash-Engine or you have a Node application) as it is to compile C++ into some platform assembly.

This changes at the moment when you have some exotic/ closed source platform like Apple, Mobile or the state of the art Consoles. Those more than often requiere certain language to use, Apple is strict bound to Objective-C while Android requires at least a Java bootstrap assembly to run something else and most Console vendors like Nintendo and Sony have their SDK written in C++ for it's low-level platform near assembly code. So you are at least bound to those companies SDKs to even just run any code on their platforms.

This changes at the moment you start using a game engine which does all the low-level stuff for you when you export xour game to certain platform like PC or next-gen Consoles. At this time, you are bound to the public interface the engine vendor wants you to use. In case of Unreal, this is C++ while Unity is based on C# consumer code. There might also be engines for Java/ Javascript and python (pygame).

When running in a Browser, your game might be related on Javascript but meanwhile there is even more varity in Browser code with Web Assembly. So you see it highly depends on a lot of decisions that offer a lot of possibilities and something also your own preference

This topic is closed to new replies.

Advertisement