Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is c++ that powerful concerning game development? [closed]

Tags:

I was just wondering why c++ ist that powerful and performant for developing games. I wrote a lot of games in c# and delphi, always using the timer component to make objects "move". Another option for the movement were loops, but they are definitely not performant.

So what technique does c++ use that users can develop performant games?

like image 333
oopbase Avatar asked Jul 23 '10 14:07

oopbase


People also ask

Is C good for game development?

The C programming language is very useful for making Game Engines but not very useful for scripting. If you want to make games for many platforms and consoles efficiently, using Unity (C#) or Unreal Engine (C++) is the best approach.

Why is C++ used for games instead of C?

C++ is compatible with low-level C and assembly language, making it easier for game developers to interact with the hardware-level components. C++ is a compiled language that gives better runtime performance than other high-level interpreted languages.

Why is C Sharp used for game development?

C# is a simple, modern, object-oriented, and type-safe programming language, and it's the most popular programming language in game development.

Should I use C or C++ game development?

C++ is an object oriented programming language while C isn't. Making games with object oriented programming is a lot less time consuming. Even games that appear to be simple are complex by software standards. They can easily consist of thousands of lines of code.


1 Answers

C++ give you finer grain of control over the actual hardware and bit pushing. For common business needs, a third generation language such as Java or C# is quicker to program and takes worries like pointers and garbage collection off the hands of the developer. This is at a cost of lack of ability to optimize and fine tune how memory and data structures are used.

You can also take a hybrid approach of breaking the game into a higher level language for scripting etc and then "drop" into C++ land for parts that require the speed and optimizations.

like image 137
Kenoyer130 Avatar answered Oct 13 '22 06:10

Kenoyer130