Recently I've been bothered because I reached a point in which C++ (even 0x) felt very limited, so I started looking for alternatives.
Forget Java, C#, Python or Ruby. I still like the low-level nature of C++ and I'm not fond of virtual machines. Further, I'm a game engine developer, so I have to develop core routines which must be really fast, and lately I've been hungry for code expressiveness. C++ is an almost-there language for me, but there are many exceptions on how to use templates, and GCC isn't optimizing stuff as well as I'd hoped it would.
So I'm considering to start learning D.
Do you think it will suffice my needs as a game developer? I'm wary because I've never heard of D being used for that.
Thanks!
it lacks good marketing; it doesn't have a high-profile corporate backer. it lacks compelling technical merit; there is nothing particularly special about it. it's too difficult to learn; it present too steep a learning curve. it's too big and complex; nobody likes big, complex languages.
D code is easy to understand by anyone familiar with C-like programming languages. Moreover, D is very readable, even for sophisticated code, which makes bugs easy to spot. Readability is also critical for engaging contributors, which is key to the growth of open source software.
C++ is the most popular language for creating game engines —the development environments where game programmers create and host their interactive worlds. Game engines provide the technology for every aspect of a game, from graphics, physics, and sound to the behavior of AI-powered game bots.
I used D 1.x for doing games and demos, some of them are public domain open source (A, B, C, D, E).
D can give you productivity unheard of in C++-land if you are willing to pay the high-price of arguing with everyone about why do you use D.
If you go this route, i advise you to pick D 2.x, Derelict and Visual D (hint for future readers: this is 2011).
As for game development :
the D GC is not a real problem. It is if you allocate too much in a frame, but that's about it. The classic methods of pooling, reusing, etc... work.
you can write x86 assembly portably across Linux, Mac & Windows. Also static if allows pretty fun templated naked assembly functions.
inlining across module boundaries is working without a "link time optimization" switch
I find it easier to maintain debug and release version (compared to C++)
avoid new features and choose compilers conservatively... just like in C++
Kenta Cho uses D and Simple DirectMedia Layer(SDL) to develop his Windows games. They're a lot of fun. Take a look for inspiration and source:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With