www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Mayhem Intergalactic: First commercial game written in D?

reply "Chris P." <chrisp inventivedingo.com> writes:
Greetings,

I'm the author of the indie game Mayhem Intergalactic. I've been selling
it since July, and I'm still working on improving it.

I'm making this post here because Mayhem Intergalactic is written in D -
making it the first released commercial game written in D, as far as I
know. Please correct me if I'm wrong. :-)

It's using OpenGL and SDL via Derelict, and Phobos (Tango didn't exist
when I started). You can check out the demo and/or snag yourself a copy
here:

http://www.inventivedingo.com/mayhemig

Windows only for the moment I'm afraid. I'm still working on Linux and
Mac support.

Cheers,
Chris Pelling


P.S. I know, I'm a bit late making this post - the impetus for doing it
now was Aldacron noticing me talking elsewhere about Mayhem
Intergalactic being written in D, and blogging about it:
http://dblog.aldacron.net/2007/12/06/mayhem-intergalactic/

P.P.S. Anyone who can help me fix the crash I'm getting on the Mac wins
a free copy of the game. ;-)  (See the tail end of
http://dsource.org/forums/viewtopic.php?t=3401 for details.)
Dec 06 2007
next sibling parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Chris P. wrote:

 P.P.S. Anyone who can help me fix the crash I'm getting on the Mac wins
 a free copy of the game. ;-)  (See the tail end of
 http://dsource.org/forums/viewtopic.php?t=3401 for details.)
Not sure what Derelict is doing, but linking to the patched SDLmain hasn't been required for quite some time now - instead the required "SDL_main" can call upon the D runtime to invoke the user main()... And of course it doesn't have to have anything to do with the crash. :-) --anders
Dec 06 2007
parent reply "Chris P." <chrisp inventivedingo.com> writes:
Anders F Björklund wrote:
 Chris P. wrote:
 
 P.P.S. Anyone who can help me fix the crash I'm getting on the Mac wins
 a free copy of the game. ;-)  (See the tail end of
 http://dsource.org/forums/viewtopic.php?t=3401 for details.)
Not sure what Derelict is doing, but linking to the patched SDLmain hasn't been required for quite some time now - instead the required "SDL_main" can call upon the D runtime to invoke the user main()...
Oh, really? I've only really been reading the Derelict forums, so I wasn't aware that anyone had come up with a solution not involving SDLmain.m. Could you point me to it? Thanks, Chris
Dec 07 2007
parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Chris P. wrote:

 Not sure what Derelict is doing, but linking to the patched SDLmain
 hasn't been required for quite some time now - instead the required
 "SDL_main" can call upon the D runtime to invoke the user main()...
Oh, really? I've only really been reading the Derelict forums, so I wasn't aware that anyone had come up with a solution not involving SDLmain.m. Could you point me to it?
There is some source code at http://www.algonet.se/~afb/d/#bindings --anders
Dec 07 2007
parent reply "Chris P." <chrisp inventivedingo.com> writes:
Anders F Björklund wrote:
 Chris P. wrote:
 
 Not sure what Derelict is doing, but linking to the patched SDLmain
 hasn't been required for quite some time now - instead the required
 "SDL_main" can call upon the D runtime to invoke the user main()...
Oh, really? I've only really been reading the Derelict forums, so I wasn't aware that anyone had come up with a solution not involving SDLmain.m. Could you point me to it?
There is some source code at http://www.algonet.se/~afb/d/#bindings --anders
Oh, I see - you're still using SDLmain, but it's standard SDLmain, not a patched SDLmain? My solution doesn't involve SDLmain at all, that was the point. It does the required initialisation on Mac OS X by itself. Or at least it does some of it - maybe my crash is because I'm not initialising something that I should be, I don't know. According to Sam Lantinga, SDLmain.c is public domain, but I can't find any definitive references to SDLmain.m being public domain, and that's the file we really care about for Mac OS X. So IMO SDLmain.m's licencing status is unclear. It's for this reason that I've constructed my own, independent solution. -Chris
Dec 07 2007
parent =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Chris P. wrote:

 Oh, I see - you're still using SDLmain, but it's standard SDLmain, not a
 patched SDLmain? My solution doesn't involve SDLmain at all, that was
 the point.
Sorry, must have missed the point then...
 According to Sam Lantinga, SDLmain.c is public domain, but I can't find
 any definitive references to SDLmain.m being public domain, and that's
 the file we really care about for Mac OS X. So IMO SDLmain.m's licencing
 status is unclear. It's for this reason that I've constructed my own,
 independent solution.
I only use libSDLmain.a library actually. Weirdo "Feel free to customize this file to suit your needs" license, which would be easier if it was explicitly Public Domain like the other. Probably only a problem with older SDL and MacOS versions, since the new SDL 1.3 on Mac OS X doesn't need any special "SDLmain" any longer... --anders
Dec 09 2007
prev sibling next sibling parent Mike Parker <aldacron71 yahoo.com> writes:
Chris P. wrote:

 
 I'm making this post here because Mayhem Intergalactic is written in D -
 making it the first released commercial game written in D, as far as I
 know. Please correct me if I'm wrong. :-)
I believe you are correct. A couple of years ago, Kai Backman started porting his commercial C++ indie game, ShortHike, to D. But to the best of my knowledge he never started selling the port. He released a development version last year[1], then a few months later released the whole thing under the Apache 2.0 license[2]. So that was almost the first commercial D game. Unless someone else steps out of the woodwork, it looks like you get the honor:) [1]http://dblog.aldacron.net/2006/05/22/commercial-game-in-d/ [2]http://dblog.aldacron.net/2006/09/10/commercial-indie-game-goes-open-source-with-d/
Dec 07 2007
prev sibling next sibling parent reply John Reimer <terminal.node gmail.com> writes:
Chris P. wrote:
 Greetings,
 
 I'm the author of the indie game Mayhem Intergalactic. I've been selling
 it since July, and I'm still working on improving it.
 
 I'm making this post here because Mayhem Intergalactic is written in D -
 making it the first released commercial game written in D, as far as I
 know. Please correct me if I'm wrong. :-)
 
 It's using OpenGL and SDL via Derelict, and Phobos (Tango didn't exist
 when I started). You can check out the demo and/or snag yourself a copy
 here:
 
 http://www.inventivedingo.com/mayhemig
 
 Windows only for the moment I'm afraid. I'm still working on Linux and
 Mac support.
 
 Cheers,
 Chris Pelling
 
 
 P.S. I know, I'm a bit late making this post - the impetus for doing it
 now was Aldacron noticing me talking elsewhere about Mayhem
 Intergalactic being written in D, and blogging about it:
 http://dblog.aldacron.net/2007/12/06/mayhem-intergalactic/
 
 P.P.S. Anyone who can help me fix the crash I'm getting on the Mac wins
 a free copy of the game. ;-)  (See the tail end of
 http://dsource.org/forums/viewtopic.php?t=3401 for details.)
Ho! The game of "Risk" in space! Great idea! :-) I tried the demo and think it's great little game! I like the uncomplicated interface and strangely immersive experience. That music certainly sets the mood too. Good work! You could probably port such a concept successfully to a pda device too if D ever gets there (officially). John
Dec 07 2007
parent reply "Chris P." <chrisp inventivedingo.com> writes:
John Reimer wrote:
 Ho!  The game of "Risk" in space! Great idea! :-)
 
 I tried the demo and think it's great little game!  I like the 
 uncomplicated interface and strangely immersive experience.  That music 
 certainly sets the mood too.
