Re: Sweng-Gamedev Digest, Vol 71, Issue 2

Gabriel Sassone <[email protected]> Thu, 14 Mar 2013 14:27:43 -0700
Newsgroups gmane.games.devel.sweng
Message-ID <CAFcPrsFYN0FCTh7q4ecbtgbrFO2TmUyP4Ovr4daumGdcyYLFvw@mail.gmail.com>
--===============2048087572==
Content-Type: multipart/alternative; boundary=047d7b3a820c727aa904d7e93112

--047d7b3a820c727aa904d7e93112
Content-Type: text/plain; charset=ISO-8859-1

Thanks for the reply,
    mine is just a brain dumped exploration of how to have fast iteration
times.

It is not only an artist need to swap/add assets, but my general feeling is
about other programming workflows that can be used.
Like for gameplay programmers, having a runtime compiled c++ could increase
a lot iterations and ideas.

What I don't like is this delay between coding and testing something, even
a small change...

I am not searching for patterns but for experiences!

Thanks Tinco, your is a good idea, even if ambitious! Do you have any
experience on that?
Still not speaking about work here, but more about inner-thoughts.

I feel that a reflection using clang/pdbs is far easier and use already
existing informations stored, and it makes more sense to me, in both large
or small codebases.
But I am worried about the parsing speed of the db and that you need to do
after every compiling.


On Thu, Mar 14, 2013 at 1:43 PM, <
[email protected]> wrote:

> Send Sweng-Gamedev mailing list submissions to
>         [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
>
> http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com
>
> or, via email, send a message with subject or body 'help' to
>         [email protected]
>
> You can reach the person managing the list at
>         [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Sweng-Gamedev digest..."
>
>
> Today's Topics:
>
>    1. Reflection in game engine (c++) (Gabriel Sassone)
>    2. Re: Reflection in game engine (c++) (Tinco Andringa)
>    3. Re: Reflection in game engine (c++) (Tinco Andringa)
>    4. Re: Reflection in game engine (c++) (Thatcher Ulrich)
>    5. Re: Reflection in game engine (c++) (Thatcher Ulrich)
>    6. Re: Reflection in game engine (c++) (Tinco Andringa)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 14 Mar 2013 11:09:30 -0700
> From: Gabriel Sassone <[email protected]>
> To: [email protected]
> Subject: [Sweng-Gamedev] Reflection in game engine (c++)
> Message-ID:
>         <CAFcPrsFBD6mgMFR8dFsi3=
> [email protected]>
> Content-Type: text/plain; charset="iso-8859-1"
>
> 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
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.midnightryder.com/private.cgi/sweng-gamedev-midnightryder.com/attachments/20130314/c4522aed/attachment-0001.htm
> >
>
> ------------------------------
>
> Message: 2
> Date: Thu, 14 Mar 2013 19:36:21 +0100
> From: Tinco Andringa <[email protected]>
> To: [email protected]
> Cc: [email protected]
> Subject: Re: [Sweng-Gamedev] Reflection in game engine (c++)
> Message-ID:
>         <CAGW=
> [email protected]>
> Content-Type: text/plain; charset=UTF-8
>
> Hi Gabriel,
>
> In an effort to make C/C++ more like C# I did a bit of research into
> adding type/signature information to binaries using clang. A downside
> of this approach is that you're restricted to the clang compiler, but
> in return you get a lot of power over the compilation process.
>
> The idea is rather simple, the compiler visits all nodes in the C++
> AST, you can write a clang module that hooks into that process and
> record type information and then at the end store it in a section of
> the binary. Then in your code you can simply refer to that section and
> read it to get type information.
>
> But that being said, it's a rather ambitious project and I don't
> really see how going on such a quest is a wise time investment for
> your game pipeline.
>
> Some of the things you mention (serializing, streaming) can be done by
> having a neat data model and a good serialization protocol. For
> example if your game uses a CES architecture you just need a
> serialization for the data structure of each component. Together with
> the id's of the components and the objects you could stream in or out
> any aspect of the game without ever needing reflection.
>
> I imagine you could even dynamically load/replace components sent over
> the network, enabling some sort of hot code swapping :)
>
> Is your game architected in such a way that that would be possible?
> Perhaps if your codebase is very large already it's not feasible to
> rearchitect to such an extent, though I've heard some studios switched
> to CES in the middle of their dev process. It is possible to gradually
> migrate from hierarchical architecture to CES (I'm doing so for my own
> project atm too).
>
> Hope this is useful.
>
> Kind regards,
> Tinco
>
>
> On Thu, Mar 14, 2013 at 7: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
> >
>
>
> ------------------------------
>
> Message: 3
> Date: Thu, 14 Mar 2013 19:36:21 +0100
> From: Tinco Andringa <[email protected]>
> To: [email protected]
> Cc: [email protected]
> Subject: Re: [Sweng-Gamedev] Reflection in game engine (c++)
> Message-ID:
>         <CAGW=
> [email protected]>
> Content-Type: text/plain; charset=UTF-8
>
> Hi Gabriel,
>
> In an effort to make C/C++ more like C# I did a bit of research into
> adding type/signature information to binaries using clang. A downside
> of this approach is that you're restricted to the clang compiler, but
> in return you get a lot of power over the compilation process.
>
> The idea is rather simple, the compiler visits all nodes in the C++
> AST, you can write a clang module that hooks into that process and
> record type information and then at the end store it in a section of
> the binary. Then in your code you can simply refer to that section and
> read it to get type information.
>
> But that being said, it's a rather ambitious project and I don't
> really see how going on such a quest is a wise time investment for
> your game pipeline.
>
> Some of the things you mention (serializing, streaming) can be done by
> having a neat data model and a good serialization protocol. For
> example if your game uses a CES architecture you just need a
> serialization for the data structure of each component. Together with
> the id's of the components and the objects you could stream in or out
> any aspect of the game without ever needing reflection.
>
> I imagine you could even dynamically load/replace components sent over
> the network, enabling some sort of hot code swapping :)
>
> Is your game architected in such a way that that would be possible?
> Perhaps if your codebase is very large already it's not feasible to
> rearchitect to such an extent, though I've heard some studios switched
> to CES in the middle of their dev process. It is possible to gradually
> migrate from hierarchical architecture to CES (I'm doing so for my own
> project atm too).
>
> Hope this is useful.
>
> Kind regards,
> Tinco
>
>
> On Thu, Mar 14, 2013 at 7: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
> >
>
>
> ------------------------------
>
> Message: 4
> Date: Thu, 14 Mar 2013 14:55:28 -0400
> From: Thatcher Ulrich <[email protected]>
> To: [email protected]
> Cc: [email protected]
> Subject: Re: [Sweng-Gamedev] Reflection in game engine (c++)
> Message-ID:
>         <CAMa9PtQJhRwhx_tcpUOX=
> [email protected]>
> Content-Type: text/plain; charset=ISO-8859-1
>
> "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
> >
>
>
> ------------------------------
>
> Message: 5
> Date: Thu, 14 Mar 2013 14:55:28 -0400
> From: Thatcher Ulrich <[email protected]>
> To: [email protected]
> Cc: [email protected]
> Subject: Re: [Sweng-Gamedev] Reflection in game engine (c++)
> Message-ID:
>         <CAMa9PtQJhRwhx_tcpUOX=
> [email protected]>
> Content-Type: text/plain; charset=ISO-8859-1
>
> "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
> >
>
>
> ------------------------------
>
> Message: 6
> Date: Thu, 14 Mar 2013 21:34:15 +0100
> From: Tinco Andringa <[email protected]>
> To: [email protected]
> Cc: [email protected]
> Subject: Re: [Sweng-Gamedev] Reflection in game engine (c++)
> Message-ID:
>         <CAGW=
> [email protected]>
> Content-Type: text/plain; charset=UTF-8
>
> 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
>
>
> End of Sweng-Gamedev Digest, Vol 71, Issue 2
> ********************************************
>

