C++ Game Development - Many Ways to Kill an Orc (or a Hero)
Talkat CppCon 2024 · on Monday, 2024-09-16· at 15:15· Cottonwood 2/3, 6700 North Gaylord Rockies Boulevard·
summary
Compares concrete implementations: virtual-inheritance polymorphism, template-based interfaces, C++20 Concepts for intent and std::variant visitor-based dispatch, with working code and slides on the CppCon repo. Measures object sizes and run times (example numbers show a virtual-class baseline around ~500µs vs ~300µs with variant in one experiment), notes compile-time and extensibility tradeoffs, and demonstrates playable examples that compile and run; conclusion: trade-offs matter — size, speed, compile cost, and ease of adding new types.
AI-written summary · about
chapters (8)
- 0:00Game violence and C++ design
- 10:20Character violence pitfalls
- 23:00Modern C++ vs virtual inheritance
- 30:07Performance impact of designs
- 35:10Team combat with polymorphism
- 40:46Combat without base classes
- 46:45Design approaches compared
- 50:01Q&A
related talks
49mA Journey Into Non-Virtual Polymorphism in C++
01h 01mUsing Modern C++ to Eliminate Virtual Functions
01h 18mMeta Polymorphism
48mBack to Basics: Cpp Value Semantics
59mstd variant and the power of pattern matching
01h 28mData-Oriented Design and C++
05mLightning Talk: Is Polymorphism in C++ Really That Bad?
32mOptimizing Away C++ Virtual Functions May Be Pointless
