www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - D for game development

reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
A discussion to which I think some of us could add value:

http://stackoverflow.com/questions/4516283/the-d-programming-language-for-game-development

Andrei
Dec 31 2010
next sibling parent reply Guilherme Vieira <n2.nitrogen gmail.com> writes:
On Fri, Dec 31, 2010 at 4:08 PM, Andrei Alexandrescu <
SeeWebsiteForEmail erdani.org> wrote:

 A discussion to which I think some of us could add value:


 http://stackoverflow.com/questions/4516283/the-d-programming-language-for-game-development

 Andrei
Lambert's answer says the compilers are definitely not bug-free and all, but is it really that bad? In a medium-sized project, do the compiler bugs really get all too frequent or something, and if so, is it simple to find workarounds? Because I guess, quite frankly... if Derelict works, I have nearly no reason to keep doing C++. In fact, the ease of meta and generative programming in D makes me wonder if it's not much easier make the game engine in it. -- Atenciosamente / Sincerely, Guilherme ("n2liquid") Vieira
Jan 01 2011
next sibling parent reply Peter Alexander <peter.alexander.au gmail.com> writes:
On 1/01/11 4:55 PM, Guilherme Vieira wrote:
 On Fri, Dec 31, 2010 at 4:08 PM, Andrei Alexandrescu
 <SeeWebsiteForEmail erdani.org <mailto:SeeWebsiteForEmail erdani.org>>
 wrote:

     A discussion to which I think some of us could add value:

     http://stackoverflow.com/questions/4516283/the-d-programming-language-for-game-development

     Andrei


 Lambert's answer says the compilers are definitely not bug-free and all,
 but is it really that bad? In a medium-sized project, do the compiler
 bugs really get all too frequent or something, and if so, is it simple
 to find workarounds?
It's still quite bad atm. If you spent a whole day programming in D, you'd probably find at least one compiler bug, especially if you have optimisations enabled. You'll also probably find quite a lot of code that is supposed to compile, but doesn't, and this isn't documented anywhere (at least not in a useful way). There's almost always workarounds, but that's not the problem. The problem is trying to figure out whether the bug is in your code or the compiler.
 Because I guess, quite frankly... if Derelict works, I have nearly no
 reason to keep doing C++. In fact, the ease of meta and generative
 programming in D makes me wonder if it's not much easier make the game
 engine in it.
Yes, Derelict is a very nice set of libraries :-)
Jan 01 2011
parent reply Don <nospam nospam.com> writes:
Peter Alexander wrote:
 On 1/01/11 4:55 PM, Guilherme Vieira wrote:
 On Fri, Dec 31, 2010 at 4:08 PM, Andrei Alexandrescu
 <SeeWebsiteForEmail erdani.org <mailto:SeeWebsiteForEmail erdani.org>>
 wrote:

     A discussion to which I think some of us could add value:

     
 http://stackoverflow.com/questions/4516283/the-d-programming-language-
or-game-development 


     Andrei


 Lambert's answer says the compilers are definitely not bug-free and all,
 but is it really that bad? In a medium-sized project, do the compiler
 bugs really get all too frequent or something, and if so, is it simple
 to find workarounds?
