Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have recently found out about D programming language and its basic features. It seems D is quite powerful alternative for C++ and more effective at some points. Also D can interface to C, but interfacing to C++ is limited.

The only engine I found out is D Game Engine, but it is in an early pre-alpha state and I'm not sure it's developing anymore.

Are there any 3D, physics or game engines written in D or at least wrappers for engines in other languages? Is it possible to use with D such engines like irrlicht, Ogre3d or Torque 3D without almost complete rewriting it?

share|improve this question

closed as primarily opinion-based by Philipp, Sean Middleditch, Byte56 Dec 5 '13 at 18:53

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
D is a fringe language, hardly in use today. Case in point: the D game engine project has seen its last update a week after it was created. So if you want to use D, you're a pioneer and you should be able to do almost everything by yourself. If not, or your actual goal is to make a game more than to learn a fringe programming language I strongly recommend to stick with more "traditional" languages and game engines. Try Java or C#, they seem the best compromise between low-level C++ and what D stands for, with decent support for game development (Monogame, libgdx, and others). –  LearnCocos2D Dec 5 '13 at 11:29
1  
that's not to say you can't make a game in D, but you'll need to interface with the graphics environment yourself, and be aware that the current GC is of the stop-the-world variety (last I checked) –  ratchet freak Dec 5 '13 at 12:15
    
Not sure that "which tech to use" is the best reason but this question is definitely going to just lead to discussion and opinions on a language and tech choices. –  Sean Middleditch Dec 5 '13 at 18:01
    
@SeanMiddleditch The question was like "is this tech suitable enough". Tried to reword it to better clarify what I really wanted to ask. –  DEAD_STALKER Dec 7 '13 at 10:29
    
@DEAD_STALKER: "is it suitable" is the same as "should I use it or not." You can write a game in any language. Asking for specific libraries is just asking for a list of libraries rather than a single concrete answer. This is surely an interesting question, just not one appropriate for a StackExchange-style Q&A site. :) –  Sean Middleditch Dec 8 '13 at 2:59

1 Answer 1

up vote 2 down vote accepted

[Edit 22 October 2014]

I was reading that Facebook started to use D language in production environment. Even though it is still premature to say that D language will rise in the next few years it's an interesting point to mention.

It seems D is quite powerful alternative for C++ and more effective at some points.

This is only in theory, there are multiple reasons for this:

  • The designers of the language wanted this but never really achieved it, C++ is still the dominant language with longest tool chain, if you need anything (library, tool.. etc) , you probably have to figure it out yourself.
  • The language compilers is not as mature as C++ compilers so keep in mind that compilers take decades to mature. What I think is that if you wrote the same exact code with the two languages (C++ and D), given it's possible, C++ will more likely be faster due to better compilers.
  • I am almost certain that languages like C# will be faster (given again) you can write the same code with D, this is due to compilers being much more mature, but more important D tries to use some kind of garbage collection, garbage collectors in C#/Java are much more mature and will more likely be a better performer.
  • D language was designed to make two features of C++ easier, namely, Template meta-programming and functional programming, if your focus is on those two maybe D will be a great a tool for writing any library that extensively use them, but again nothing is proved.
  • Debuggers and tools, this is very important when using a language otherwise expect turtle speed production. C++ already have great tools so you will have to check that for D.

My question for you would be, do you want to learn D or game programming ?

I am not saying you can't make a game engine with, but If you want to learn D, just learn D, I am sure this will enhance your programming skills.

But if you want to create an engine and learn D, I think this is hard, game programming is tricky on it's own, using a new programming language will make things a little bit trickier.

You will have more tasks than programming with D, communicating with other APIs and libraries, who aren't written in D. You also need to build wrappers for OpenGL, and DirectX will be even harder because it's C++. And other libraries that I don't know about like image libraries, math, sound libraries etc, you may want to write some libraries on your own.

Is there any game/3D engines written in D or at least wrappers for engines in other languages?

As far as I know, No.

D can interface to C, but interfacing to C++ is limited. Will it be possible to use with D such engines like irrlicht/Ogre3d/Torque 3D and how difficult?

Every language I know of, can interface with C somehow, C has a universal ABI (Application Binary Interface), C++ on the other hand doesn't, which make things a little bit more complicated.

What usually happen to communicate with C++ is to wrap the C++ engine with C interface, which is not going to be fun and cool when it comes to engines like Ogre and you are on your own. Communities are the ones who usually build wrappers so maybe you will be the first?

So what about physics engines ?

Everything I said applies for physics engines, with a point to keep in mind and this is only my opinion, game engines can be written in a managed language and I know some because they use a lot of hardware acceleration, physics engines on the other hand, mostly use the CPU, I know some don't, but am talking about the small physics engine they are written in languages where every instruction is taken into account. Doing so with a managed language can make things trickier especially in numerical analysis and tight loop calculates (there are a lot of them in physics engine). What I mean is that garbage collection is more likely to affect your physics engine's performance more than your game engine.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.