Loading…
Wednesday September 16, 2026 16:45 - 17:45 MDT
Scripting in a C++ game engine should not cost you the engine's native performance. This talk shows how C++26 static reflection and std::meta::substitute in particular can lift a scripting language's bytecode into C++ template structures that the compiler optimizes away entirely, collapsing the interpreter dispatch loop into the same machine code you'd write by hand. Scripting languages like AngelScript and Lua are invaluable in C++ engines: they give designers a fast iteration loop without rebuilding the engine. But they come with a paradox. The engine you chose for raw performance now spends cycles on every frame interpreting a slower language, juggling a software stack and checking types at runtime. We will walk through the technique step by step, starting from a plain bytecode interpreter and ending at a fully reflected program where a scripted sum(0..10) compiles to mov eax, 45; ret. Along the way you'll learn the core C++26 reflection primitives (^^, [: :], std::meta::substitute), how to assemble bytecode into structural templates like block<> and loop<>, and how these techniques generalize to embedding any stack or register based scripting language in your engine with zero runtime overhead.

Presenters
avatar for Koen Samyn

Koen Samyn

Koen is a senior software engineer and lecturer at digital art and entertainment whose primary focus is bringing modern C++ to GPU-driven game technology. Over the past decade he has built and optimized compute-shader pipelines for lighting, physics, and inverse kinematics. In the... Read More →
Wednesday September 16, 2026 16:45 - 17:45 MDT
_4

Log in to save this to your schedule, view media, leave feedback and see who's attending!

Share Modal

Share this link via

Or copy link