--047d7b3a820c727aa904d7e93112
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Thanks for the reply,<div>=A0 =A0 mine is just a brain dumped exploration o=
f how to have fast iteration times.</div><div><br></div><div>It is not only=
 an artist need to swap/add assets, but my general feeling is about other p=
rogramming workflows that can be used.</div>
<div>Like for gameplay programmers, having a runtime compiled c++ could inc=
rease a lot iterations and ideas.</div><div><br></div><div>What I don&#39;t=
 like is this delay between coding and testing something, even a small chan=
ge...</div>
<div><br></div><div>I am not searching for patterns but for experiences!</d=
iv><div><br></div><div>Thanks Tinco, your is a good idea, even if ambitious=
! Do you have any experience on that?</div><div>Still not speaking about wo=
rk here, but more about inner-thoughts.</div>
<div><br></div><div>I feel that a reflection using clang/pdbs is far easier=
 and use already existing informations stored, and it makes more sense to m=
e, in both large or small codebases.</div><div>But I am worried about the p=
arsing speed of the db and that you need to do after every compiling.</div>
<div><br></div><div><br><div class=3D"gmail_quote">On Thu, Mar 14, 2013 at =
1:43 PM,  <span dir=3D"ltr">&lt;<a href=3D"mailto:sweng-gamedev-request@lis=
ts.midnightryder.com" target=3D"_blank">[email protected]=
tryder.com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">Send Sweng-Gamedev mailing list submissions =
to<br>
=A0 =A0 =A0 =A0 <a href=3D"mailto:[email protected]">sw=
[email protected]</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
=A0 =A0 =A0 =A0 <a href=3D"http://lists.midnightryder.com/listinfo.cgi/swen=
g-gamedev-midnightryder.com" target=3D"_blank">http://lists.midnightryder.c=
om/listinfo.cgi/sweng-gamedev-midnightryder.com</a><br>
<br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
=A0 =A0 =A0 =A0 <a href=3D"mailto:[email protected]=
.com">[email protected]</a><br>
<br>
You can reach the person managing the list at<br>
=A0 =A0 =A0 =A0 <a href=3D"mailto:[email protected]=
om">[email protected]</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of Sweng-Gamedev digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
=A0 =A01. Reflection in game engine (c++) (Gabriel Sassone)<br>
=A0 =A02. Re: Reflection in game engine (c++) (Tinco Andringa)<br>
=A0 =A03. Re: Reflection in game engine (c++) (Tinco Andringa)<br>
=A0 =A04. Re: Reflection in game engine (c++) (Thatcher Ulrich)<br>
=A0 =A05. Re: Reflection in game engine (c++) (Thatcher Ulrich)<br>
=A0 =A06. Re: Reflection in game engine (c++) (Tinco Andringa)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Thu, 14 Mar 2013 11:09:30 -0700<br>
From: Gabriel Sassone &lt;<a href=3D"mailto:[email protected]">gsassone7@=
gmail.com</a>&gt;<br>
To: <a href=3D"mailto:[email protected]">sweng-gamedev@=
lists.midnightryder.com</a><br>
Subject: [Sweng-Gamedev] Reflection in game engine (c++)<br>
Message-ID:<br>
=A0 =A0 =A0 =A0 &lt;CAFcPrsFBD6mgMFR8dFsi3=3D<a href=3D"mailto:SsPM04ABN97o=
[email protected]">[email protected]=
m</a>&gt;<br>
Content-Type: text/plain; charset=3D&quot;iso-8859-1&quot;<br>
<br>
Hello gents,<br>
=A0 =A0I wanted to experiment with reflection and I found different way to<=
br>
obtain it:<br>
<br>
=A0 1) Invasive macro based registration<br>
=A0 2) Reflection visitor pattern<br>
=A0 3) Parsing pdb/clang stuff and create a manual table of what you want/n=
eed<br>
=A0 4) c++ custom parser that uses tags to create reflection informations<b=
r>
(like a comment near a member, ...) (exuberant ctags???)<br>
=A0 5) create serializable/reflected classes in a data format, then run a<b=
r>
tool that generates headers and cpps<br>
<br>
I am trying to figure out flaws and merits of each kind, and even if there<=
br>
are other solutions.<br>
I love the idea to have the possibility to serialize in and out structures,=
<br>
access fields and change values, stream in/out stuff from network ,and<br>
maybe link with scripting.<br>
<br>
My goal is to have fast iteration times, both artists and programmers, and<=
br>
I achieved it for rendering programmers already with having json binarized<=
br>
configurable rendering, but still there are code stuff that are not easy to=
<br>
achieve.<br>
<br>
Here are my thoughts, but I would like to hear your ideas and experiences!<=
br>
<br>
1) Very precise on what you can register/serialize, but painful to maintain=
<br>
or plug into an existing codebase<br>
2) Less precise but you just need one method per class, that you can use to=
<br>
serialize/reflect. Still bad in maintaining, but better in plugging in.<br>
3) You make the compiler do the work, then translate the informations you<b=
r>
need in your format. Easy to maintain, to plug...maybe slow in parsing?<br>
Slow your build pipeline?<br>
4) maybe easier than using pdbs, but less powerful (you cannot invoke<br>
methods on objects). should be faster than 3.<br>
5) crazy idea. requires generation of code from outside...powerful like 4,<=
br>
so data reflection, but you cannot invoke methods if you want.<br>
<br>
What are your experiences/thoughts?<br>
<br>
Thanks to everyone that read this mail!<br>
<br>
=A0 =A0 Gabriel<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: &lt;<a href=3D"http://lists.midnightryder.com/private.cgi/sweng-gamede=
v-midnightryder.com/attachments/20130314/c4522aed/attachment-0001.htm" targ=
et=3D"_blank">http://lists.midnightryder.com/private.cgi/sweng-gamedev-midn=
ightryder.com/attachments/20130314/c4522aed/attachment-0001.htm</a>&gt;<br>

