Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's one important question left out: what kind of games does the author make? I can see how 'vanilla' C can be more than sufficient for basic 2D games, but as soon as you grow in complexity it can quickly become an insurmountable task to grok.


What exactly is it about 3D that becomes harder to grok? You can still abstract things away by passing around pointers to C structs.


It's not 3D that's harder to grok, it's more that the nature of 3D games are often bigger with more environmental triggers and events that can quickly become very tightly integrated and difficult to make abstract compared to, say, C++ or other languages.


Basic games like...Quake 3?


Yup. Quake 3 is basic. I remeber that the whole game had a "measly" 150.000 lines of code or so. It doesn't do a ton of things modern games do. The list of things expected from modern games these days in comparion is far too long to list here. These things have become elaborate world simulators. And all of these features add up.

The Unreal Engine is around 4 million lines without dependencies (e.g. PhysX, a proper audio engine, etc). You could try to do all that in C (good luck finding a good physics library with a plain C interface, btw.). But you need to have proper software design throughout the project and you will likely end up replicating some kind of inheritance or polymorphism scheme somewhere.


Quake 3 has 230.000 lines of code. If Quake 3 is considered basic, then any studio with less than 100 developers can probably reach for C.

The Unreal Engine is far more than a modern game. You wouldn't call Clang and editor just because Vi was compiled with it.


The Unreal Engine is less than a modern game. The actual game is obviously missing. Also, you need engine specific editing tools to make a 3d game that looks more advanced than minecraft. It is a mistake to exclude them just because the don't have to be shipped with the final product.

And Quake 3 was made by a team of roughly 20 people. Id Software was quite small until they started to work on Rage.


Quake's code is very tightly coupled to the actual game logic and difficult to pull apart and reuse for another kind of game. A lot of this can and often is more abstract in newer games. That said, quake is very well written and a good example for when C can shine.


Looks like mostly 2D, but he's got some 3d games. I saw Knossu mentioned here once, it's pretty good.

And there's still plenty of life left in 2D anyway. Not everyone wants to crank out the next Fortnite or whatever the kids are into these days.


Factorio, prison architect, papers please, FTL... lots of the best reviewed and most influential recent games are 2d.

Civilization.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: