Game Programming and Development Tools

Anyone use D? – Lazarus

Lazarus

Member

Posts: 1668
From: USA
Registered: 06-06-2006
D is a language similar to C & C++, but with most of the bad features eliminated and some good ones added. Well, that's just what I think
Site: http://www.digitalmars.com

It uses classes and has a GC.
It is fast and easy to learn if you already know a C or C++ type language.
One neat feature is that it can interface with C libraries without the usual hassles of some other languages, and it's easy to convert C headers to work with D, there's even a program that does it.

Lazarus

------------------
Lazarus

HanClinto

Administrator

Posts: 1828
From: Indiana
Registered: 10-11-2004
Hey, Lazarus! Welcome to CCN! So very glad to have you here.

I haven't yet used D, but I've had my eye on it for a while, and I definitely like it as a language. If I wasn't so wrapped up in C# all the time, I think that I would be digging more into D. C# doesn't solve *all* the same issues with C/C++ that D does, but it solves a lot of them, and so I'm content for now.

D does look like a wonderful language though. Have you used it for any real projects yet?

--clint

Lazarus

Member

Posts: 1668
From: USA
Registered: 06-06-2006
Thanks, it's nice to be here. I didn't even know there were many other Christians programming till I found this site.

I've used D for a few programs. Right now I've been working on a wrapper for it to access a 2D game library, which I will then use to (hopefully) write some games.

Btw, nice avatar!

[This message has been edited by Lazarus (edited June 07, 2006).]

HanClinto

Administrator

Posts: 1828
From: Indiana
Registered: 10-11-2004
Nice! That's really cool to hear that you've written a few programs in D.

What 2D library are you writing a wrapper for? Allegro? Or something higher level?

--clint

Lazarus

Member

Posts: 1668
From: USA
Registered: 06-06-2006
It's called Yagl, uses OpenGL for the graphics, OpenAL for sound, and can take mouse, keyboard, and joystick input.
I'm writing a wrapper in Euphoria for it too, since I use that language as well.

It's quite easy to use, and runs on Windows & Linux; another plus.
The only downside is that the developer wants to have a real life ,
and is asking for volunteers to take over the project. Luckily it is LGPLed already.

------------------
Lazarus

[This message has been edited by Lazarus (edited June 07, 2006).]

luke

Member

Posts: 311
From: I use your computer as my second Linux box
Registered: 10-30-2005
I wonder why all the 'good' languages are named after bad school grades... I guess a lot of language makers where understood computers so well that no one at school could understand them lol...

But I digress, D looks pretty good; but I think that JAVA and C# will be fine for me, for now at least.

------------------
"Do not condemn others for their ignorance, use it against them."
Scott E. Roeben

Lazarus

Member

Posts: 1668
From: USA
Registered: 06-06-2006
There's an A language as well, and also one called ABC, but neither are very popular lol.
I think that people ran out of names for programming languages and just started using letters of the alphabet. According to one site, there are over 8000 different programming languages.
Java was originally named Oak, till Gosling saw a cup of coffee on his desk and decided to rename it for some reason .
firemaker103

Member

Posts: 643
From:
Registered: 07-13-2005
8000? A lot of them most be crazy ones like Whitespace!

------------------
"Be nice to the nerds because later on, you'll be working for them" - Bill Gates

Elusive Pete

Junior Member

