www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: Who here actually uses D?

reply Jean Crystof <news news.com> writes:
Robert Clipsham Wrote:

 Having seen a post by Peter Alexander (in Re: D for game development), 
 mentioning some of the issues he's hit I thought I'd post this. I've 
 been in his shoes (every other time I use D it seems), and feel I should 
 ask - who here uses D, and to what extent?
 
 I'm mostly interested in those of you with 1000 Line plus projects in D, 
 as that's when I've found I start hitting issues.
 
 Just to clarify, for those D purists among you... I'm not trolling, just 
 curious (I wouldn't normally have asked, but now I know I'm not paranoid 
 and the only one having problems, I thought I'd ask).

We used D in a college project. It's a Wolfenstein 3D clone (simple ray caster engine, untextured floor and ceil, our own software renderer, uses SDL) written in D1 by 7 persons. Thanks to fast compile speed we were able to use TDD heavily. The game is about 105 kLOC and the unittest suite 280 kLOC with documents. We were impressed how tight code was possible to write in D (FPS games can have millions lines of code) and how unittests were integrated in the language. We would not have been able to implement anything as complex in C++ or Java in only 3 months. Maybe a tic tac toe or tetris. My role was porting Java/C++ type coding style of other members in more like D as the repository master. They quickly learned more advanced idioms. We encountered one forward reference bug, but it disappeared when restructuring program. No other bugs were found in D and we updated the compiler in 1-7 days when a new came.
Jan 03 2011
parent "Nick Sabalausky" <a a.a> writes:
"Jean Crystof" <news news.com> wrote in message 
news:ift3aj$b97$1 digitalmars.com...
 Robert Clipsham Wrote:

 Having seen a post by Peter Alexander (in Re: D for game development),
 mentioning some of the issues he's hit I thought I'd post this. I've
 been in his shoes (every other time I use D it seems), and feel I should
 ask - who here uses D, and to what extent?

 I'm mostly interested in those of you with 1000 Line plus projects in D,
 as that's when I've found I start hitting issues.

 Just to clarify, for those D purists among you... I'm not trolling, just
 curious (I wouldn't normally have asked, but now I know I'm not paranoid
 and the only one having problems, I thought I'd ask).

We used D in a college project. It's a Wolfenstein 3D clone (simple ray caster engine, untextured floor and ceil, our own software renderer, uses SDL) written in D1 by 7 persons. Thanks to fast compile speed we were able to use TDD heavily. The game is about 105 kLOC and the unittest suite 280 kLOC with documents. We were impressed how tight code was possible to write in D (FPS games can have millions lines of code) and how unittests were integrated in the language. We would not have been able to implement anything as complex in C++ or Java in only 3 months. Maybe a tic tac toe or tetris. My role was porting Java/C++ type coding style of other members in more like D as the repository master. They quickly learned more advanced idioms. We encountered one forward reference bug, but it disappeared when restructuring program. No other bugs were found in D and we updated the compiler in 1-7 days when a new came.

Cool. I find raycasters very nostalgic. Out of curiosity, was there any book or reference that you used for the raycasting algorithm, or did you just work out the math and implement? There are a least a couple old DOS-based raycasting book I read cover-to-cover back in the day. Although I've never actually implemented anything other than a Mode7-style floor.
Jan 03 2011