<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Thu, 14 Mar 2013 19:36:21 +0100<br>
From: Tinco Andringa &lt;<a href=3D"mailto:[email protected]">[email protected]</a>=
&gt;<br>
To: <a href=3D"mailto:[email protected]">sweng-gamedev@midnig=
htryder.com</a><br>
Cc: <a href=3D"mailto:[email protected]">sweng-gamedev@=
lists.midnightryder.com</a><br>
Subject: Re: [Sweng-Gamedev] Reflection in game engine (c++)<br>
Message-ID:<br>
=A0 =A0 =A0 =A0 &lt;CAGW=3D<a href=3D"mailto:8RqPSn_yPX7ChH1xYGvn04x1QPoi5%=
[email protected]">8RqPSn_yPX7ChH1xYGvn04x1QPoi5+HBaVP1puCV=
[email protected]</a>&gt;<br>
Content-Type: text/plain; charset=3DUTF-8<br>
<br>
Hi Gabriel,<br>
<br>
In an effort to make C/C++ more like C# I did a bit of research into<br>
adding type/signature information to binaries using clang. A downside<br>
of this approach is that you&#39;re restricted to the clang compiler, but<b=
r>
in return you get a lot of power over the compilation process.<br>
<br>
The idea is rather simple, the compiler visits all nodes in the C++<br>
AST, you can write a clang module that hooks into that process and<br>
record type information and then at the end store it in a section of<br>
the binary. Then in your code you can simply refer to that section and<br>
read it to get type information.<br>
<br>
But that being said, it&#39;s a rather ambitious project and I don&#39;t<br=
>
really see how going on such a quest is a wise time investment for<br>
your game pipeline.<br>
<br>
Some of the things you mention (serializing, streaming) can be done by<br>
having a neat data model and a good serialization protocol. For<br>
example if your game uses a CES architecture you just need a<br>
serialization for the data structure of each component. Together with<br>
the id&#39;s of the components and the objects you could stream in or out<b=
r>
any aspect of the game without ever needing reflection.<br>
<br>
I imagine you could even dynamically load/replace components sent over<br>
the network, enabling some sort of hot code swapping :)<br>
<br>
Is your game architected in such a way that that would be possible?<br>
Perhaps if your codebase is very large already it&#39;s not feasible to<br>
rearchitect to such an extent, though I&#39;ve heard some studios switched<=
br>
to CES in the middle of their dev process. It is possible to gradually<br>
migrate from hierarchical architecture to CES (I&#39;m doing so for my own<=
br>
project atm too).<br>
<br>
Hope this is useful.<br>
<br>
Kind regards,<br>
Tinco<br>
<br>
<br>
On Thu, Mar 14, 2013 at 7:09 PM, Gabriel Sassone &lt;<a href=3D"mailto:gsas=
[email protected]">[email protected]</a>&gt; wrote:<br>
&gt; Hello gents,<br>
&gt; =A0 =A0I wanted to experiment with reflection and I found different wa=
y to<br>
&gt; obtain it:<br>
&gt;<br>
&gt; =A0 1) Invasive macro based registration<br>
&gt; =A0 2) Reflection visitor pattern<br>
&gt; =A0 3) Parsing pdb/clang stuff and create a manual table of what you w=
ant/need<br>
&gt; =A0 4) c++ custom parser that uses tags to create reflection informati=
ons<br>
&gt; (like a comment near a member, ...) (exuberant ctags???)<br>
&gt; =A0 5) create serializable/reflected classes in a data format, then ru=
n a tool<br>
&gt; that generates headers and cpps<br>
&gt;<br>
&gt; I am trying to figure out flaws and merits of each kind, and even if t=
here<br>
&gt; are other solutions.<br>
&gt; I love the idea to have the possibility to serialize in and out struct=
ures,<br>
&gt; access fields and change values, stream in/out stuff from network ,and=
 maybe<br>