Posts: 5
From: Paisley, Scotland
Registered: 05-29-2006
(EDIT: I'm responding to the question of programming languages being named after bad school grades!)

There was, at one stage, a language called "BCPL". I forget what it stood for, but the CPL is probably "Computer Programming Language". Basically, somebody decided to make a derivative language, and named it "B", since it's the first letter of "BCPL". Then, somebody decided to update that, and guess what it was called??? "C"! Hurrah.

I think somebody *did* make "P", but it really wasn't very popular.

Anyways, C++ was so named as it is an "increment" of C (a subtle programming joke I guess). It's similar with C# -- a "C sharp" note in music is one note (semitone) above a "C"... it's just another increment. (The same applies to Microsoft's "J#", which is their own rip-off of Java, although "J" isn't a note in music).

And finally, "D" is just the next letter of the alphabet after C... boring, but true.

------------------
Born again, spirit-filled son of the true and living God!

[This message has been edited by Elusive Pete (edited June 08, 2006).]

Lazarus

Member

Posts: 1668
From: USA
Registered: 06-06-2006
Basic Combined Programming Language is what BCPL stands for.

What's wrong with boring names for programming languages?
I don't use Ruby because I like gems like that. I don't use Java because I'm a coffee drinker. I use a language because it works well, or some other reason.

It's funny tho', on the D site the creator has a quote from someone:
"Just what I need, another D in programming."

Lazarus

HanClinto

Administrator

Posts: 1828
From: Indiana
Registered: 10-11-2004
Basically...
c == c++

...but the value of c has been increased.
CoolJ

Member

Posts: 354
From: ny
Registered: 07-11-2004
quote:
Originally posted by firemaker103:
8000? A lot of them most be crazy ones like Whitespace!


whitespace rocks! pure genius! I'm just holding out for the .net version.
or maybe we should make a new language called smileys


The following program looks simple, but is actually a full featured game server -

gameserver.smiley



pretty powerful!!

[This message has been edited by coolj (edited June 08, 2006).]

Elusive Pete

Junior Member

Posts: 5
From: Paisley, Scotland
Registered: 05-29-2006
quote:
Originally posted by Lazarus:
What's wrong with boring names for programming languages?

Nothing whatsoever! What I meant was that using "D" as the name for another increment on "C" et al. is a bit boring... i.e. there's no particularly interesting backstory to it.

Of course, the best named language ever has to be "Python"... so named in memory of a stereotypical geek's favourite comedy show, "Monty Python's Flying Circus". In saying that, I've never actually used Python seriously - the layout-dependent nature of it bothered me a tad. However, with Stackless Python making its presence felt (e.g. in the MMORPG "Eve Online"), I might be enticed to learn that, should the need arise.

Anyways... back to original topic... I know someone who's been looking into D, and has told me about some of its good features. It certainly sounds good, but given the saturated market for so-called "C-style" languages, it would probably need a *very* hefty financial and popularity backing to get it going. Just compare it to C#, for example: quite new, but owned by Microsoft. What more can I say?

------------------
Born again, spirit-filled son of the true and living God!

Lazarus

Member

Posts: 1668
From: USA
Registered: 06-06-2006
Well, D is gaining in popularity, but it doesn't yet have as you put it a "*very* hefty financial backing". I sure hope it gets some though.

Microsoft always seems to come up with it's own versions of different languages, and many people use them; but whether they are really better?
Visual BASIC used to be very popular(and slow), but the .NET version made some coders stop using it, C# vs Java is still a debate as to which is better.

Personally, I don't like MS languages because they are usually Windows only, their licenses are restrictive(like all Microsoft EULA's), and I just don't like MS for other reasons as stated in another thread.

Lazarus

jestermax

Member

Posts: 1064
From: Ontario, Canada
Registered: 06-21-2006
to compare Java and C# isn't really fair. they're two completely separate things. Java is an interpretted language and has a lot of nice features. I can't honestly say i'm a guru of C# but i know that it's basically a cross between java syntax and c++ syntax (full object oriented). However i have to agree with you that Microsoft means windows only, but they DO have some nice tools
HanClinto

Administrator

Posts: 1828
From: Indiana
Registered: 10-11-2004
FWIW, at work, we use Mono to allow our .NET apps to run on Linux and Windows fairly seamlessly. We use C# as our language, and GTK# for our graphical toolkit (it's built on top of GTK+), and we've been very happy with it for the past year or more that we've been using it. We also use SharpDevelop for our IDE, Glade to do our forms layout, and NAnt as our build tool.

I say all this just to illustrate that C# really is a great language in the cross-platform realm, and that using a "Microsoft Language" doesn't limit you to Windows by any means.

--clint
"Defender of the C#"

[This message has been edited by HanClinto (edited June 28, 2006).]

jestermax

Member

Posts: 1064
From: Ontario, Canada
Registered: 06-21-2006
there you have it C# can hold its own. A lot of times though, the language of choice just happens to be the language of opportunity, aka, either the first language that hits home, or a language that someone else is making you use.
Pretty much, if you're shopping for a language (wow, i say that word a lot), think about what you want to use it for. Finding the best choice that requires the least amount of 3rd party libraries, etc is generally a very good idea
HanClinto

Administrator

Posts: 1828
From: Indiana
Registered: 10-11-2004
quote:
Originally posted by jestermax:
A lot of times though, the language of choice just happens to be the language of opportunity, aka, either the first language that hits home, or a language that someone else is making you use.

This is quite often true, yes. I've tried really hard to make sure that I'm not merely having our department use C# because it just-so-happens to be my current favorite language, but I really tried to find what would be the best in terms of long-term and short-term goals for the project.

quote:
Originally posted by jestermax:
Pretty much, if you're shopping for a language (wow, i say that word a lot), think about what you want to use it for. Finding the best choice that requires the least amount of 3rd party libraries, etc is generally a very good idea

