I have questions about C/C++.
1. I know that C is simpler, but sometimes it's simpler than C++. What is easier to develop and what is faster to learn?
2. Are there any examples of games in C++? I'm talking about code examples.
3. C++ experts, please write a list of topics that I need to know for programming games in C++.
Thanks in advance!
C and C++ are more or less the same thing, except that C++ uses classes and objects, and C does not. Classes aren't essential, but it can make organizing and reusing code easier, especially in larger projects. There's a collection of game source code [here], although be aware they aren't audiogames.
I chose my choice of C ++.
Interested in answers to other questions.
You might also want to factor into your decision the fact that C++ is probably far safer than C is. 99 percent of C's standard library is pointers and direct memory manipulation, with no thoughts to safety -- hell, strings were more of an afterthought rather than being implemented as a part of the language like they are in C++ -- so it's slightly more dangerous to do stuff like that in C than it is in C++.
5 (edited by visualstudio 2017-09-01 07:59:12)
first, let me clarify some stuff here
1. as stated, C++ has classes while c hasnt
but it doesnt mean that you have to use classes
instead, c uses structures (thats not oop programming like c++) it doesnt have inheritance, lambdas (i mean C++11 and c11), etc
2. C++ has templates while c hasnt
3. c code compiles faster, because it doesnt need to mangle the functions, etc
4. it doesnt mean who has programmed in C++ can program fully in c
there are some little differences (c uses malloc/free while C++ uses new/delete for there own memory management)
i mean the standard (C++ programmers can use malloc/free too)
I said that I chose C ++.
I need an answer to the question what in C++ I need to know for game development.
To be honest, I have no idea. I'd say you need to know the language very well and your libraries of choice. Other than that...
first, you need to know what you want to code, then, memory management, (if you want your game to be more realistic), learn physics (you can use something like bullet or ode)
working with sound, (in video game working with graphics), and the library that you are using