Jump to page: 1 2 3
Thread overview
just a few small questions
Apr 15, 2006
MM
Apr 15, 2006
Derek Parnell
Apr 15, 2006
MM
Apr 18, 2006
MM
Apr 18, 2006
clayasaurus
Apr 18, 2006
MM
Apr 22, 2006
David Medlock
Apr 15, 2006
Bruno Medeiros
Apr 15, 2006
Derek Parnell
Apr 15, 2006
MM
Apr 15, 2006
MM
Apr 15, 2006
clayasaurus
Apr 15, 2006
MM
Apr 15, 2006
MM
Apr 15, 2006
kris
Apr 15, 2006
James Pelcis
Apr 18, 2006
MM
Apr 15, 2006
clayasaurus
April 15, 2006
I'm really interested in using D for my next Game, but I had a few questions...

License:
First, can I use D commercially ...
Why is there a open source frontend, or better: Why is D not opensource?
(no offence intended)

Status:
Is D ready for commercial use?
(I need OpenGl and SDL)

implementation:
I'm really not into garbage collection(coming from C) and never had a real
understanding of tthe difference between stack and heap memory.
What is the best way to allocate a array like this:
info a[500][500];

info{
uint x,y,z;
}

thx, MM


April 15, 2006
On Sat, 15 Apr 2006 10:01:41 +1000, MM <MM_member@pathlink.com> wrote:

> I'm really interested in using D for my next Game, but I had a few questions...

...

> implementation:
> I'm really not into garbage collection(coming from C) and never had a real
> understanding of tthe difference between stack and heap memory.
> What is the best way to allocate a array like this:
> info a[500][500];
>
> info{
> uint x,y,z;
> }
>

 module whatever;
 private {
   struct info
   {
     uint x,y,z;
   }

   info[500][500] a;
 }

This should allocate the array of structs on the heap in a non-GC manner.

One major difference from C arrays is that the indexes are *used* in the reverse order from C. Meaning that in C one would write ...

   item = a[X][Y];

but in D one writes ...

   item = a[Y][X];

-- 
Derek Parnell
Melbourne, Australia
April 15, 2006
"MM" <MM_member@pathlink.com> wrote in message news:e1pd55$fjf$1@digitaldaemon.com...
> License:
> First, can I use D commercially ...

Yes.

> Why is there a open source frontend, or better: Why is D not opensource?
> (no offence intended)

The frontend is open source, but the backend is shared between D and Digital Mars's C++ compiler, DMC, which is a commercial product.  If you want a fully open-source D compiler, look for GDC (though it isn't always completely up-to-date).

> Status:
> Is D ready for commercial use?

Maybe.  There are still some issues which kind of need to be ironed out, but if you're willing to kind of ignore them ;) you could probably do fine.

> (I need OpenGl and SDL)

There are bindings to both on dsource, I believe.


April 15, 2006
MM wrote:
> I'm really interested in using D for my next Game, but I had a few questions...
> 
> 
> Status:
> Is D ready for commercial use?

D is in an advanced beta stage (not v1.0 status yet), and I would say yes, but there are some risks involved such as possible compiler bugs, lack of debugging options on windows, incomplete libraries, and possible language changes. However, for some, the amazing compile speeds and ease of use make up for its deficiencies. There are a number of large projects that have used D already, such as an EMCA script engine, GUI toolkits, some open source games, and more at www.dsource.org

> (I need OpenGl and SDL) 

http://www.dsource.org/projects/bindings
http://www.dsource.org/projects/derelict
April 15, 2006
>
>  module whatever;
>  private {
>    struct info
>    {
>      uint x,y,z;
>    }
>
>    info[500][500] a;
>  }
>
>This should allocate the array of structs on the heap in a non-GC manner.
>
>One major difference from C arrays is that the indexes are *used* in the reverse order from C. Meaning that in C one would write ...
>
>    item = a[X][Y];
>
>but in D one writes ...
>
>    item = a[Y][X];
>
>-- 
>Derek Parnell
>Melbourne, Australia

Thx, just one more question...
I need to read alot of blocks(rectangles if seen as a plane) out of it like.
Is this way then the fastest implementaion?
And how much can I take from the heap without problems?



