[OT] Previously: DMD - Windows -> C# in gamedev
F i L
witte2008 at gmail.com
Sun Jan 8 18:17:41 PST 2012
Manu wrote:
> On 8 January 2012 08:03, F i L <witte2008 at gmail.com> wrote:
>
>> I've got some interesting ideas on how pre-written code
>> packages could be
>> easily designer-style assembled in-editor and compiled into
>> efficient
>> native logic blocks "on the fly". Only D's fast native compile
>> times and
>> easy-to-grasp syntax would really allow for what I'm thinking.
>>
>
> If you're talking about stringing together pre-written code
> blocks with
> some editor, then this might be an interesting approach.
That's basically it. The idea is to have an editor which allows
creating generic objects with dynamic attributes, eg, meshes,
vectors, sounds, etc. Each object would have a basic state
machine with each state being an order dependent list of
"Command" objects. Command objects would be drag-n-drop style
logic blocks with GUI properties (though keyboard editing would
be a priority as well). Command objects would be represented in
immediately executable core command objects (math, io, network,
etc) but would get silently compiled into efficient D execution
objects in a separate thread, then used instead. Advanced custom
Command objects could also be hand written in D (preferably in
editor).
Prebuilt command objects would be everything from simple
transform manipulation and logic (lookat, IK chains, triggers,
conditions, etc) to entire character control schemes (FPS, race
car, etc).
Because all command property linking would be known by the
editor, that information could be used to build efficient
dependency graphs.
I'm still working out the kinks in the theory, but I feel the
concept has potential.
> I'm not so sure how 'easy-to-grasp' D is, or why that's
> important if you're providing an editor?
D can get complicated real quick, but features like GC, auto
keyword, and the lack of '->' makes writing simple functions
easier to understand than C, IMO. Simple functions is basically
the extent of what I have in mind for the editor, so it seems
like a good fit.
Thanks for all the insight.
Nick Sabalausky wrote:
> > how do I even perform a placement new?
> >
>
> emplace:
> http://www.d-programming-language.org/phobos/std_conv.html
>
> auto obj = emplace!MyObject(pointerOrVoidArray, x, y, z);
Awesome, didn't know about this.
More information about the Digitalmars-d
mailing list