It's still quite bad atm. If you spent a whole day programming in D, you'd probably find at least one compiler bug, especially if you have optimisations enabled.
Optimiser-related bugs are very, very rare. Currently I know of only three optimiser bugs (bug 5239 and bug 5364, and I can't reproduce either test case on Windows; and bug 5100 "-O Degrades performance of loop statements"). If there are any others, please report them, as they get top priority.
Jan 01 2011
parent reply Peter Alexander <peter.alexander.au gmail.com> writes:
On 1/01/11 6:47 PM, Don wrote:
 Optimiser-related bugs are very, very rare. Currently I know of only
 three optimiser bugs (bug 5239 and bug 5364, and I can't reproduce
 either test case on Windows; and bug 5100 "-O Degrades performance of
 loop statements"). If there are any others, please report them, as they
 get top priority.
Well, I haven't done any major D programming in a few months now; last time I did I found these two within a very short time: http://d.puremagic.com/issues/show_bug.cgi?id=4504 http://d.puremagic.com/issues/show_bug.cgi?id=4506 I stopped doing major D programming after that because those bugs wasted a lot of my time. Perhaps I should try getting back into it again :)
Jan 01 2011
next sibling parent Walter Bright <newshound2 digitalmars.com> writes:
Peter Alexander wrote:
 Well, I haven't done any major D programming in a few months now; last 
 time I did I found these two within a very short time:
 
 http://d.puremagic.com/issues/show_bug.cgi?id=4504
 http://d.puremagic.com/issues/show_bug.cgi?id=4506
 
 I stopped doing major D programming after that because those bugs wasted 
 a lot of my time.
Sorry about that. At least one of them has been fixed.
Jan 01 2011
prev sibling parent Robert Clipsham <robert octarineparrot.com> writes:
On 01/01/11 19:23, Peter Alexander wrote:
 On 1/01/11 6:47 PM, Don wrote:
 Optimiser-related bugs are very, very rare. Currently I know of only
 three optimiser bugs (bug 5239 and bug 5364, and I can't reproduce
 either test case on Windows; and bug 5100 "-O Degrades performance of
 loop statements"). If there are any others, please report them, as they
 get top priority.
Well, I haven't done any major D programming in a few months now; last time I did I found these two within a very short time: http://d.puremagic.com/issues/show_bug.cgi?id=4504 http://d.puremagic.com/issues/show_bug.cgi?id=4506 I stopped doing major D programming after that because those bugs wasted a lot of my time. Perhaps I should try getting back into it again :)
I know how you feel. In the space of one hour's programming today I've hit (at least) 3 compiler bugs, 2 of which I narrowed down and reported. I've spent at least 2 hours today wandering around in ldc and dmd internals trying to track down issues. This isn't a one off, I hit stuff like this all the time. I lose even more motivation when I see all the patches in bugzilla which aren't filtering through (I know they get there eventually, got a couple in myself, takes a good deal of time though), so know it could be months until I get a fix. -- Robert http://octarineparrot.com/
Jan 01 2011
prev sibling parent Sean Kelly <sean invisibleduck.org> writes:
Guilherme Vieira Wrote:
 
 Lambert's answer says the compilers are definitely not bug-free and all, but
 is it really that bad? In a medium-sized project, do the compiler bugs
 really get all too frequent or something, and if so, is it simple to find
 workarounds?
 
 Because I guess, quite frankly... if Derelict works, I have nearly no reason
 to keep doing C++. In fact, the ease of meta and generative programming in D
 makes me wonder if it's not much easier make the game engine in it.
I think the gating issue is more with toolchain support than compiler bugs. VC6 was a terrible C++ compiler, but everyone used it anyway, partially because the IDE was excellent. Walter's had a good record of fixing reported show-stoppers in the next compiler release as well.
Jan 01 2011
prev sibling next sibling parent Jimmy Cao <jcao219 gmail.com> writes:
Right now I'm trying out the approach of making existing C++ 3D engines
available for D.  SWIG is very instrumental in the process.
I hope that after the 64-bit issues are worked out, some special attention
can be applied to the D language issue(s) that make it harder for SWIG to
effectively generate D code.
Jan 01 2011
prev sibling parent Guilherme Vieira <n2.nitrogen gmail.com> writes:
On Sat, Jan 1, 2011 at 3:22 PM, Jimmy Cao <jcao219 gmail.com> wrote:

 Right now I'm trying out the approach of making existing C++ 3D engines
 available for D.  SWIG is very instrumental in the process.
 I hope that after the 64-bit issues are worked out, some special attention
 can be applied to the D language issue(s) that make it harder for SWIG to
 effectively generate D code.
It's certainly a worthy effort. Having high-level libraries in D are a good way of getting people to learn it faster by trying things they find fun (such as making games). But I think I'll take another route if I have the time to write games in D. I don't think I would like to make a game using one of those anymore (I had a sorta bad experience with Ogre in which it kept getting on my way, or maybe I was just silly and disliked its style; in any case, I'd rather do things from scratch now, since it's also good for learning). In any case, two efforts are better than one. Much appreciated! I hope we can help ourselves out. :) -- Atenciosamente / Sincerely, Guilherme ("n2liquid") Vieira
Jan 01 2011