D for games

36b416ed76cbaff49c8f6b7511458883
0
poita 101 Jul 30, 2010 at 20:11

I know there have been a few mentions of the D programming language around here, but I wanted to bring it up again because D2 was only recently released (beta) I’ve recently started doing some game development in D2 using Derelict and was wondering if anyone else was in the same position.

So far, I’m really liking the language. It’s very clean and simple, and the generic programming support available is just amazing – it really puts C++ templates to shame. I feel like I can finally write the code I want to write.

Also, the Derelict bindings for OpenGL, GLU, and SDL are great; I’ve had no problems with them so far.

The only problem with D at the moment is that the compiler and standard library are still quite buggy (e.g. occasionally get wrong code when compiling in release, and parts of the standard library are incomplete). It hasn’t been a major issue so far – I’ve had bugs that have left me confused for a few hours, but there have been no show-stoppers yet.

So, anyone else using D that would like to share their experiences?

4 Replies

Please log in or register to post a reply.

820ce9018b365a6aeba6e23847f17eda
0
geon 101 Jul 30, 2010 at 21:31

How is the Phobos/Tango war going? Esp. with D2.

36b416ed76cbaff49c8f6b7511458883
0
poita 101 Jul 30, 2010 at 21:49

Apart from the bugs I mentioned, Phobos is a superior library, and it is the standard library. On top of that, Andrei Alexandrescu’s book “The D Programming Language” recently came out, which only talks about Phobos.

As far as I can see, there is no discussion of Tango on the forums. It’s all Phobos now.

6f0a333c785da81d479a0f58c2ccb203
0
monjardin 102 Aug 01, 2010 at 19:12

@poita

As far as I can see, there is no discussion of Tango on the forums. It’s all Phobos now.

That sounds promising. I really liked D when I tried it out a few years ago, but it didn’t seem very mature yet.

Do you still have to create a special header file to pull in C libraries?

36b416ed76cbaff49c8f6b7511458883
0
poita 101 Aug 02, 2010 at 19:54

You have to write the function declarations in a D source file. For simple C header files, that usually just means doing a find/replace to change some of the C data types to D (e.g. unsigned int to uint).