Thanks! Yes, I've had several people comment that it's a surprisingly engaging game despite (or perhaps because of) the simple mechanics. The music has divided opinions - seems you either like it or hate it! Still, that's why there's an options screen to turn it off.
 You could probably port such a concept successfully to a pda 
 device too if D ever gets there (officially).
Heh. We'll see. Merely porting it to the Mac was tiresome enough, and I don't own a PDA, so... :-) Oh, and it uses OpenGL, which is a bit of a downer for handheld devices. I could rewrite the renderer to use a 2D blitter of course, but it would be a bit of work. It would be cool though! Cheers, Chris
Dec 08 2007
next sibling parent John Reimer <terminal.node gmail.com> writes:
Chris P. wrote:
 John Reimer wrote:
 Ho!  The game of "Risk" in space! Great idea! :-)

 I tried the demo and think it's great little game!  I like the 
 uncomplicated interface and strangely immersive experience.  That music 
 certainly sets the mood too.
Thanks! Yes, I've had several people comment that it's a surprisingly engaging game despite (or perhaps because of) the simple mechanics. The music has divided opinions - seems you either like it or hate it! Still, that's why there's an options screen to turn it off.
Yes, the only problem with the music is that it is a little distracting and overbearing. It's a great choice for the mood... just a little too powerful. But like you said, one has the choice to turn it off.
 
 You could probably port such a concept successfully to a pda 
 device too if D ever gets there (officially).
