Sponsored By

Sponsored Feature: Behind the Mirror - Adding Reflection to C++ 2Sponsored Feature: Behind the Mirror - Adding Reflection to C++ 2

In an <a href=http://www.gamasutra.com/view/feature/6379/sponsored_feature_behind_the_.php>Intel-sponsored reprint</a> from Game Developer magazine, software engineer Geoff Evans takes a look at the benefits of implementing a reflection system in C++.

May 18, 2011

1 Min Read
Game Developer logo in a gray background | Game Developer

Author: by Staff

In an Intel-sponsored reprint of a Game Developer magazine article from February 2011, Insomniac veteran and current senior engineer at WhiteMoon Dreams Geoff Evans takes a look at the benefits of implementing a reflection system in C++. Evans explains that a reflection system "adds the ability for a program to utilize its own structure to inform its behavior," allowing developers to more easily implement changes and add new features. Implementing such a system is no easy task, but Evans notes that the benefits are often worth the extra effort. He points out that with a reflection system, developers gain "the ability to automate the serialization of objects into and out of a file, cloning, comparison, search indexing, and network replication, type conversion (copying base data between derived class instances), and user interface generation." "Reflection can imbue an enormous amount of flexibility to your game engine, but this flexibility doesn't come without cost," Evans writes. "However, the extra memory reflection data consumes is balanced by the time saved implementing features more rapidly. "The ability to deliver changes to your users quickly, and with minimal engineering overhead, will pay dividends as your user base grows and your production time stretches across multiple titles." The sponsored feature is now live on Gamasutra, offering concrete examples that demonstrate several ways to implement reflection systems in a game engine.

Daily news, dev blogs, and stories from Game Developer straight to your inbox

You May Also Like