L
L
lord1252017-08-07 16:37:43
Game development
lord125, 2017-08-07 16:37:43

Which is better, C or C++?

Good afternoon.
I recently started learning C++ and suddenly came across an article that highlights the advantages of C in comparison with the previously mentioned language. The main disadvantage of C ++ was the very high complexity of the language, as a result of which its study can take many, many years. The author of the article also recommended Jav, because it copes better with the same tasks as the pluses, albeit at the expense of performance. As a result, vague doubts began to torment me, and several questions arose:
1) Which language is better to choose for game development, C or C ++?
2) Is it easy to switch from C to C++ and vice versa, if necessary?
3) If it's better not to choose C++, is it worth learning Java instead?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
D
devalone, 2017-08-07
@lord125

The author of the article also recommended Jav, because it does a better job with the same tasks.

What is Java? If we are talking about Java, then do not listen to the author, C ++ and Java are different languages ​​\u200b\u200bfor different tasks, yes, you can solve almost any problem in almost any language, but everywhere there will be pluses and minuses. If you write a game engine, then C ++ is better because of performance.
It is better to choose an engine like Unity, ureal engine, etc. If you write game logic, then C ++ is obviously better than C (and something more high-level is even better), if you write the engine itself, then I would choose C ++, because. in C ++ there are more ready-made ones, the same STL is the classes.
You can, of course, but it’s better to learn what you need right away.
And what is the purpose? Write a game or an engine? If it's a game, then you need to learn a ready-made engine like UE(Blueprints|C++), Unity(C#), if it's an engine, then C++. And Java is a bit for other tasks.
The main difficulty of the language is the ability to shoot yourself in the foot and backward compatibility (in C ++ it is very rare to cut something out of the language), so you just need a little more time to learn than with other languages ​​​​and a little more practice so as not to shoot yourself in the foot .

K
Konstantin Kitmanov, 2017-08-07
@k12th

To be fair, Java has game engines like libgdx. But this is rather the case when it burns directly to make a game, you know Java, but there is no time and desire to learn a new language. There is no point in learning Java specifically for libgdx alone.
It makes sense to learn a ready-made engine, or at least a library, so as not to spend a couple of years of your life and end up with a pale semblance of a gulmen. Games are primarily content - gameplay, story, level design, not an engine; the days of technological breakthroughs like Wolfenstein 3d → Doom → Quake and lone geniuses are over. Even if you have some kind of completely revolutionary gameplay, it's still better to take a lib that simplifies displaying, working with sound, loading assets, etc. (OpenGL is a pretty low-level thing).

T
TheTalion, 2017-08-07
@TheTalion

1. depending on which tool to use.
2. yes.
3. no

F
First Last, 2017-08-07
@shindakioku

1. Games in C? Not bad
2. Many C++ developers also write in C (most likely, the opposite also applies). C++ is practically C, but with OOP and a lot of crap. (I don’t want to hollivar, sorry)
3. Definitely not

S
sta-ger, 2017-08-07
@sta-ger

I think it’s worth learning C ++, and C is somehow by itself if you need to learn it.

S
Sergey, 2017-08-07
@red-barbarian

The division is rather necessary not according to c++ or c, but to OOP or procedural programming paradigms. This is the tricky part of relearning.
Syntax-wise, C++ is simply an improved
C language.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question