+ 8

Why is C++ used for games?

why is c++ used instead of python?

25th Apr 2017, 3:46 PM
Keanu Henry
Keanu Henry - avatar
2 Answers
+ 7
@Ali Emir Kızıl: This is a bit confusing when you are saying "you compile and run it anywhere" . I would say that you compile for the platform you want to run into (Windows, Linux, Android, ...). I would add that C++ is a lot more performant than Python mainly because it's not interpreted at runtime. In a game performance is really important, it will impact the FPS and the loading times. Don't get me wrong I am not saying that Python is inferior to C++. They are different and used differently. For example if you want to create a script that sort files according to their name or content, it would be a pain with C++ but a formality with Python.
25th Apr 2017, 4:32 PM
guillaume
+ 2
Because it is a compiled language. Python is not a complied language. Python is an interpreter language. So you need the python interpreter to run a code. But in C++, you compile your code and run it anywhere.
25th Apr 2017, 4:21 PM
Ali Emir Kızıl
Ali Emir Kızıl - avatar