Jump to page: 1 2
Thread overview
Beginning with D
Feb 26, 2009
Prestidigitator
Feb 26, 2009
Daniel Keep
Feb 26, 2009
Nick Sabalausky
Feb 26, 2009
Rainer Deyke
Feb 26, 2009
Bill Baxter
Feb 26, 2009
Rainer Deyke
Feb 26, 2009
Bill Baxter
Feb 26, 2009
grauzone
Feb 26, 2009
Rainer Deyke
Feb 26, 2009
bearophile
Feb 26, 2009
Tim M
Feb 26, 2009
Lutger
Feb 26, 2009
Jason House
Feb 26, 2009
Lutger
February 26, 2009
Is D as good at game programming as C++? Also, would it be better to use 1.0 or 2.0?

February 26, 2009
Prestidigitator wrote:
> Is D as good at game programming as C++? Also, would it be better to use 1.0 or 2.0?

D is a good language, and there are people writing games with it; just look at Deadlock [1] or Mayhem Intergalactic [2] (the latter of which is on sale right now!).

As for the D 1.0/2.0 thing, use 1.0.  2.0 isn't stable yet, and could change radically at any moment.  Plus, there's very little library support for 2.0.

Anyway, just me AU$0.02.

  -- Daniel


[1] http://deadlock.team0xf.com/
[2] http://www.inventivedingo.com/mayhemig
February 26, 2009
"Daniel Keep" <daniel.keep.lists@gmail.com> wrote in message news:go520b$1o5f$1@digitalmars.com...
>
> Prestidigitator wrote:
>> Is D as good at game programming as C++? Also, would it be better to use 1.0 or 2.0?
>
> D is a good language, and there are people writing games with it; just look at Deadlock [1] or Mayhem Intergalactic [2] (the latter of which is on sale right now!).
>

Also, Torus Trooper, Tumiki Fighters and probably a few of the other games by Kenta Cho/ABA Games were written in an early version of D (with Tumiki Fighters being the original version of Blast Works). http://www.asahi-net.or.jp/~cs8k-cyu/index_e.html

A large part of my programming background has centered on games, and I'd say that, for the most part, D is vastly better than C/C++ for games (In fact, that's what originally drew me to D in the first place). The one drawback though is that D support for consoles and other embedded systems is practically non-existent right now (but hopefully LDC will change that). Also, the vast majority of game middle-ware is still C/C++, so D bindings would have to be created to use them. That could be either easy or difficult depending on the actual lib.

Also, be wary of people on places like gamedev.net that try to immediately dismiss D. I've read a lot of their stuff and most of the time they demonstrate very clearly that they don't actually know anything about D, and they'll often get their facts about D comepletely wrong, or outdated, etc. Games have been C/C++ for a very long time, and have stayed that way (for very good reason) even while most software has switched to other newer/trendier languages, so it's very difficult for most of them to accept the idea that there might actually be something better.


February 26, 2009
Prestidigitator wrote:
> Is D as good at game programming as C++? Also, would it be better to use 1.0 or 2.0?

My opinion: D 1.0 is, on the whole, worse than C++.  D 2.0 is shaping up
 to be, on the whole, better than C++.  However, D 2.0 is unstable to
the point of being unusable at the moment.  Stick to C++ for now, but
come back in a year or two when D 2.0 has had time to stabilize.


-- 
Rainer Deyke - rainerd@eldwood.com
February 26, 2009
On Thu, Feb 26, 2009 at 2:25 PM, Rainer Deyke <rainerd@eldwood.com> wrote:
> Prestidigitator wrote:
>> Is D as good at game programming as C++? Also, would it be better to use 1.0 or 2.0?
>
> My opinion: D 1.0 is, on the whole, worse than C++.  D 2.0 is shaping up  to be, on the whole, better than C++.  However, D 2.0 is unstable to the point of being unusable at the moment.  Stick to C++ for now, but come back in a year or two when D 2.0 has had time to stabilize.

It really depends entirely on what you value in the language you use. So just stating that D is worse or better than C++ without your reasons for having reached that conclusion is really next to useless information.

If a strong toolchain is important to you, D loses to C++.
If the ability to use some large existing C++ framework is important
to you, D loses to C++.
If having a language that's enjoyable to use with good performance is
important to you, then D wins over C++.
And so on...

There are many categories in which D is behind C++, but as far as the core language goes, I would choose to use D1.0 over C++ any day.

--bb
February 26, 2009
Bill Baxter wrote:
> There are many categories in which D is behind C++, but as far as the core language goes, I would choose to use D1.0 over C++ any day.

I would not.  To this C++ programmer, using D 1.0 feels like stepping back from C++ to C in terms of resource management.

I never considered any factors other than the core language in the first place.


-- 
Rainer Deyke - rainerd@eldwood.com
February 26, 2009
On Thu, Feb 26, 2009 at 3:17 PM, Rainer Deyke <rainerd@eldwood.com> wrote:
> Bill Baxter wrote:
>> There are many categories in which D is behind C++, but as far as the core language goes, I would choose to use D1.0 over C++ any day.
>
> I would not.  To this C++ programmer, using D 1.0 feels like stepping back from C++ to C in terms of resource management.

Ok.  Now that's actually useful information.  Resource management. That's fair.  It is difficult to do things like ref-counted pointers in D1.  If I weren't satisfied using the built-in garbage collection for just about everything, I would probably find D a lot less attractive.

--bb
February 26, 2009
Rainer Deyke wrote:
> Bill Baxter wrote:
>> There are many categories in which D is behind C++, but as far as the
>> core language goes, I would choose to use D1.0 over C++ any day.
> 
> I would not.  To this C++ programmer, using D 1.0 feels like stepping
> back from C++ to C in terms of resource management.

Going back from D to C++ also feels like stepping back, because C++ doesn't natively support garbage collection. While I admit that reference counting is better for "heavy" resources (like file handles), for small memory objects tracing garbage collection is actually more efficient and less problematic. For example, reference counting can't deal with cycles of garbage.

And what's so great about wrapping every pointer into a smartpointer?

What do C++ programmers think about the D2.0 support for stuff like reference counting? (See http://www.digitalmars.com/d/2.0/struct.html#StructPostblit)

> I never considered any factors other than the core language in the first
> place.
February 26, 2009
Rainer Deyke:
> My opinion: D 1.0 is, on the whole, worse than C++.

There are many things in D1 better than C++, in particular you need less time learn the language and less time to write programs that work correctly.

Bye,
bearophile
February 26, 2009
On Fri, 27 Feb 2009 01:42:17 +1300, bearophile <bearophileHUGS@lycos.com> wrote:

> Rainer Deyke:
>> My opinion: D 1.0 is, on the whole, worse than C++.
>
> There are many things in D1 better than C++, in particular you need less time learn the language and less time to write programs that work correctly.
>
> Bye,
> bearophile

I think the key here is "on the whole" and in opinion. I'm not really interested in D vs C++ one sided arguments but apart from the constness in D2 what other features does C++ have over D?
« First   ‹ Prev
1 2