One key factor with us was not just dependencies as far as 3rd party libraries, but dependencies as far as knowledge on getting the tool to work. We sometimes have intermittent volunteer help where I work (it's a missions agency), and so we wanted to pick a development environment that new people could pick up and be productive in quickly (without having to mess with a lot of library dependencies and make-file torture inherint in so much Linux development). We were using Kylix, but it hasn't been supported by Borland in more than a few years (last supported Redhat distro was 7.2), and we had to find another environment. That left us with Java, C++ (with QTDesigner in KDevelop), or C# under Mono. We eventually settled on C# because of it's (relative) ease of use under Linux, and while I think (and hope/pray) we made the right choice for our goals, only time will tell.

C# certainly isn't the best for all situations (I think D is better in a number of aspects), but I thought people might benefit from seeing some of what goes into making language/tool decisions for projects within a real work environment.

Cheers!

--clint

[This message has been edited by HanClinto (edited June 28, 2006).]

steveth45

Member

Posts: 536
From: Eugene, OR, USA
Registered: 08-10-2005
From the Digital Mars page, D is basically C++ with some annoyances removed and some good things added while maintaining the speed of natively compiled code. A short list is that header files are gone, multiple inheritance is gone, pointer member access replaces the -> with a . (dot), and memory is garbage collected (all things that Java and C# have). D retains unsafe pointers, templates, etc.

This puts D somewhere in between C++ and Java/C#. What D doesn't have is a cross-platform GUI (though, I suppose you could use GTK, but there's no visual GUI editor). Java and C# can also be compiled to intermediate formats that are cross-platform (thanks to Mono for C#). The Java library and .NET/Mono libraries give these languages most of their usefulness. D can link to C libraries of code (SDL and OpenGL) but not C++ (like Irrlicht and Ogre3D).

If you want to know how C# and Java are different check out this very thorough comparison of language features : http://www.javacamp.org/javavscsharp/index.html . Even though the page is on javacamp.org it shows quite clearly the superiority of C# in most categories.

------------------
+---------+
|steveth45|
+---------+

Klumsy

Administrator

Posts: 1061
From: Port Angeles, WA, USA
Registered: 10-25-2001
quote:

to compare Java and C# isn't really fair. they're two completely separate things. Java is an interpretted language and has a lot of nice features. I can't honestly say i'm a guru of C# but i know that it's basically a cross between java syntax and c++ syntax (full object oriented). However i have to agree with you that Microsoft means windows only, but they DO have some nice tools


don't get me wrong, i love C#, and rather dispise java, but thats not quite accurate. Java is no more interpretted than C#, both compile to an intermediate high level fake "assembler" sort of language (p-code). Its just that microsofts PCODE is better , faster, more robust , and has a bunch more languages compiling to it than does Java. But about 50 - 60% of the critical concepts in C# and java are the same..

there are two things that microsoft had with C# that sun didn't java

1) Hindsight - java was really a great first proof of concept, of a language with certian modern features in it.. However it had alot of design limitations that because of backwards compatibility java programmers still have to live with these days. This is normal for any firstrunner though. Microsoft however could look at java and see what it did very well (and copy it, maybe improve it) and could see where java failed (and avoid it, or work around it). Also dotnet had a vision and concepts that went above and beyond those in java.. But in many cases java and C# are like siblings.

2) they had anders, anders pioneered many of the key elements of both java and C#. C# in many was is just like borland delphi, in C style syntax instead of pascal sytnax, based on a "virtual machine" (VM/pcode). Much of the concepts were first implemented in the industry by anders as teh architect of delphi, and borland actually did alot of consulting with sun, and helped alot in the design on java, particulary in the area of component model design, javabeans yada yada. And many of the concepts of java come from delphi as well. But microsoft went further, they bought out anders from borland (with a nice sign on bonus of 3 million dollars) as well as about 40 other key architecture people from borland, and it is widely believed that dotnet was originally a borland r&d project (of anders), for borland sued for trade secret theft, and microsoft settled out of court for $100 million dollars. Anyhow because of these reasons i believe C# is definately the better designed and better language, but java still has its uses and a broad range of uses because it was established earlier and is on a greater variety of platforms. but i love C#, and also the innovation in dotnet 2.0, and forwards.. have you seen the LINQ project.. that really shows some of the great ideas spawning off from the 2nd round of dotnet innovation.. LINQ rocks, and of course there is ironpython, F# and powershell. Powershell (monad) of course is something i am highly involved with.

When i talk to the top architects at microsoft, most of them said they went to work at microsoft rather reluctantly at first.. like they were 90% sure they didn't want to work there, but they went through the processes and decided they would, for one main reason, because they wanted to change the world, and they felt that was the platform where their ideas really could have a global impact, and i think alot of these kind of people are transforming microsoft into something much better than it was in the past. In the case of anders, he was quite reluctant i think, as he turned down their initial sign on bonus of 1.5 million dollars. As for myself, in the next day or two i'll have to go and tell them no, (and hopefully be able to share a bit of the gospel), when i explain to them that i've just taken a job at a christian ministry instead, (for thats the way i want to change the world). but that is a nother story for another post.

Karl

------------------
Karl /GODCENTRIC
Visionary Media
the creative submitted to the divine.
Husband of my amazing wife Aleshia
Klumsy@xtra.co.nz

jestermax

Member

Posts: 1064
From: Ontario, Canada
Registered: 06-21-2006
Microsoft DID copy java and "improve" it, thats what we call J#. I don't really have the knowledgebase to start talking about that or anything, and i'm not a java spokesperson, lol. i think java is starting to die down. The APIs have gotten very messy and it just seems ragtag. I wouldn't ever suggest that a company should invest in Java over .NET, but i think that Java has its strongpoints. It's natural multiplatform-ness is very nice. Also, the security that java provides is nice too thanks to the lack of pointers. Some people think that the language is weak because it doesn't have pointers but most of those people don't even know HOW to use pointers properly.