TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Thoughts on Modern C++ and Game Dev

150 pointsby lebekover 6 years ago

12 comments

arandr0xover 6 years ago
I&#x27;m not in games but my industry is adjacent and I have the same gripes with c++. (Which the author characterized very well.) Although build and debug times definitely are an issue regardless of the performance of the hardware.<p>I find reading C++ &quot;standards&quot; papers onerous and feel like they&#x27;re written in a way that&#x27;s deliberately inaccessible. I don&#x27;t much like the idea of going to CppCon -- even if my company funded it, which maybe they would, I feel like I&#x27;d be marginalized for not using template metaprogramming, not knowing the new hotness by heart, and generally being a proponent of C-with-classes. I just feel like so much of the C++ &quot;standards&quot; work feels like it&#x27;s led by academics who think the concerns of working programmers like me are beneath them.<p>Is there a way I can &quot;get involved&quot; and does my voice have any value?
评论 #18825054 未加载
评论 #18826141 未加载
评论 #18824946 未加载
评论 #18827084 未加载
评论 #18825250 未加载
评论 #18829913 未加载
dengover 6 years ago
So, the solution to bad debug performance is essentially YAGNI? I&#x27;m afraid that isn&#x27;t a very convincing argument. If your code is several orders of magnitude slower in debug mode, then this <i>is</i> a problem. Simply downplaying this with arguments like &quot;single-step debugging is a last resort&quot; or &quot;just write better tests&quot; won&#x27;t make this problem vanish. Just like exploding compile times are not solved with &quot;just buy Incredibuild&quot;.<p>But his argument fits well with C++&#x27;s history of finding exceedingly complex solutions for simple problems. Want to have efficient matrix calculation? Well, who needs native support for matrices when you can do the same with expression templates and static polymorphism&#x2F;CRTP (see: Eigen library).<p>The last section of the article says you either do nothing or you get involved. I&#x27;m afraid it is missing the obvious third option: switch to another language which actually supports your use case.
评论 #18824195 未加载
评论 #18824791 未加载
评论 #18823687 未加载
评论 #18824636 未加载
jayd16over 6 years ago
I don&#x27;t want to weigh in on the rest of the content but the characterization of the game industry is pretty accurate in my experience.<p>I would expand more on the first bullet point of why game devs don&#x27;t test. Tests are anti-agile and game development is extremely agile. Usually you don&#x27;t know what kind of game you&#x27;re making until you&#x27;re done.
评论 #18822879 未加载
评论 #18825140 未加载
评论 #18826160 未加载
评论 #18823069 未加载
评论 #18823051 未加载
评论 #18823846 未加载
overgardover 6 years ago
A few thoughts:<p>* None of the problems that have been commented on are unique to the games industry at all. Slow debug builds suck for all C++ developers and weird template meta-programming is confusing for practically everyone.<p>* He makes these broad hand-wavey statements like &quot;individuals don&#x27;t feel pain from slow compile times&quot;, or &quot;big companies can just can throw processor power at it&quot; to which I would say, BS. Fast iteration in C++ is really hard because of the delay and it&#x27;s a big problem for everyone.<p>* &quot;Participate more&quot; -- isn&#x27;t that exactly what people are doing on twitter? Not everyone can go to CppCon.
评论 #18824692 未加载
评论 #18824622 未加载
youdontknowthoover 6 years ago
Whenever the response to a twitter argument is &quot;get involved and make the change you want to see happen&quot; you can expect absolutely nothing to change.<p>Part of this is just people complaining on a platform that over values short pithy complaints.
pulsarpietroover 6 years ago
I am a bit puzzled by this:<p>&quot;Before about the early 90s, we didn’t trust C compilers, so we wrote in assembly.&quot;<p>There a lot of games released during the 80&#x27;s, were they really all written in assembly ?<p><a href="https:&#x2F;&#x2F;www.myabandonware.com&#x2F;browse&#x2F;year&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.myabandonware.com&#x2F;browse&#x2F;year&#x2F;</a><p>I don&#x27;t have experience in the game industry at all, I must add.
评论 #18822739 未加载
评论 #18822999 未加载
评论 #18823206 未加载
评论 #18822955 未加载
评论 #18822922 未加载
评论 #18825763 未加载
评论 #18823064 未加载
评论 #18822741 未加载
评论 #18824663 未加载
CoolGuySteveover 6 years ago
Is Visual Studio really the best debugger?<p>Every time I use it I get really frustrated by the difficulty of entering complex instructions. The GUI is more discoverable but I find myself missing gdb ‘s functions and parser.<p>However, one thing in gdb that’s become steadily worse is the ability to evaluate STL’s operator[] and the like in optimized code, with the debugger frequently whining about inlining. It’s pretty horrible having to decipher the _m_data or whatever of various implementations.<p>I’m actually not sure if gcc is not compiling the inlines into the object code (I thought it was required by the standard) or if gdb just can’t find them.
评论 #18823309 未加载
评论 #18823100 未加载
评论 #18834237 未加载
arka2147483647over 6 years ago
&gt;Epilogue (... snip ...)<p>&gt; 1. Do nothing (...) You can deal with that by imposing rules on what is and isn’t allowed in your codebase, (...)<p>This is what everybody is already doing in gamedev<p>&gt; 2. Get involved (...) C++ committee participation is open to everyone. (...)<p>Most game dev studios are Small or Mediums sized companies, and don&#x27;t really have the time to waste in Committee meatings...
评论 #18823730 未加载
pmarinover 6 years ago
&gt;Stop going to GDC as your one conference per year and start going to CppCon.<p>In fact the most popular CppCon video in Youtube is from Mike Acton: “Data Oriented Design and C++”
shmerlover 6 years ago
Game developers should start using more Rust.
评论 #18834769 未加载
评论 #18823906 未加载
edooover 6 years ago
Most industry game dev is also done on top of C++ engines and libraries. I can see Go being used in the near future as the big engines offer bindings but I bet in 5-10 years the average startup is using something like C#. It is slow as beans but eventually CPU speed will make it much more reasonable for real use. The Unity engine is a good example. It has a weird easy powerful super bloated paradigm.
评论 #18824597 未加载
评论 #18824551 未加载
评论 #18825739 未加载
mark-rover 6 years ago
Maybe the QA folks are worse off in game dev companies, but they seem to be second class citizens everywhere else too. Which is a pity, since as stated they are worth their weight in gold. A developer has a mindset of how do I make this work, a QA person has a mindset of how do I make this break - they are completely complimentary.