D for game programming anyone?

Started by
15 comments, last by Aldacron 19 years, 2 months ago
Wait, I thought D was compatible with C so you could just call C functions direct? Why all this OpenGL etc. binding buisiness?

D has had my interest for a while now. I use Java + OpenGL almost all the time and D seems like a nice compromise between the clean code of Java and the low-level details of C++. The only real question is how mature the tools are...
Advertisement
Quote:Original post by OrangyTang
Wait, I thought D was compatible with C so you could just call C functions direct? Why all this OpenGL etc. binding buisiness?

D can use C libraries directly, but you need D module because D can not use C headers. You just need to convert C header file to D module so that D knows all the functions, constants (defines) and data types. It is not wrapper, no code requierd, just 'header' indofmration.

Yesterday I wrote D binding for ODE and it is working well :)
Quote:Original post by OrangyTang
The only real question is how mature the tools are...


It's all a grassroots effort right now. DMD has not reached 1.0 yet, and the GNU version, GDC, is lagging it a little bit I think (I don't really follow GDC yet, until I get a Mac). And I think we should rephrase your question to 'how many tools there are', because that's what is sorely lacking at the moment. Multiple projects have been started for IDEs, cross platform GUI libraries, debuggers, build systems, h2d converters, and so on. They are all in various stages of completion, some lying dead and dormant. At DSource.org there are at least 3 GUI projects, but only one, MinWin, is active (and looking very promising).

Right now, I'm finding it's not difficult to develop with a text editor, makefiles, and WinDebug on Windows or gdb on linux... but I'm dying for a good IDE. I started to look into a plugin for Code::Blocks, but I really don't have the motivation to deal with it.

One thing I really like about D right now is that this is the ground floor. Nearly anything you contribute right now will make a difference, either as something the community can use or something they can build on. And the more that is contributed, the more that is developed. Plus, there's a book on D programming in the works by D's father, Walter Bright, and Matthew Wilson (of Synesis Software and Imperfect C++). Once that's out in a year or so D 1.0 should be out as well and the beginning of a nice little market for good D tools (be they open source, freeware, shareware, or commercial) will have taken root. There aren't any completed game engines or game tools yet, but eventually the demand will be there for them. Lots of potential for those who are working on projects now.
I started playing with D but gave up because there wasn't much to work with. I was still waiting for the DTL, the 'D' version of the STL - without that I found myself really frustrated, having to write my own containers and stuff that I would just do in a few lines with STL.

How's the DTL coming along? There was some guy working on the MinTL, but I don't know how far he got with that.
The "Japanese fellow with 3 or 4 freeware games" written in D is Kenta Cho, great games. ABA Games is his site, all games have D sourcecode available. They're very abstract, and not exactly pushing the CPU or GPU to the max, but I would say its proof that you can make great games in D.
I really like a lot of the features (I love you slicing!, and UTF8 for strings r0x0rz), but until it gets a little more popular, I'll probably pass.

Now, if someone were to develop an addon to integrate D with VS.Net... that would be just nifty.
Quote:Original post by evolutional
How's the DTL coming along? There was some guy working on the MinTL, but I don't know how far he got with that.


DTL hasn't progressed much in the last few months. That's Matthew's puppy, and his plate has been full. The last release was 0.2 back in August. With all he has on his plate (Imperfect C++, STLSoft, and now the D book) I doubt it will make much progress in the near future. In early December he laid out a list of stuff he was working on for it, but that was the last he said of it.

MinTL is developed by Ben Hinkle. Right now, it's still in a beta state but has several usable containers. I know some people have mentioned using it on the NG. Ben also is the author of Concurrent (a D port of Doug Lea's Java package) and MinWin, a minimal, xplatform GUI system.

I haven't found the need to use anything beyond D's builtin associative arrays and regular arrays yet, though I may have need of something more soon. The thing about D is that you can use associative arrays anywhere you would normally use a hash map, and using builtin array properties and operations you can whip up a simple vector-like class in a few lines of code. MinTL has several forms of linked lists, queues, stacks, and some containers that enhance the functionality of arrays and associative arrays.

Nothing about D, from the compiler and standard library to the third party libraries being developed by community members, is really ready to be used in production. Everything is in varying states of stability, and bugs abound. If you need to start cranking out production code today, D certainly isn't what you should be using. A year from now, yes, but not today.

But I do reccommend that anyone who has a passing interest in the language play around with it in their free time and get familiar with it. Even if you have no desire to pump out any tools or libraries, you still could pass bug reports and feature requests to the newsgroup. Though there's a freeze on new features for D 1.0, Walter has been taking note of new ideas for D 2.0. Many of the features the language has now evolved from discussions on the NG. Though he's quite stubborn on some issues (like the infamous bit vs. int for bool debate), he does listen and will make changes to the spec where warranted.

This topic is closed to new replies.

Advertisement