December 12, 2007
Ansible wrote:
> Looks great!

Thanks! :-)

> I'd be interested in reading a 'postmortem' of the project.  What went right, what went wrong?  What was easy and what was hard?  How did writing a game in D compare with writing one in another language?
> 
> Ben Burdette

Here goes...

What went right:

- Using D instead of C++ allowed me to concentrate on coding rather than trying to debug stupidly weird compilation errors cropping up inside nested STL template code that I don't understand, and impossible-to-diagnose crashes caused by rogue pointers.

- Porting from Windows to Linux (done when I personally switched operating systems - I wanted to develop it under Linux so I had to get it to build!) was easier than expected.

- I learnt a lot about software design.

What went wrong:

- I wrote my own game engine, even though I knew it would make the process harder and longer. Seems like everyone falls into this trap. Next time I'm definitely going to use an existing and well-supported game engine.

- Porting to Mac, which I've just mostly-completed, was harder than expected. Figuring out how to dynamically link to frameworks and getting all the Cocoa initialisation code (necessary for SDL) running was tricky for someone with no prior Mac experience.

- Using D instead of, say, Python meant I felt like I was either reinventing the wheel all the time, or trying to find a C library (not C++ - the recent linking-to-C++ functionality looks promising but it wasn't around at the time I was doing this) that did what I needed. You just can't beat Python's "batteries included" approach; and for everything that isn't in Python's standard library, someone's done all the hard work of sourcing and linking to libraries for you already.

Example: I wrote all my own GUI code, including textboxes (pray that you'll never have to reinvent that particular wheel), because I couldn't find any usable C libraries for displaying and operating GUIs in OpenGL. I did consider porting Harmonia (e.g.) to OpenGL, but it looked too hard.

- I had a lot to learn about software design. :-)


And now it's time for some minor ranting.

I'd say the biggest problem I encountered was a chronic lack of library support. No matter how great a language is - and D is a great language - you won't get anywhere if you can't do anything useful with it, quickly. For *any* conceivable common task, I should be able to drop a (preferably native, preferably not GPL or LGPL) library straight in and get on writing new code, instead of having to write the world's 10 millionth textbox or XML parser. I actually ended up using ini files instead of XML files, simply because there was a great ini file parsing module available and I wasn't able to find a good enough XML library at the time that I needed it (about two years ago).

I do think this situation has improved somewhat since I started work on Mayhem Intergalactic, more than two years ago. Having said that, I'm not sure I could currently whole-heartedly recommend D to a fellow indie game developer, largely because of the library situation; but also because D's Mac OS X compatibility for gaming purposes is not what it should be. The Mac market is important enough for indie game developers that they really can't afford any obstacles in the way of porting their games to the Mac.

(To be clear, gdc works GREAT on Mac; I was impressed by how easy it is to generate universal binaries for example, as it works exactly the same way as in gcc. The compiler is not the issue. It's the lack of comprehensive Mac support from D's various graphics and GUI libraries/bindings that's the issue. I hope to help rectify that situation with Derelict at least, although SDL 1.3 will eventually remove the issue of SDLmain.)

-- Chris P
December 12, 2007
Chris P. wrote:
> I'd say the biggest problem I encountered was a chronic lack of library
> support. No matter how great a language is - and D is a great language -
> you won't get anywhere if you can't do anything useful with it, quickly.
> For *any* conceivable common task, I should be able to drop a
> (preferably native, preferably not GPL or LGPL) library straight in and
> get on writing new code, instead of having to write the world's 10
> millionth textbox or XML parser. I actually ended up using ini files
> instead of XML files, simply because there was a great ini file parsing
> module available and I wasn't able to find a good enough XML library at
> the time that I needed it (about two years ago).
> 

Mind if I ask which ini file parser you're referring to? :-)

-- 
Kirk McDonald
http://kirkmcdonald.blogspot.com
Pyd: Connecting D and Python
http://pyd.dsource.org
December 13, 2007
Chris P. wrote:
> Ansible wrote:
>> Looks great!
> 
> Thanks! :-)
> 
>> I'd be interested in reading a 'postmortem' of the project.  What went right, what went wrong?  What was easy and what was hard?  How did writing a game in D compare with writing one in another language?
>>
>> Ben Burdette
> 
> Here goes...
> 
> What went right:
> 
> - Using D instead of C++ allowed me to concentrate on coding rather than
> trying to debug stupidly weird compilation errors cropping up inside
> nested STL template code that I don't understand, and
> impossible-to-diagnose crashes caused by rogue pointers.
> 
> - Porting from Windows to Linux (done when I personally switched
> operating systems - I wanted to develop it under Linux so I had to get
> it to build!) was easier than expected.
> 
> - I learnt a lot about software design.
> 
> What went wrong:
> 
> - I wrote my own game engine, even though I knew it would make the
> process harder and longer. Seems like everyone falls into this trap.
> Next time I'm definitely going to use an existing and well-supported
> game engine.
> 
> - Porting to Mac, which I've just mostly-completed, was harder than
> expected. Figuring out how to dynamically link to frameworks and getting
> all the Cocoa initialisation code (necessary for SDL) running was tricky
> for someone with no prior Mac experience.
> 
> - Using D instead of, say, Python meant I felt like I was either
> reinventing the wheel all the time, or trying to find a C library (not
> C++ - the recent linking-to-C++ functionality looks promising but it
> wasn't around at the time I was doing this) that did what I needed. You
> just can't beat Python's "batteries included" approach; and for
> everything that isn't in Python's standard library, someone's done all
> the hard work of sourcing and linking to libraries for you already.
> 
> Example: I wrote all my own GUI code, including textboxes (pray that
> you'll never have to reinvent that particular wheel), because I couldn't
> find any usable C libraries for displaying and operating GUIs in OpenGL.
> I did consider porting Harmonia (e.g.) to OpenGL, but it looked too hard.
> 
> - I had a lot to learn about software design. :-)
> 
> 
> And now it's time for some minor ranting.
> 
> I'd say the biggest problem I encountered was a chronic lack of library
> support. No matter how great a language is - and D is a great language -
> you won't get anywhere if you can't do anything useful with it, quickly.
> For *any* conceivable common task, I should be able to drop a
> (preferably native, preferably not GPL or LGPL) library straight in and
> get on writing new code, instead of having to write the world's 10
> millionth textbox or XML parser. I actually ended up using ini files
> instead of XML files, simply because there was a great ini file parsing
> module available and I wasn't able to find a good enough XML library at
> the time that I needed it (about two years ago).
> 
> I do think this situation has improved somewhat since I started work on
> Mayhem Intergalactic, more than two years ago. Having said that, I'm not
> sure I could currently whole-heartedly recommend D to a fellow indie
> game developer, largely because of the library situation; but also
> because D's Mac OS X compatibility for gaming purposes is not what it
> should be. The Mac market is important enough for indie game developers
> that they really can't afford any obstacles in the way of porting their
> games to the Mac.
> 
> (To be clear, gdc works GREAT on Mac; I was impressed by how easy it is
> to generate universal binaries for example, as it works exactly the same
> way as in gcc. The compiler is not the issue. It's the lack of
> comprehensive Mac support from D's various graphics and GUI
> libraries/bindings that's the issue. I hope to help rectify that
> situation with Derelict at least, although SDL 1.3 will eventually
> remove the issue of SDLmain.)
> 
> -- Chris P

This is a great writeup.  Cheers!
December 13, 2007
Kirk McDonald wrote:
> Mind if I ask which ini file parser you're referring to? :-)

I'm using this one: http://www.dprogramming.com/ini.php

It was the only one I came across at the time, though admittedly I didn't look very hard once I found it - it filled my needs just fine.

-- Chris P
December 13, 2007
janderson wrote:
> This is a great writeup.  Cheers!

Happy to oblige. I don't need much encouragement to ramble. :-)

-- Chris P
December 13, 2007
I'm also currently working on a game project in D with a small team, and I can second most of what you said.

Chris P. schrieb:
> - I wrote my own game engine, even though I knew it would make the process harder and longer. Seems like everyone falls into this trap. Next time I'm definitely going to use an existing and well-supported game engine.

... of which there currently aren't any stable ones for D, as far as I can see. Or am I missing something?

> I do think this situation has improved somewhat since I started work on Mayhem Intergalactic, more than two years ago. Having said that, I'm not sure I could currently whole-heartedly recommend D to a fellow indie game developer, largely because of the library situation;

I second that. I wish we had used C++ instead, even though coding in D is much more fun. It just would have saved us so much work.

Sebastian
December 13, 2007
Sebastian Beschke wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I'm also currently working on a game project in D with a small team, and
> I can second most of what you said.
> 
> Chris P. schrieb:
>> - I wrote my own game engine, even though I knew it would make the
>> process harder and longer. Seems like everyone falls into this trap.
>> Next time I'm definitely going to use an existing and well-supported
>> game engine.
> 
> ... of which there currently aren't any stable ones for D, as far as I
> can see. Or am I missing something?
> 

Well, there is my attempt to create a 2D game engine backend: http://www.dsource.org/projects/arclib

The API's not stable in the long term yet, but the v.2 branch is.

~ Clay

December 19, 2007
Sebastian Beschke wrote:
> I'm also currently working on a game project in D with a small team, and I can second most of what you said.

Ah, cool. Commercial or freeware game?

If you ever port it to Mac, let me know if you run into any problems; I may be able to help. Been there, done that. :-)


> Chris P. schrieb:
>> - I wrote my own game engine, even though I knew it would make the process harder and longer. Seems like everyone falls into this trap. Next time I'm definitely going to use an existing and well-supported game engine.
> 
> ... of which there currently aren't any stable ones for D, as far as I can see. Or am I missing something?

No, you're not missing anything. (ArcLib aside - sorry Clay, but I'm not convinced it's well-enough supported yet for me to be confident about building a commercial game on it. Porting to Mac would still have been an issue, for the same reasons and in the same way.) So this mistake was inevitable as a consequence of using D. I'm listing it separately anyway because it's worth noting.

A stable, well-supported, already-ported-everywhere game engine or three would do wonders for D's usability as a game development platform. Sadly, such things take a fair amount of time and effort to build.


>> I do think this situation has improved somewhat since I started work on Mayhem Intergalactic, more than two years ago. Having said that, I'm not sure I could currently whole-heartedly recommend D to a fellow indie game developer, largely because of the library situation;
> 
> I second that. I wish we had used C++ instead, even though coding in D is much more fun. It just would have saved us so much work.

Indeed. Though I probably would have used Python, just because I seem to have a talent for making C++ programs that spit obscure compiler errors or contain unexplainable, undebuggable, seemingly random crashes. <g>

Doesn't happen with any other language - not D, nor Java, nor Python, nor even plain C - just with C++... so strange.

(If any potential employers are reading this, the above was a joke! Honest. I've learnt a lot since writing my last C++ program.)

- Chris P.
December 21, 2007
Chris P. wrote:
> Sebastian Beschke wrote:
>> I'm also currently working on a game project in D with a small team, and
>> I can second most of what you said.
> 
> Ah, cool. Commercial or freeware game?
> 
> If you ever port it to Mac, let me know if you run into any problems; I
> may be able to help. Been there, done that. :-)
> 
> 
>> Chris P. schrieb:
>>> - I wrote my own game engine, even though I knew it would make the
>>> process harder and longer. Seems like everyone falls into this trap.
>>> Next time I'm definitely going to use an existing and well-supported
>>> game engine.
>> ... of which there currently aren't any stable ones for D, as far as I
>> can see. Or am I missing something?
> 
> No, you're not missing anything. (ArcLib aside - sorry Clay, but I'm not
> convinced it's well-enough supported yet for me to be confident about
> building a commercial game on it. Porting to Mac would still have been
> an issue, for the same reasons and in the same way.) So this mistake was
> inevitable as a consequence of using D. I'm listing it separately anyway
> because it's worth noting.
> 
> A stable, well-supported, already-ported-everywhere game engine or three
> would do wonders for D's usability as a game development platform.
> Sadly, such things take a fair amount of time and effort to build.
> 

Surely, there are enough D people interested in game development to pull off the effort, the only problem is lack of coordination.

Maybe you and Sebastian can start a more professional effort? I suppose the only way to get what you really want is to do it yourself.

~ Clay


1 2 3
Next ›   Last »