&gt; link with scripting.<br>
&gt;<br>
&gt; My goal is to have fast iteration times, both artists and programmers,=
 and I<br>
&gt; achieved it for rendering programmers already with having json binariz=
ed<br>
&gt; configurable rendering, but still there are code stuff that are not ea=
sy to<br>
&gt; achieve.<br>
&gt;<br>
&gt; Here are my thoughts, but I would like to hear your ideas and experien=
ces!<br>
&gt;<br>
&gt; 1) Very precise on what you can register/serialize, but painful to mai=
ntain<br>
&gt; or plug into an existing codebase<br>
&gt; 2) Less precise but you just need one method per class, that you can u=
se to<br>
&gt; serialize/reflect. Still bad in maintaining, but better in plugging in=
.<br>
&gt; 3) You make the compiler do the work, then translate the informations =
you<br>
&gt; need in your format. Easy to maintain, to plug...maybe slow in parsing=
? Slow<br>
&gt; your build pipeline?<br>
&gt; 4) maybe easier than using pdbs, but less powerful (you cannot invoke<=
br>
&gt; methods on objects). should be faster than 3.<br>
&gt; 5) crazy idea. requires generation of code from outside...powerful lik=
e 4,<br>
&gt; so data reflection, but you cannot invoke methods if you want.<br>
&gt;<br>
&gt; What are your experiences/thoughts?<br>
&gt;<br>
&gt; Thanks to everyone that read this mail!<br>
&gt;<br>
&gt; =A0 =A0 Gabriel<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Sweng-Gamedev mailing list<br>
&gt; <a href=3D"mailto:[email protected]">Sweng-Gamedev=
@lists.midnightryder.com</a><br>
&gt; <a href=3D"http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-m=
idnightryder.com" target=3D"_blank">http://lists.midnightryder.com/listinfo=
.cgi/sweng-gamedev-midnightryder.com</a><br>
&gt;<br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Thu, 14 Mar 2013 19:36:21 +0100<br>
From: Tinco Andringa &lt;<a href=3D"mailto:[email protected]">[email protected]</a>=
&gt;<br>
To: <a href=3D"mailto:[email protected]">sweng-gamedev@midnig=
htryder.com</a><br>
Cc: <a href=3D"mailto:[email protected]">sweng-gamedev@=
lists.midnightryder.com</a><br>
Subject: Re: [Sweng-Gamedev] Reflection in game engine (c++)<br>
Message-ID:<br>
=A0 =A0 =A0 =A0 &lt;CAGW=3D<a href=3D"mailto:8RqPSn_yPX7ChH1xYGvn04x1QPoi5%=
[email protected]">8RqPSn_yPX7ChH1xYGvn04x1QPoi5+HBaVP1puCV=
[email protected]</a>&gt;<br>
Content-Type: text/plain; charset=3DUTF-8<br>
<br>
Hi Gabriel,<br>
<br>
In an effort to make C/C++ more like C# I did a bit of research into<br>
adding type/signature information to binaries using clang. A downside<br>
of this approach is that you&#39;re restricted to the clang compiler, but<b=
r>
in return you get a lot of power over the compilation process.<br>
<br>
The idea is rather simple, the compiler visits all nodes in the C++<br>
AST, you can write a clang module that hooks into that process and<br>
record type information and then at the end store it in a section of<br>
the binary. Then in your code you can simply refer to that section and<br>
read it to get type information.<br>
<br>
But that being said, it&#39;s a rather ambitious project and I don&#39;t<br=
>
really see how going on such a quest is a wise time investment for<br>
your game pipeline.<br>
<br>
Some of the things you mention (serializing, streaming) can be done by<br>
having a neat data model and a good serialization protocol. For<br>
example if your game uses a CES architecture you just need a<br>
serialization for the data structure of each component. Together with<br>
the id&#39;s of the components and the objects you could stream in or out<b=
r>
any aspect of the game without ever needing reflection.<br>
<br>
I imagine you could even dynamically load/replace components sent over<br>
the network, enabling some sort of hot code swapping :)<br>
<br>
Is your game architected in such a way that that would be possible?<br>
Perhaps if your codebase is very large already it&#39;s not feasible to<br>
rearchitect to such an extent, though I&#39;ve heard some studios switched<=
br>
to CES in the middle of their dev process. It is possible to gradually<br>
migrate from hierarchical architecture to CES (I&#39;m doing so for my own<=
br>
project atm too).<br>
<br>
Hope this is useful.<br>
<br>
Kind regards,<br>
Tinco<br>
<br>
<br>
On Thu, Mar 14, 2013 at 7:09 PM, Gabriel Sassone &lt;<a href=3D"mailto:gsas=
[email protected]">[email protected]</a>&gt; wrote:<br>
&gt; Hello gents,<br>
&gt; =A0 =A0I wanted to experiment with reflection and I found different wa=
y to<br>
&gt; obtain it:<br>
&gt;<br>
&gt; =A0 1) Invasive macro based registration<br>
&gt; =A0 2) Reflection visitor pattern<br>
&gt; =A0 3) Parsing pdb/clang stuff and create a manual table of what you w=
ant/need<br>
&gt; =A0 4) c++ custom parser that uses tags to create reflection informati=
ons<br>
&gt; (like a comment near a member, ...) (exuberant ctags???)<br>
&gt; =A0 5) create serializable/reflected classes in a data format, then ru=
n a tool<br>
&gt; that generates headers and cpps<br>
&gt;<br>
&gt; I am trying to figure out flaws and merits of each kind, and even if t=
here<br>
&gt; are other solutions.<br>
&gt; I love the idea to have the possibility to serialize in and out struct=
ures,<br>
&gt; access fields and change values, stream in/out stuff from network ,and=
 maybe<br>
