Is C++ better than C for game development? | SoloLearn: Learn to code for FREE!

+14

Is C++ better than C for game development?

2/3/2020 11:43:56 PM

Odnantiev

59 Answers

New Answer

+20

Yes, it's not a pure OO language like C# (which is arguably a better language for some games). C++ supports both procedural and Object oriented paradigms, was one of the first major languages to introduce OO concepts and has fast performance. The down side is that the programmer has to keep track of memory management unlike in newer languages like Java and C#, but that maybe a topic for another discussion.

+13

Odnantiev right, and these objects don't always have to move. They could glow, scream, etc. and exhibit different kinds of behaviour. They could be abstract entities too, that are not always visible or tangible. This stuff could be implemented in C too but it's easier to manage using OO languages.

+11

I would say C++ is better than C for more complex games as OO can be used to better model the objects used in the game. But as Ярослав Вернигора(Yaroslav Vernigora) said, C# is another option.

+10

Odnantiev sorry. By OO, I meant object orientation. This means that you can use classes to model the attributes and behaviour of 'objects' within the game.

+7

https://amp.reddit.com/r/programming/comments/41ij6s/c_or_c_for_my_game_engine/With%20a%20modern%20compiler,%20C++%20is%20only%20slower%20than%20C%20in%20the%20specific%20cases%20the%20programmer%20is%20opting%20in%20to%20a%20feature.%20...%20C++%20allows%20writing%20higher-level%20code,%20producing%20easier%20and%20simpler%20APIs.%20Some%20people%20want%20to%20understand%20the%20language%20easier,%20some%20people%20want%20to%20write%20advanced%20code%20easier

+5

Odnantiev 👍

+4

You are interest only gaming or something else?

+3

Hi! For game development is better C++ or C# (is used in game engines)

+3

+3

Yes I think because C++ is like the pro language of C

+3

Cpp Have many of minuses, but pluses too. 1. If you game is platformer, Cpp better. Graphics.h not in C 2. If you game is simple, like that; String a = Console.ReadLine() So, cpp better. ------BUT------ C cool in simple games too. ------ENDBUT------ 3. If your game is VERY hard, using by you heart. So C get Very good CLEAR programming. But cp p is graphics, lines, and very small clear programming -------- C -------- Finnaly, output; 56,8% ONLY GAMES IN PROGRAMMING(CLEAR PROGRAMMING) 43,2% GRAPHICS -------- C++(Cpp) -------- 50% GRAPHICS 30% CLASSES 13,4% CLEAR PROGRAMMING 6,2% STRUCTS 0,3% GET(GETTERS) AND SET(SETTERS) F I N N A L Y --------------MY----SOLVE---------------- I think you must trying write a game on Cpp, and trying write on C Whats you like, on thats write. #HOPEIHELP

+3

Yes C++ is better then C. But the real question is do you need C++ for the games you want to create?

+3

C++ is best

+2

Hello! Thank you, and yes it would be very cool to get all the tips i can since im just starting to get into programming xd

+2

Sonic oh ok thank you, also what do you mean by OO?

+2

Sonic its alright, so basically the things that you control when ur playing the game and the stuff that moves for itself?

+2

Sonic oh wow ok loool, thanks a lot

+2

Sonic so that means that C++ is an OO language?

+2

Sonic Oh ok ok i kinda understand lol thanks :))

+2

You can start with C++ or C#, but if you want to understand game mechanics, you can try to make games for example in web (javascript and framework Phaser3), in Python (PyGame, RenPy) and others... Games for PC: - Unity (C#), - Cryengine V (C++), - Unreal engine 4 (C++) (games for pc, vr, playstations) JavaScript (Construct 2 engine), Gamemaker(only 2D, without program language) In Python: RenPy (2D) or Pygame 2D engines for beginners: - Stencyl, - RPG-maker, - Ink - free addition for Unity (html, c#). - GameMaker Studio2 (paid 100$, drag&drop technology)