April 15, 2006
>> Why is there a open source frontend, or better: Why is D not opensource?
>> (no offence intended)
>
>The frontend is open source, but the backend is shared between D and Digital Mars's C++ compiler, DMC, which is a commercial product.  If you want a fully open-source D compiler, look for GDC (though it isn't always completely up-to-date).
>
Thx... but ehm, I can use D commercially but the backend? is a commercial
product?
Do I need to buy this? (I can't even find a page where I see any purchasing :D
(backend = the actual compiler?)

>There are bindings to both on dsource, I believe.
Is a binding just as fast as a 'normal' implementation?


April 15, 2006
>D is in an advanced beta stage (not v1.0 status yet), and I would say yes, but there are some risks involved such as possible compiler bugs, lack of debugging options on windows, incomplete libraries, and possible language changes. However, for some, the amazing compile speeds and ease of use make up for its deficiencies. There are a number of large projects that have used D already, such as an EMCA script engine, GUI toolkits, some open source games, and more at www.dsource.org

Yeah I saw some japanese games made in D, they felt really solid which made me interested in D in the first place :)

>
>> (I need OpenGl and SDL)
>
>http://www.dsource.org/projects/bindings http://www.dsource.org/projects/derelict

I get this message:
FATAL: connection limit exceeded for non-superusers

btw, which windows IDE do you propose?


April 15, 2006
"MM" <MM_member@pathlink.com> wrote in message news:e1qt2l$26iq$1@digitaldaemon.com...
> Thx... but ehm, I can use D commercially but the backend? is a commercial
> product?
> Do I need to buy this? (I can't even find a page where I see any
> purchasing :D
> (backend = the actual compiler?)

Oh no no, here's how it works:

Walter (the guy who is Digital Mars) wrote DMC, the C compiler.  It is made technically of two parts: the frontend, which turns the source code files into a sort of meta-format, and the backend, which turns the meta-format into a program.  The reason this is built like this is that Walter can take the backend off the C compiler, write the D frontend (which is open-source), and make the D frontend produce a meta-format that the backend can understand.  That way, half of his work is done for him - he doesn't have to write an entire second backend for the D compiler.  The backend is part and parcel of the D compiler, but you don't have to pay anything for it, as D is not (yet) a commercial product.  This is why there's a GDC compiler - the gnu compiler project has a backend specification, and people can write frontends for it.  In the case of D, it's just a matter of making the D frontend (open-source) output a meta-format the the gnu backend can understand.

The backend is not open-source, only because Walter is currently making money off of it by selling DMC.  If he were to release the source of the backend, people would be able to make a compiler just like DMC for free, if they just wrote a C frontend.

So in short, no, you don't have to pay a thing or worry about licensing or anything if you use D.  And if you're still not sure about it, there's always GDC :)

> Is a binding just as fast as a 'normal' implementation?

A binding is just the interface to a library of some sort for a specific language.  Most libraries come with C header files, and thus come with a C binding.  Making a D binding of something usually just involves translating the header file(s) to D (since D is link-compatible with C).  D interfaces with C code very well; there is no performance penalty.


April 15, 2006
"MM" <MM_member@pathlink.com> wrote in message news:e1qtc1$26nd$1@digitaldaemon.com...
> Yeah I saw some japanese games made in D, they felt really solid which
> made me
> interested in D in the first place :)

Oh, did you see them on a CD?  Apparently, one of those was on a CD that came with CGW.

> I get this message:
> FATAL: connection limit exceeded for non-superusers

Ook, it looks like it's down or something.

> btw, which windows IDE do you propose?

Hm.  There's no real D IDE at the moment.. they always seem to get kind of far and then the programmers give up on them (happened to DIDE and akIDE, and Elephant isn't moving too fast either).

Personally I'd recommend ConTEXT (www.context.cx), I've been using it with D for over a year and I'm really happy with it.  I could post a highlighter file for it, as the one on the download site for ConTEXT is a little outdated.  ConTEXT, coupled with some kind of automated building system (like makefiles, Derek's build utility, or even just batchfiles (like I do ;) )), can be very nice indeed.  I haven't missed much from Visual Studio.


April 15, 2006
Thx! :)
That explained everything very clearly!


« First   ‹ Prev
1 2 3