&gt; link with scripting.<br>
&gt;<br>
&gt; My goal is to have fast iteration times, both artists and programmers,=
 and I<br>
&gt; achieved it for rendering programmers already with having json binariz=
ed<br>
&gt; configurable rendering, but still there are code stuff that are not ea=
sy to<br>
&gt; achieve.<br>
&gt;<br>
&gt; Here are my thoughts, but I would like to hear your ideas and experien=
ces!<br>
&gt;<br>
&gt; 1) Very precise on what you can register/serialize, but painful to mai=
ntain<br>
&gt; or plug into an existing codebase<br>
&gt; 2) Less precise but you just need one method per class, that you can u=
se to<br>
&gt; serialize/reflect. Still bad in maintaining, but better in plugging in=
.<br>
&gt; 3) You make the compiler do the work, then translate the informations =
you<br>
&gt; need in your format. Easy to maintain, to plug...maybe slow in parsing=
? Slow<br>
&gt; your build pipeline?<br>
&gt; 4) maybe easier than using pdbs, but less powerful (you cannot invoke<=
br>
&gt; methods on objects). should be faster than 3.<br>
&gt; 5) crazy idea. requires generation of code from outside...powerful lik=
e 4,<br>
&gt; so data reflection, but you cannot invoke methods if you want.<br>
&gt;<br>
&gt; What are your experiences/thoughts?<br>
&gt;<br>
&gt; Thanks to everyone that read this mail!<br>
&gt;<br>
&gt; =A0 =A0 Gabriel<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Sweng-Gamedev mailing list<br>
&gt; <a href=3D"mailto:[email protected]">Sweng-Gamedev=
@lists.midnightryder.com</a><br>
&gt; <a href=3D"http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-m=
idnightryder.com" target=3D"_blank">http://lists.midnightryder.com/listinfo=
.cgi/sweng-gamedev-midnightryder.com</a><br>
&gt;<br>
<br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Thu, 14 Mar 2013 14:55:28 -0400<br>
From: Thatcher Ulrich &lt;<a href=3D"mailto:[email protected]">[email protected]<=
/a>&gt;<br>
To: <a href=3D"mailto:[email protected]">sweng-gamedev@midnig=
htryder.com</a><br>
Cc: <a href=3D"mailto:[email protected]">sweng-gamedev@=
lists.midnightryder.com</a><br>
Subject: Re: [Sweng-Gamedev] Reflection in game engine (c++)<br>
Message-ID:<br>
=A0 =A0 =A0 =A0 &lt;CAMa9PtQJhRwhx_tcpUOX=3D<a href=3D"mailto:vFMfK9V5A7os1=
mW%[email protected]">[email protected]=
.com</a>&gt;<br>
Content-Type: text/plain; charset=3DISO-8859-1<br>
<br>
&quot;CES&quot;?<br>
<br>
On Thu, Mar 14, 2013 at 2:09 PM, Gabriel Sassone &lt;<a href=3D"mailto:gsas=
[email protected]">[email protected]</a>&gt; wrote:<br>
&gt; Hello gents,<br>
&gt; =A0 =A0I wanted to experiment with reflection and I found different wa=
y to<br>
&gt; obtain it:<br>
&gt;<br>
&gt; =A0 1) Invasive macro based registration<br>
&gt; =A0 2) Reflection visitor pattern<br>
&gt; =A0 3) Parsing pdb/clang stuff and create a manual table of what you w=
ant/need<br>
&gt; =A0 4) c++ custom parser that uses tags to create reflection informati=
ons<br>
&gt; (like a comment near a member, ...) (exuberant ctags???)<br>
&gt; =A0 5) create serializable/reflected classes in a data format, then ru=
n a tool<br>
&gt; that generates headers and cpps<br>
&gt;<br>
&gt; I am trying to figure out flaws and merits of each kind, and even if t=
here<br>
&gt; are other solutions.<br>
&gt; I love the idea to have the possibility to serialize in and out struct=
ures,<br>
&gt; access fields and change values, stream in/out stuff from network ,and=
 maybe<br>
&gt; link with scripting.<br>
&gt;<br>
&gt; My goal is to have fast iteration times, both artists and programmers,=
 and I<br>
&gt; achieved it for rendering programmers already with having json binariz=
ed<br>
&gt; configurable rendering, but still there are code stuff that are not ea=
sy to<br>
&gt; achieve.<br>
&gt;<br>
&gt; Here are my thoughts, but I would like to hear your ideas and experien=
ces!<br>
&gt;<br>
&gt; 1) Very precise on what you can register/serialize, but painful to mai=
ntain<br>
&gt; or plug into an existing codebase<br>
&gt; 2) Less precise but you just need one method per class, that you can u=
se to<br>
&gt; serialize/reflect. Still bad in maintaining, but better in plugging in=
.<br>
&gt; 3) You make the compiler do the work, then translate the informations =
you<br>
&gt; need in your format. Easy to maintain, to plug...maybe slow in parsing=
? Slow<br>
&gt; your build pipeline?<br>
&gt; 4) maybe easier than using pdbs, but less powerful (you cannot invoke<=
br>
&gt; methods on objects). should be faster than 3.<br>
&gt; 5) crazy idea. requires generation of code from outside...powerful lik=
e 4,<br>
&gt; so data reflection, but you cannot invoke methods if you want.<br>
&gt;<br>
&gt; What are your experiences/thoughts?<br>
&gt;<br>
&gt; Thanks to everyone that read this mail!<br>
&gt;<br>
&gt; =A0 =A0 Gabriel<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Sweng-Gamedev mailing list<br>
&gt; <a href=3D"mailto:[email protected]">Sweng-Gamedev=
@lists.midnightryder.com</a><br>
&gt; <a href=3D"http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-m=
idnightryder.com" target=3D"_blank">http://lists.midnightryder.com/listinfo=
.cgi/sweng-gamedev-midnightryder.com</a><br>
&gt;<br>
<br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Thu, 14 Mar 2013 14:55:28 -0400<br>
From: Thatcher Ulrich &lt;<a href=3D"mailto:[email protected]">[email protected]<=
/a>&gt;<br>
To: <a href=3D"mailto:[email protected]">sweng-gamedev@midnig=
htryder.com</a><br>
Cc: <a href=3D"mailto:[email protected]">sweng-gamedev@=
lists.midnightryder.com</a><br>
Subject: Re: [Sweng-Gamedev] Reflection in game engine (c++)<br>
Message-ID:<br>
=A0 =A0 =A0 =A0 &lt;CAMa9PtQJhRwhx_tcpUOX=3D<a href=3D"mailto:vFMfK9V5A7os1=
mW%[email protected]">[email protected]=
.com</a>&gt;<br>
Content-Type: text/plain; charset=3DISO-8859-1<br>
<br>
&quot;CES&quot;?<br>
<br>
On Thu, Mar 14, 2013 at 2:09 PM, Gabriel Sassone &lt;<a href=3D"mailto:gsas=
[email protected]">[email protected]</a>&gt; wrote:<br>
&gt; Hello gents,<br>
&gt; =A0 =A0I wanted to experiment with reflection and I found different wa=
y to<br>
&gt; obtain it:<br>
&gt;<br>
&gt; =A0 1) Invasive macro based registration<br>
&gt; =A0 2) Reflection visitor pattern<br>
&gt; =A0 3) Parsing pdb/clang stuff and create a manual table of what you w=
ant/need<br>
&gt; =A0 4) c++ custom parser that uses tags to create reflection informati=
ons<br>
&gt; (like a comment near a member, ...) (exuberant ctags???)<br>
&gt; =A0 5) create serializable/reflected classes in a data format, then ru=
n a tool<br>
&gt; that generates headers and cpps<br>
&gt;<br>
&gt; I am trying to figure out flaws and merits of each kind, and even if t=
here<br>
&gt; are other solutions.<br>
&gt; I love the idea to have the possibility to serialize in and out struct=
ures,<br>
&gt; access fields and change values, stream in/out stuff from network ,and=
 maybe<br>
&gt; link with scripting.<br>
&gt;<br>
&gt; My goal is to have fast iteration times, both artists and programmers,=
 and I<br>
&gt; achieved it for rendering programmers already with having json binariz=
ed<br>
&gt; configurable rendering, but still there are code stuff that are not ea=
sy to<br>
&gt; achieve.<br>
&gt;<br>
&gt; Here are my thoughts, but I would like to hear your ideas and experien=
ces!<br>
&gt;<br>
&gt; 1) Very precise on what you can register/serialize, but painful to mai=
ntain<br>
&gt; or plug into an existing codebase<br>
&gt; 2) Less precise but you just need one method per class, that you can u=
se to<br>
&gt; serialize/reflect. Still bad in maintaining, but better in plugging in=
.<br>
&gt; 3) You make the compiler do the work, then translate the informations =
you<br>
&gt; need in your format. Easy to maintain, to plug...maybe slow in parsing=
? Slow<br>
&gt; your build pipeline?<br>
&gt; 4) maybe easier than using pdbs, but less powerful (you cannot invoke<=
br>
&gt; methods on objects). should be faster than 3.<br>
&gt; 5) crazy idea. requires generation of code from outside...powerful lik=
e 4,<br>
&gt; so data reflection, but you cannot invoke methods if you want.<br>
&gt;<br>
&gt; What are your experiences/thoughts?<br>
&gt;<br>
&gt; Thanks to everyone that read this mail!<br>
&gt;<br>
&gt; =A0 =A0 Gabriel<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Sweng-Gamedev mailing list<br>
&gt; <a href=3D"mailto:[email protected]">Sweng-Gamedev=
@lists.midnightryder.com</a><br>
&gt; <a href=3D"http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-m=
idnightryder.com" target=3D"_blank">http://lists.midnightryder.com/listinfo=
.cgi/sweng-gamedev-midnightryder.com</a><br>
&gt;<br>
<br>
<br>
------------------------------<br>
<br>
Message: 6<br>
Date: Thu, 14 Mar 2013 21:34:15 +0100<br>
From: Tinco Andringa &lt;<a href=3D"mailto:[email protected]">[email protected]</a>=
&gt;<br>
To: <a href=3D"mailto:[email protected]">sweng-gamedev@midnig=
htryder.com</a><br>
Cc: <a href=3D"mailto:[email protected]">sweng-gamedev@=
lists.midnightryder.com</a><br>
Subject: Re: [Sweng-Gamedev] Reflection in game engine (c++)<br>
Message-ID:<br>
=A0 =A0 =A0 =A0 &lt;CAGW=3D<a href=3D"mailto:8Rrh7T8gUfyZWH5260wqkq_GDFQ-XH=
[email protected]">8Rrh7T8gUfyZWH5260wqkq_GDFQ-XHdayO1QfndjmX=
[email protected]</a>&gt;<br>
Content-Type: text/plain; charset=3DUTF-8<br>
<br>
Sorry, Component Entity System, it&#39;s a way of organizing your game<br>
engine that has some popularity amongst in the industry. Here&#39;s a<br>
quick overview from someone who worked on the Tony Hawk games:<br>
<a href=3D"http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/" t=
arget=3D"_blank">http://cowboyprogramming.com/2007/01/05/evolve-your-heirac=
hy/</a><br>
<br>
I just read Gabriel&#39;s linkedin and he&#39;s got years of experience on =
big<br>
games so I guess he really has a good reason to check if reflection<br>
can optimize his pipeline.<br>
<br>
<br>
On Thu, Mar 14, 2013 at 7:55 PM, Thatcher Ulrich &lt;<a href=3D"mailto:tu@t=
ulrich.com">[email protected]</a>&gt; wrote:<br>
&gt; &quot;CES&quot;?<br>
&gt;<br>
&gt; On Thu, Mar 14, 2013 at 2:09 PM, Gabriel Sassone &lt;<a href=3D"mailto=
:[email protected]">[email protected]</a>&gt; wrote:<br>
&gt;&gt; Hello gents,<br>
&gt;&gt; =A0 =A0I wanted to experiment with reflection and I found differen=
t way to<br>
&gt;&gt; obtain it:<br>
&gt;&gt;<br>
&gt;&gt; =A0 1) Invasive macro based registration<br>
&gt;&gt; =A0 2) Reflection visitor pattern<br>
&gt;&gt; =A0 3) Parsing pdb/clang stuff and create a manual table of what y=
ou want/need<br>
&gt;&gt; =A0 4) c++ custom parser that uses tags to create reflection infor=
mations<br>
&gt;&gt; (like a comment near a member, ...) (exuberant ctags???)<br>
&gt;&gt; =A0 5) create serializable/reflected classes in a data format, the=
n run a tool<br>
&gt;&gt; that generates headers and cpps<br>
&gt;&gt;<br>
&gt;&gt; I am trying to figure out flaws and merits of each kind, and even =
if there<br>
&gt;&gt; are other solutions.<br>
&gt;&gt; I love the idea to have the possibility to serialize in and out st=
ructures,<br>
&gt;&gt; access fields and change values, stream in/out stuff from network =
,and maybe<br>
&gt;&gt; link with scripting.<br>
&gt;&gt;<br>
&gt;&gt; My goal is to have fast iteration times, both artists and programm=
ers, and I<br>
&gt;&gt; achieved it for rendering programmers already with having json bin=
arized<br>
&gt;&gt; configurable rendering, but still there are code stuff that are no=
t easy to<br>
&gt;&gt; achieve.<br>
&gt;&gt;<br>
&gt;&gt; Here are my thoughts, but I would like to hear your ideas and expe=
riences!<br>
&gt;&gt;<br>
&gt;&gt; 1) Very precise on what you can register/serialize, but painful to=
 maintain<br>
&gt;&gt; or plug into an existing codebase<br>
&gt;&gt; 2) Less precise but you just need one method per class, that you c=
an use to<br>
&gt;&gt; serialize/reflect. Still bad in maintaining, but better in pluggin=
g in.<br>
&gt;&gt; 3) You make the compiler do the work, then translate the informati=
ons you<br>
&gt;&gt; need in your format. Easy to maintain, to plug...maybe slow in par=
sing? Slow<br>
&gt;&gt; your build pipeline?<br>
&gt;&gt; 4) maybe easier than using pdbs, but less powerful (you cannot inv=
oke<br>
&gt;&gt; methods on objects). should be faster than 3.<br>
&gt;&gt; 5) crazy idea. requires generation of code from outside...powerful=
 like 4,<br>
&gt;&gt; so data reflection, but you cannot invoke methods if you want.<br>
&gt;&gt;<br>
&gt;&gt; What are your experiences/thoughts?<br>
&gt;&gt;<br>
&gt;&gt; Thanks to everyone that read this mail!<br>
&gt;&gt;<br>
&gt;&gt; =A0 =A0 Gabriel<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Sweng-Gamedev mailing list<br>
&gt;&gt; <a href=3D"mailto:[email protected]">Sweng-Gam=
[email protected]</a><br>
&gt;&gt; <a href=3D"http://lists.midnightryder.com/listinfo.cgi/sweng-gamed=
ev-midnightryder.com" target=3D"_blank">http://lists.midnightryder.com/list=
info.cgi/sweng-gamedev-midnightryder.com</a><br>
&gt;&gt;<br>
&gt; _______________________________________________<br>
&gt; Sweng-Gamedev mailing list<br>
&gt; <a href=3D"mailto:[email protected]">Sweng-Gamedev=
@lists.midnightryder.com</a><br>
&gt; <a href=3D"http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-m=
idnightryder.com" target=3D"_blank">http://lists.midnightryder.com/listinfo=
.cgi/sweng-gamedev-midnightryder.com</a><br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
Sweng-Gamedev mailing list<br>
<a href=3D"mailto:[email protected]">Sweng-Gamedev@list=
s.midnightryder.com</a><br>
<a href=3D"http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnig=
htryder.com" target=3D"_blank">http://lists.midnightryder.com/listinfo.cgi/=
sweng-gamedev-midnightryder.com</a><br>
<br>
<br>
End of Sweng-Gamedev Digest, Vol 71, Issue 2<br>
********************************************<br>
</blockquote></div><br></div>

--047d7b3a820c727aa904d7e93112--

--===============2048087572==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Sweng-Gamedev mailing list
[email protected]
http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com

--===============2048087572==--