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

Not to mention we're talking about programming games here and you generally preload your assets and don't mess with them dynamically or your performance tanks. It's not only systems programming.


game engines typically do a lot of dynamic allocation, even aside from loading new levels; tight control over where that allocation happens and what to do when it fails is maybe the most important reason c++ is so popular in the space

c++ is a good example of having tight low-level control without programming with a lot fewer abstractions. indeed, the abundance of abstraction is what makes c++ usually so painful

i think it's reasonable to describe game engine programming as systems programming. i mean some of it, like writing interpreters, persistence frameworks, drivers for particular devices, and netcode, is pretty obviously right in the core of systems programming, but plausibly all of it is in that wheelhouse


> tight control over where that allocation happens and what to do when it fails is maybe the most important reason c++ is so popular in the space

It's also the most important reason why the C++ standard library is so unpopular in the space. All standard C++ containers allocate implicitly because often enough that's OK even in systems programming. What matters is that you can control the allocation more finely when you want.


yeah, agreed. when adding the stl to the standard library was being debated in the standards committee, microsoft forced the stl to use pluggable allocators, so you can easily make your std::vector allocate on your per-frame pointer-bumping heap, but often that's a poor substitute for not allocating at all




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

Search: