Re: Reflection in game engine (c++)

Tinco Andringa <[email protected]> Thu, 14 Mar 2013 21:34:15 +0100
Newsgroups gmane.games.devel.sweng
Message-ID <CAGW=8Rrh7T8gUfyZWH5260wqkq_GDFQ-XHdayO1QfndjmXEdVw@mail.gmail.com>
Sorry, Component Entity System, it's a way of organizing your game
engine that has some popularity amongst in the industry. Here's a
quick overview from someone who worked on the Tony Hawk games:
http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/

I just read Gabriel's linkedin and he's got years of experience on big
games so I guess he really has a good reason to check if reflection
can optimize his pipeline.


On Thu, Mar 14, 2013 at 7:55 PM, Thatcher Ulrich <[email protected]> wrote:
> "CES"?
>
> On Thu, Mar 14, 2013 at 2:09 PM, Gabriel Sassone <[email protected]> wrote:
>> Hello gents,
>>    I wanted to experiment with reflection and I found different way to
>> obtain it:
>>
>>   1) Invasive macro based registration
>>   2) Reflection visitor pattern
>>   3) Parsing pdb/clang stuff and create a manual table of what you want/need
>>   4) c++ custom parser that uses tags to create reflection informations
>> (like a comment near a member, ...) (exuberant ctags???)
>>   5) create serializable/reflected classes in a data format, then run a tool
>> that generates headers and cpps
>>
>> I am trying to figure out flaws and merits of each kind, and even if there
>> are other solutions.
>> I love the idea to have the possibility to serialize in and out structures,
>> access fields and change values, stream in/out stuff from network ,and maybe
>> link with scripting.
>>
>> My goal is to have fast iteration times, both artists and programmers, and I
>> achieved it for rendering programmers already with having json binarized
>> configurable rendering, but still there are code stuff that are not easy to
>> achieve.
>>
>> Here are my thoughts, but I would like to hear your ideas and experiences!
>>
>> 1) Very precise on what you can register/serialize, but painful to maintain
>> or plug into an existing codebase
>> 2) Less precise but you just need one method per class, that you can use to
>> serialize/reflect. Still bad in maintaining, but better in plugging in.
>> 3) You make the compiler do the work, then translate the informations you
>> need in your format. Easy to maintain, to plug...maybe slow in parsing? Slow
>> your build pipeline?
>> 4) maybe easier than using pdbs, but less powerful (you cannot invoke
>> methods on objects). should be faster than 3.
>> 5) crazy idea. requires generation of code from outside...powerful like 4,
>> so data reflection, but you cannot invoke methods if you want.
>>
>> What are your experiences/thoughts?
>>
>> Thanks to everyone that read this mail!
>>
>>     Gabriel
>>
>>
>> _______________________________________________
>> Sweng-Gamedev mailing list
>> [email protected]
>> http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com
>>
> _______________________________________________
> Sweng-Gamedev mailing list
> [email protected]
> http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com
_______________________________________________
Sweng-Gamedev mailing list
[email protected]
http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com