Hacker News new | ask | show | jobs
by reader_mode 2002 days ago
I'm blaming C++ because :

- there is very little information in the community on how to do this kind of engineering efficiently (at least I haven't encountered it nearly as much as I have when I transitioned to application development in higher level languages) - there is very little code sharing in the community and zero standardisation - everyone reinvents shit from standard library, coding conventions, what subset of the language is "allowed", etc. etc. - this means developing good tooling, practices and patterns across large projects is hard

Unity is written in C++, C# is scripting layer and more importantly I doubt Unity developers doing C++ are C# engineers with C# application development background where stuff like automated testing is pretty standard.

1 comments

> there is very little information in the community on how to do this kind of engineering efficiently

If you aren't a huge studio writing a AAA game or thereabouts in complexity you probably can't write a game engine efficiently.

The number of places that do have that scale and need help on how to be efficient is probably vanishingly small so not a lot of self help pops up.

> (at least I haven't encountered it nearly as much as I have when I transitioned to application development in higher level languages

Pick an engine and use its language whatever that is. Unity gives you C#. Unreal gives you a C++ dialet with some nice features and a blackboard system for scripting that is quite powerful.

> there is very little code sharing in the community and zero standardisation

From my experience there is little code sharing within a studio so expecting there to be code sharing across the entire community is hard.

Assuming you are looking for high performance (AAA) you basically have to write a bespoke engine for your gameplay. And there are a lot of different ways of doing gameplay. Heck whether you have loading zones or continuous loading makes a huge impact on how some fundamental things work (again if you aren't huge there are workarounds that make it easier to generalize in exchange for performance)

> everyone reinvents shit from standard library, coding conventions, what subset of the language is "allowed"

The standard library has some huge performance problems for video games. Mostly around allocation rules. Unsurprisingly algorithms for millions of things can have bad performance side effects on tens of things (and visa versa).

> this means developing good tooling, practices and patterns across large projects is hard

To be fair I think this is generally true. Games just tend to build up their codebases super fast but maintaining any huge code base is a pain in the best cases and it is never the best case.