Heh. We'll see. Merely porting it to the Mac was tiresome enough, and I don't own a PDA, so... :-) Oh, and it uses OpenGL, which is a bit of a downer for handheld devices. I could rewrite the renderer to use a 2D blitter of course, but it would be a bit of work. It would be cool though!
Probably the best (read easiest) target for a PDA would be one of the linux based ones that are coming out now like the Nokia ones... or even the small linux based asus laptops (Eee PC). Perhaps they have Opengl ES and that might be sufficient. These would likely be easy targets for gdc, sdl, derelict, etc. (I have a couple of older sharp zaurus pda's but those have no market beyond geek value). Yes, Mac seems to still be a little tricky for D because there aren't as many people using it... but there are a few resident experts here for that platform, so you are in good company. - John
Dec 08 2007
prev sibling parent reply janderson <askme me.com> writes:
Chris P. wrote:
 John Reimer wrote:
 Ho!  The game of "Risk" in space! Great idea! :-)

 I tried the demo and think it's great little game!  I like the 
 uncomplicated interface and strangely immersive experience.  That music 
 certainly sets the mood too.
Thanks! Yes, I've had several people comment that it's a surprisingly engaging game despite (or perhaps because of) the simple mechanics. The music has divided opinions - seems you either like it or hate it! Still, that's why there's an options screen to turn it off.
 You could probably port such a concept successfully to a pda 
 device too if D ever gets there (officially).
Heh. We'll see. Merely porting it to the Mac was tiresome enough, and I don't own a PDA, so... :-) Oh, and it uses OpenGL, which is a bit of a downer for handheld devices. I could rewrite the renderer to use a 2D blitter of course, but it would be a bit of work. It would be cool though! Cheers, Chris
I think the iPhones use a version of openGL. -Joel
Dec 08 2007
parent Jan Claeys <digitalmars janc.be> writes:
Op Sat, 08 Dec 2007 15:56:20 -0800, schreef janderson:

 I think the iPhones use a version of openGL.
As well as OpenMoko's default hardware/software combo. -- JanC
Dec 08 2007
prev sibling next sibling parent reply =?ISO-8859-1?Q?=22J=E9r=F4me_M=2E_Berger=22?= <jeberger free.fr> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chris P. wrote:
 Greetings,
 
 I'm the author of the indie game Mayhem Intergalactic. I've been selling
 it since July, and I'm still working on improving it.
 
