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:
--0016361e815cbcedf60498cbc9cb
Content-Type: text/plain; charset=ISO-8859-1

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 --0016361e815cbcedf60498cbc9cb Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div class=3D"gmail_quote">On Fri, Dec 31, 2010 at 4:08 PM, Andrei Alexandr= escu <span dir=3D"ltr">&lt;<a href=3D"mailto:SeeWebsiteForEmail erdani.org"=
SeeWebsiteForEmail erdani.org</a>&gt;</span> wrote:<br><blockquote class=

ing-left:1ex;"> A discussion to which I think some of us could add value:<br> <br> <a href=3D"http://stackoverflow.com/questions/4516283/the-d-programming-lan= guage-for-game-development" target=3D"_blank">http://stackoverflow.com/ques= tions/4516283/the-d-programming-language-for-game-development</a><br><font = color=3D"#888888"> <br> Andrei<br> </font></blockquote></div><div><br></div>Lambert&#39;s answer says the comp= ilers 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 s= omething, and if so, is it simple to find workarounds?<div> <br></div><div>Because I guess, quite frankly... if Derelict works, I have = nearly no reason to keep doing C++. In fact, the ease of meta and generativ= e programming in D makes me wonder if it&#39;s not much easier make the gam= e engine in it.<br> <br>-- <br>Atenciosamente / Sincerely,<br>Guilherme (&quot;n2liquid&quot;) = Vieira<br> </div> --0016361e815cbcedf60498cbc9cb--
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:
--0023547c902344e6bb0498cc2b33
Content-Type: text/plain; charset=ISO-8859-1

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.

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

Right now I&#39;m trying out the approach of making existing C++ 3D engines=
 available for D. =A0SWIG is very instrumental in the process.<div>I hope t=
hat after the 64-bit issues are worked out, some special attention can be a=
pplied to the D language issue(s) that make it harder for SWIG to effective=
ly generate D code.</div>


--0023547c902344e6bb0498cc2b33--
Jan 01 2011
prev sibling parent Guilherme Vieira <n2.nitrogen gmail.com> writes:
--0016362846188b071b0498cc85ce
Content-Type: text/plain; charset=ISO-8859-1

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 --0016362846188b071b0498cc85ce Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div class=3D"gmail_quote">On Sat, Jan 1, 2011 at 3:22 PM, Jimmy Cao <span = dir=3D"ltr">&lt;<a href=3D"mailto:jcao219 gmail.com">jcao219 gmail.com</a>&= gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 = 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> Right now I&#39;m trying out the approach of making existing C++ 3D engines= available for D. =A0SWIG is very instrumental in the process.<div>I hope t= hat after the 64-bit issues are worked out, some special attention can be a= pplied to the D language issue(s) that make it harder for SWIG to effective= ly generate D code.</div> </blockquote></div><br>It&#39;s certainly a worthy effort. Having high-leve= l libraries in D are a good way of getting people to learn it faster by try= ing things they find fun (such as making games).<br><br>But I think I&#39;l= l take another route if I have the time to write games in D. I don&#39;t th= ink I would like to make a game using one of those anymore (I had a sorta b= ad 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&#39;d rather do things fr= om scratch now, since it&#39;s also good for learning).<br> <br>In any case, two efforts are better than one. Much appreciated! I hope = we can help ourselves out. :)<br clear=3D"all"><br>-- <br>Atenciosamente / = Sincerely,<br>Guilherme (&quot;n2liquid&quot;) Vieira<br> --0016362846188b071b0498cc85ce--
Jan 01 2011