C++ vs C# for games

Hello.
I have been studying programming for a while. For work, I use the Python programming language. But as a hobby, I'm interested in applied programming.
I study the programming language C#, but I'm attracted to C++. I do not know why. Probably at the psychological level, because most of the applications were developed and developed in C++.
Interested in whether I should study C++, or stay in C#?
In application programming I want to develop applications of various directions. But most of all the game.
I want to develop sound games for the blind. It's almost the same as video games, but without graphics.
A large amount of performance is used for graphics. Graphics are missing, which means that high performance is not needed.
In Stroustrup's book "Programming: Principles and Practices Using C++" he says that C++ should be used when we are interested in the use of language capabilities. I'm interested in using libraries, API, engines.
C# is bound to the .NET Framework. There are more libraries in C++. In addition, after studying C++, I will understand more how everything works.
But I do not know what is better for me. C++ or C#. Maybe my reasons are not reliable.
I'm interested in the pros and cons of C++ and the pros and cons of C# for game development. Comparison.
Help me please.
Thanks in advance!
One advantage of C# is that you don't need external libraries to use sound - everything you need is included in the .NET framework. The same is true for other useful things, for example if you want to use XML or JSON store app settings, maybe access the internet for resources.
In C++ you need to use external libraries for almost everything.

Another advantage is that C# is much easier to learn because the language is much easier and there are much more learning material available.

BTW: Why don't you want use Python for your hobby as well?
No, I need to use external libraries in any cases, since NET capabilities are not enough for me. There is a good IrrKlang library.
I do not consider Python as a programming language for my hobby. I'm not sure that it's good for this.
I took the recommendation of one person from another forum, and threw a coin. Rather, I developed the program and, with the help of a random host, chose the language between C++, C# and Python.
My choice is C ++!
I hope this is the right choice.
Thanks to all!
But I think. Maybe C++ is an erroneous choice, because I heard that if I want to use API, engines, it's better to use other languages. C++ is mainly used to develop API and engines. Is it worth using C++ if I want to use ready-made solutions?
I've always been attracted to C++. I know that the syntax is more complex than in C#, but more libraries and capabilities. But there are difficulties in C++. For example, pointers. Now I think, is the right choice of C++ for me and my tasks.
Is it worth using C++ if I want to use ready-made solutions?
That depends on the engine you want to use.
On the one hand, I'm interested in how things work, it's interesting to manually delete unused objects, but on the other hand, I hate low-level programming. I like high-level programming. I do not want to develop libraries and engines, I want to use ready-made solutions. And I'm not sure if C++ is a good choice for this.
I hate low-level programming. I like high-level programming

If you like high level programming then C# or Python or even Java would be a better option.
Just one simple example - generating an random number between 1-6:
C++
1
2
3
4
5
  #include <random>
  std::mt19937 rng;
  rng.seed(std::random_device()());
  std::uniform_int_distribution<std::mt19937::result_type> dist6(1,6); // distribution in range [1, 6]
  int num = dist6(rng);

C#
1
2
Random rnd = new Random();
int num = rnd.Next(1, 7);   // creates a number between 1 and 6 

Java:
1
2
Random rand = new Random(); 
int value = rand.nextInt(6) + 1; 

Most things are much easier in C# or Java
Are there any other arguments against C++? If I know the basics of C++, variables, conditions, loops, arrays, OOP, how much more do I need to learn to get started?
C# I like most, but in C# all the work in OOP. Java I like that it is not tied to NET or another platform. Python, I'm afraid that I can not develop the likeness of Call Of Duty or GTA in Python.
Python, I'm afraid that I can not develop the likeness of Call Of Duty or GTA in Python.


Sounds like what you really want is a game engine such as UnReal or Steam. I imagine one wouldn't try a game similar to Call of Duty from scratch with any language, because it takes lots of time say 100,00 person hours to do so, in any case more than what one person can do in a life time. I gather there are a variety of technologies used, and a variety of disciplines too. Anyway too much for one person.

But with a game engine it's easier to get stuff done more quickly. I haven't used any of them them, but I understand it's possible to easily make a model of a character, then a model of the world, then ways for the character to move through the world. Apparently a lot of this can be done visually, but then there is code to specialise things.

But that will get you a start, really good video games developers don't employ 100's of people for nothing.

Anyway, hope this helps and good luck :+D

https://www.unrealengine.com/en-US/faq
https://en.wikipedia.org/wiki/List_of_game_engines
https://wiki.unrealengine.com/Steam,_Using_the_Steam_SDK_During_Development

Edit:
A tutorial for unreal, you can already see there is quite a bit of stuff.

https://www.raywenderlich.com/156038/unreal-engine-4-blueprints-tutorial
Last edited on
but in C# all the work in OOP

Well you could write C# in aprocedual style using static classes und static functions.
However for bigger projects OOP is normally the best way.

@TheIdeasMan,
I am not a game person.
Does it make sense to use a game engine if you don't use graphics?
Last edited on
I created a new topic:
http://www.cplusplus.com/forum/beginner/233472/
Please go there.
Topic archived. No new replies allowed.