From the video, it looks like a real-time version of GNULactic Konquest (http://www.ia.net/~rsteffen/konquest.html but unfortunately it appears to be down) Jerome - -- +------------------------- Jerome M. BERGER ---------------------+ | mailto:jeberger free.fr | ICQ: 238062172 | | http://jeberger.free.fr/ | Jabber: jeberger jabber.fr | +---------------------------------+------------------------------+ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFHWlLvd0kWM4JG3k8RAttDAKCCrgAQuCEE1Lv/VmKIC8Y6ZDSUbQCghKAT y545Sm3Ott20Kx16aFMRk2Q= =dDwz -----END PGP SIGNATURE-----
Dec 08 2007
next sibling parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
Jérôme M. Berger wrote:
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
 Chris P. wrote:
 Greetings,

 I'm the author of the indie game Mayhem Intergalactic. I've been selling
 it since July, and I'm still working on improving it.
From the video, it looks like a real-time version of GNULactic Konquest (http://www.ia.net/~rsteffen/konquest.html but unfortunately it appears to be down)
It also looks a lot like a real-time graphical version of Galactic Empire for the Apple ][. Apparenly you can download from here if you really want to see interplanetary conquest rendered in glorious 40 column ASCII: http://www.geocities.com/SunsetStrip/Hotel/5926/apple2.htm Was a very simple game. Each planet produces some number of ships per turn (no different kinds, just one). Sending fleets of ships takes a few turns per X units of distance. Winning a planet takes around 1.5x number of ships as the defending force, but it's randomized so send more if you want to be guaranteed victory, and have some ships left over for defense. Try to conquer all the planets. That was it. Is that basically what Mayhem Intergalactic is? My dad was totally addicted to that game. We bought used Apple ]['s after ours died just so he could keep on playing that one game. You couldn't choose a game scenario, but he found that if he did the exact sequence of things before starting the game the random number generator would be in the same state so that he could replay the same scenario till he could beat it! --bb
Dec 08 2007
parent "Chris P." <chrisp inventivedingo.com> writes:
Bill Baxter wrote:
 It also looks a lot like a real-time graphical version of Galactic 
 Empire for the Apple ][.
 
 Apparenly you can download from here if you really want to see 
 interplanetary conquest rendered in glorious 40 column ASCII:
    http://www.geocities.com/SunsetStrip/Hotel/5926/apple2.htm
 
 Was a very simple game.  Each planet produces some number of ships per 
 turn (no different kinds, just one).  Sending fleets of ships takes a 
 few turns per X units of distance.  Winning a planet takes around 1.5x 
 number of ships as the defending force, but it's randomized so send more 
 if you want to be guaranteed victory, and have some ships left over for 
 defense.  Try to conquer all the planets.  That was it.
 
 Is that basically what Mayhem Intergalactic is?  My dad was totally 
 addicted to that game.  We bought used Apple ]['s after ours died just 
 so he could keep on playing that one game.   You couldn't choose a game 
 scenario, but he found that if he did the exact sequence of things 
 before starting the game the random number generator would be in the 
 same state so that he could replay the same scenario till he could beat it!
 
 --bb
Heh. Yeah, that's basically it. The details vary, but if you liked Galactic Empire then you will like Mayhem Intergalactic. There's a whole sub-genre of similar games. (Mine is the best, of course. ;-) ) By the way - Mayhem Intergalactic has a Restart button (not in the demo IIRC), so you can replay the exact same game again without resorting to tricking the random number generator. As amusing as that is. <g> Cheers, Chris
Dec 08 2007
prev sibling parent reply "Chris P." <chrisp inventivedingo.com> writes:
Jérôme M. Berger wrote:
 	From the video, it looks like a real-time version of GNULactic
 Konquest (http://www.ia.net/~rsteffen/konquest.html but
 unfortunately it appears to be down)
 
 		Jerome
Actually it's turn-based. :-) If you want a real-time version, try Galcon. Sadly, Galcon was not written in D, and I didn't write it; but it's a good game anyway. Mayhem Intergalactic has similarities to Konquest, certainly. Playing it is quite a different experience, however - smoother, prettier, and more enjoyable, at least in my opinion. Your mileage may vary. Cheers, Chris
Dec 08 2007
parent reply =?UTF-8?B?U3TDqXBoYW4gS29jaGVu?= <stephan kochen.nl> writes:
Chris P. wrote:
 Jérôme M. Berger wrote:
 	From the video, it looks like a real-time version of GNULactic
 Konquest (http://www.ia.net/~rsteffen/konquest.html but
 unfortunately it appears to be down)

 		Jerome
Actually it's turn-based. :-) If you want a real-time version, try Galcon. Sadly, Galcon was not written in D, and I didn't write it; but it's a good game anyway. Mayhem Intergalactic has similarities to Konquest, certainly. Playing it is quite a different experience, however - smoother, prettier, and more enjoyable, at least in my opinion. Your mileage may vary. Cheers, Chris
While we're drawing comparisons, was it inspired by Spaceward Ho? :) http://www.deltatao.com/ho/ http://en.wikipedia.org/wiki/Spaceward_Ho! I should try that demo out soon. -- Stéphan
Dec 08 2007
parent "Chris P." <chrisp inventivedingo.com> writes:
Stéphan Kochen wrote:
 Chris P. wrote:
 Jérôme M. Berger wrote:
 	From the video, it looks like a real-time version of GNULactic
 Konquest (http://www.ia.net/~rsteffen/konquest.html but
 unfortunately it appears to be down)

 		Jerome
Actually it's turn-based. :-) If you want a real-time version, try Galcon. Sadly, Galcon was not written in D, and I didn't write it; but it's a good game anyway. Mayhem Intergalactic has similarities to Konquest, certainly. Playing it is quite a different experience, however - smoother, prettier, and more enjoyable, at least in my opinion. Your mileage may vary. Cheers, Chris
While we're drawing comparisons, was it inspired by Spaceward Ho? :) http://www.deltatao.com/ho/ http://en.wikipedia.org/wiki/Spaceward_Ho! I should try that demo out soon. -- Stéphan
There's one I hadn't seen before! So no, no inspiration from there. :-) As far as I can remember, the original original inspiration was some old OS/2 game that I played as a kid. I forget what it was called, and I think it was more complicated (it had a tech tree and multiple ship types). At some point I wrote a simple (and ugly) clone of it for a game creation system. Even with the lack of eye candy and features, it suddenly became one of the more popular games on the platform! At that point I figured I was on to something. Cheers, Chris
Dec 08 2007
prev sibling next sibling parent janderson <askme me.com> writes:
Chris P. wrote:
 Greetings,
 
 I'm the author of the indie game Mayhem Intergalactic. I've been selling
 it since July, and I'm still working on improving it.
 
 I'm making this post here because Mayhem Intergalactic is written in D -
 making it the first released commercial game written in D, as far as I
 know. Please correct me if I'm wrong. :-)
 
 It's using OpenGL and SDL via Derelict, and Phobos (Tango didn't exist
 when I started). You can check out the demo and/or snag yourself a copy
 here:
 
 http://www.inventivedingo.com/mayhemig
 
 Windows only for the moment I'm afraid. I'm still working on Linux and
 Mac support.
 
 Cheers,
 Chris Pelling
 
 
 P.S. I know, I'm a bit late making this post - the impetus for doing it
 now was Aldacron noticing me talking elsewhere about Mayhem
 Intergalactic being written in D, and blogging about it:
 http://dblog.aldacron.net/2007/12/06/mayhem-intergalactic/
 
 P.P.S. Anyone who can help me fix the crash I'm getting on the Mac wins
 a free copy of the game. ;-)  (See the tail end of
 http://dsource.org/forums/viewtopic.php?t=3401 for details.)
Nice work! I'm glad to see D making inroads into the commercial game industry. Looks like a futuristic risk game. -Joel
Dec 08 2007
prev sibling parent reply Ansible <notmyemailaddress nospam.com> writes:
Looks great!

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
Dec 11 2007
parent reply "Chris P." <chrisp inventivedingo.com> writes:
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
Dec 12 2007
next sibling parent reply Kirk McDonald <kirklin.mcdonald gmail.com> writes:
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
Dec 12 2007
parent "Chris P." <chrisp inventivedingo.com> writes:
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
Dec 13 2007
prev sibling next sibling parent reply janderson <askme me.com> writes:
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!
Dec 12 2007
parent "Chris P." <chrisp inventivedingo.com> writes:
janderson wrote:
 This is a great writeup.  Cheers!
Happy to oblige. I don't need much encouragement to ramble. :-) -- Chris P
Dec 13 2007
prev sibling parent reply Sebastian Beschke <s.beschke gmx.de> writes:
-----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?
 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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHYUPPKb/1n5A2TAMRAnE+AJ0UyFjTRh0R+wLbvQOpWdWSh2erUgCfYVR8 oH15L5pNSrSSR7jf4Ye5tfo= =8oGt -----END PGP SIGNATURE-----
Dec 13 2007
next sibling parent Clay Smith <clayasaurus gmail.com> writes:
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
Dec 13 2007
prev sibling parent reply "Chris P." <chrisp inventivedingo.com> writes:
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.
Dec 18 2007
parent Clay Smith <clayasaurus gmail.com> writes:
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
Dec 20 2007