2017-08-31 21:52:35

Hey.
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!

2017-09-01 03:38:47

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.

-BrushTone v1.3.3: Accessible Paint Tool
-AudiMesh3D v1.0.0: Accessible 3D Model Viewer

2017-09-01 06:50:08

I chose my choice of C ++.
Interested in answers to other questions.

2017-09-01 08:50:18

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++.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2017-09-01 08:57:00 (edited by visualstudio 2017-09-01 08:59:12)

hello,
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)

2017-09-01 14:43:48

I said that I chose C ++.
I need an answer to the question what in C++ I need to know for game development.

2017-09-01 16:08:22

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...

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2017-09-01 21:24:28

hi
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