News for hackers. Stuff that matters.
Re:C or C++ for my game engine? by flohofwoe on Monday January 18, 2016 @04:30AM (#10923445)
Completely agree, this is why most game developers use only a subset of C++ as "C with classes", and at the end of that thought process some are going back to C completely (I haven't made the jump yet though, but have been pondering this for at least 2 years). What I still like about C++:

- user-provided code called when an "object" goes out of scope

- operator overloading sometimes makes sense

- simple template-meta-programming sometimes makes sense (but could be replaced with other sorts of code-generation)

3rd party libraries are usually a pain to integrate when they have a C++ interface, and usually simple when they are just a C header, and when they can simply be dropped in as source into the project.

A good middle-ground is probably to build the building blocks in C, this way they are way better reusable then writing C++ code, also across languages, and tie the low-level buildings blocks together in whatever language one likes (even interpreted languages).

[edit: formatting]

Re:C or C++ for my game engine? by krisdol on Monday January 18, 2016 @08:38AM (#10924282)
Most are not writing their own engines anymore.

In this day of mobile and web gaming, indie developers everywhere, and game engines like Unity and UE4 being so accessible, I think more game developers are writing games in Java, JavaScript, C#, and other garbage collected languages -- not to mention "visual programming" of Unity and UE4.

If you're writing a game engine in C/C++ today you're probably never going beyond the desktop Windows platform.

Re:C or C++ for my game engine? by taloft on Monday January 18, 2016 @04:38PM (#10927174)
Performance will be back if VR gets adopted. At 90 fps, you have around 11 milliseconds to update your game state and render views for each eye. That is not much time. C#/unity and scripting languages will have a noticeable penalty compared to native C code. Bloated engines will likely suffer as well.