www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - D game development: a call to action

reply "Jonathan A Dunlap" <jdunlap outlook.com> writes:
I am one of the few who have taken a keen interest in D for game 
development. The concise language and modern conveniences may be 
able to reduce many hours worth of development time off a game 
project, while making the code more maintainable. Aside from the 
core language, Dlang graphics bindings have a way to go before 
even earning acceptance in the indie gaming scene, but it's 
making great strides to get there.

The main challenge I've hit is the lack of any sort of path for 
adopting a media engine. Bindings (like SFML 
https://github.com/krzat/SFML-D) all suffer from:

A) No information about its current status: this is scary if its 
repo hasn't been updated in months.
B) Usually are complex to get working in a new project (manually 
building or searching for undocumented dependency DLLs)
C) Lack practical references and tutorials for "real would usage"
e.g. "how to create an OpenGL window" or "how to render a 
triangle"
versus something like "how to load from disk an image texture 
onto a quad and move it around using keyboard events"

SFML bindings are also in https://github.com/aldacron/Derelict3 
but I couldn't find a scrap of information on how to use it, how 
to compile correctly, or example usage. It's unclear if the 
library is even usable in its current state.

Please don't take this as blind criticism, but rather a plea to 
action for the community to provide better library documentation 
support for: current lib status, getting started adding it, and a 
general use tutorial/example. If we start doing this, it'll make 
a big impact for other game developers who are new to Dlang to 
adopt the language. Thanks for listening!
Aug 05 2013
next sibling parent Justin Whear <justin economicmodeling.com> writes:
On Mon, 05 Aug 2013 20:18:29 +0200, Jonathan A Dunlap wrote::
 
 A) No information about its current status: this is scary if its repo
 hasn't been updated in months.
 B) Usually are complex to get working in a new project (manually
 building or searching for undocumented dependency DLLs)
 C) Lack practical references and tutorials for "real would usage"
 e.g. "how to create an OpenGL window" or "how to render a triangle"
 versus something like "how to load from disk an image texture onto a
 quad and move it around using keyboard events"
 
 SFML bindings are also in https://github.com/aldacron/Derelict3 but I
 couldn't find a scrap of information on how to use it, how to compile
 correctly, or example usage. It's unclear if the library is even usable
 in its current state.
 
 Please don't take this as blind criticism, but rather a plea to action
 for the community to provide better library documentation support for:
 current lib status, getting started adding it, and a general use
 tutorial/example. If we start doing this, it'll make a big impact for
 other game developers who are new to Dlang to adopt the language. Thanks
 for listening!

A) I recommend using Derelict3--it's kept up to date, looking at the commit log shows work in the last 24 hours to update the bindings. It's also well designed and works well. B) If using Derelict3, you simply need to: build Derelict3 (it's as simple as running build/build.d) and have recent builds of whatever libraries you're using through it. How difficult the shared libraries dependencies are is project by project and not really a D-specific issue. C) Derelict3 is basically just bindings over the C functions--you should use any and all documentation, references, and tutorials against the C libraries. E.g. any C language tutorials on SFML, OpenGL, etc. are trivially translatable once you understand how to load the Derelict modules (again, look at the Derelict README).
Aug 05 2013
prev sibling next sibling parent "Borislav Kosharov" <bosak gmail.com> writes:
On Monday, 5 August 2013 at 18:18:30 UTC, Jonathan A Dunlap wrote:
 I am one of the few who have taken a keen interest in D for 
 game development. The concise language and modern conveniences 
 may be able to reduce many hours worth of development time off 
 a game project, while making the code more maintainable. Aside 
 from the core language, Dlang graphics bindings have a way to 
 go before even earning acceptance in the indie gaming scene, 
 but it's making great strides to get there.

 The main challenge I've hit is the lack of any sort of path for 
 adopting a media engine. Bindings (like SFML 
 https://github.com/krzat/SFML-D) all suffer from:

 A) No information about its current status: this is scary if 
 its repo hasn't been updated in months.
 B) Usually are complex to get working in a new project 
 (manually building or searching for undocumented dependency 
 DLLs)
 C) Lack practical references and tutorials for "real would 
 usage"
 e.g. "how to create an OpenGL window" or "how to render a 
 triangle"
 versus something like "how to load from disk an image texture 
 onto a quad and move it around using keyboard events"

 SFML bindings are also in https://github.com/aldacron/Derelict3 
 but I couldn't find a scrap of information on how to use it, 
 how to compile correctly, or example usage. It's unclear if the 
 library is even usable in its current state.

 Please don't take this as blind criticism, but rather a plea to 
 action for the community to provide better library 
 documentation support for: current lib status, getting started 
 adding it, and a general use tutorial/example. If we start 
 doing this, it'll make a big impact for other game developers 
 who are new to Dlang to adopt the language. Thanks for 
 listening!

Take a look at https://github.com/Jebbs/DSFML The autor, aubade, me and few other guys are trying to maintain the project. I wrote a small tutorial on the wiki. And we have plans on documenting it, adding unittests and much more. The autor announced today that he will soon update the C bindings to SFML 2.1 If you have any problems using it just open an issue on github.
Aug 05 2013
prev sibling next sibling parent "Jonathan A Dunlap" <jdunlap outlook.com> writes:
 C) Derelict3 is basically just bindings over the C 
 functions--you should
 use any and all documentation, references, and tutorials 
 against the C
 libraries.

Thanks Justin for the response. Derelict3 does seem to be the library with the most activity by far. However, it's simply not good enough to just say that since these are just bindings that the documentation/examples in the host language is adequate. This is true under the assumption that: the developer already is comfortable in the D language to know the usage difference, are familiar with the lib API to know when these differences apply, or even know to translate dependent idioms outside the actual library usage (like loading an image from disk, to apply to a texture, may be a separate but related learned task to the library). If we are looking for a broader adoption of D, we should be in the mindset of someone who may not even have a background in computer science here.
Aug 05 2013
prev sibling next sibling parent "Jonathan A Dunlap" <jdunlap outlook.com> writes:
 Take a look at https://github.com/Jebbs/DSFML
 The autor, aubade, me and few other guys are trying to maintain 
 the project. I wrote a small tutorial on the wiki. And we have 
 plans on documenting it, adding unittests and much more.

Great stuff, Borislav. The basic tutorial https://github.com/Jebbs/DSFML/wiki/Short-example helps a lot to grok how to get your feet wet. I'm looking forward to seeing more tutorials like this.
Aug 05 2013
prev sibling next sibling parent "Borislav Kosharov" <bosak gmail.com> writes:
On Monday, 5 August 2013 at 19:03:29 UTC, Jonathan A Dunlap wrote:
 Take a look at https://github.com/Jebbs/DSFML
 The autor, aubade, me and few other guys are trying to 
 maintain the project. I wrote a small tutorial on the wiki. 
 And we have plans on documenting it, adding unittests and much 
 more.

Great stuff, Borislav. The basic tutorial https://github.com/Jebbs/DSFML/wiki/Short-example helps a lot to grok how to get your feet wet. I'm looking forward to seeing more tutorials like this.

Thanks! Bear in mind that the autor is working on splitting the 5 modules into separate files for each class. That is because currently everything is too cluttered into one file for each sfml sub-module. See the Experimental branch, it is almost done. After the change you would be able to more easily browse code and the only change you would have to make is in the imports. So instead of: import dsfml.system; -> import dsfml.system.all; or import specific classes: import dsfml.system.vector; //or something like that Also about building and assembling everything together, see https://github.com/Jebbs/DSFML/issues/34 A build.d script is being worked on and things like adding more documentation, unittests and examples are being worked on too. Also an suggestion has been made to add dsfml to the DUB package manager(that is used by vibe.d) and is something similar to ruby's gems manager. And now that Direlict has been mentioned, I suggest you to not use it for sfml. It is just a collection of c-bindings of popular libraries.
Aug 05 2013
prev sibling next sibling parent "Namespace" <rswhite4 googlemail.com> writes:
I'm working currently on Dgame: http://dgame-dev.de/
I'm almost finished, but the documentation, the tutorials and the 
download there is not up to date, but that will change in the 
next few days (now that I had my last exam today).
My fellow students and I also work with Dgame on a 2D 
sidescroller. The work on it was stopped because of exams, but it 
will continue in the coming weeks.
Aug 05 2013
prev sibling next sibling parent "Borislav Kosharov" <bosak gmail.com> writes:
 ...

Oh and I completely forgot to mention that I am working on a D version of the spine runtime (http://esotericsoftware.com/). If you haven't heard of it it is a 2D skeletal animation tool that exports to bin or json(other formats too). And there are many runtime libraries for many languages(currently no D support) and popular game engines. Although the tool isn't free ($70), it helps development A LOT. However the 'format' is open, so one could write his own editor/exporter. Runtimes are usually split up in two - engine and renderer. The engine part is language-specific (for example C#) and it only parses the data into appropriate structires that the renderer will use later. The renderer part is gameengine-specific (for example Unity, XNA, MonoGame for C#) and uses the engine part's source. Then the renderer part just implements one or two classes that do the actual rendering and logic updates that are engine-specific. And yeah, I decided to make a D runtime for spine: https://github.com/nikibobi/spine-d - engine part (pure D) https://github.com/nikibobi/spine-dsfml - renderer part (D + DSFML) Also I forgot to mention that aubade made an separate repository for SFML extensions ported to D like sfMod and sfMidi https://github.com/aubade/dsfml-contrib Also about your original post you mentioned SFML-D and if you have looked the original SFML site's bindings page(http://www.sfml-dev.org/download/bindings.php) it is indicated that SFML-D is inactive. And there is Jebbs DSFML marked as active along with Direlict 3
Aug 05 2013
prev sibling next sibling parent "Borislav Kosharov" <bosak gmail.com> writes:
On Monday, 5 August 2013 at 19:33:59 UTC, Namespace wrote:
 I'm working currently on Dgame: http://dgame-dev.de/
 I'm almost finished, but the documentation, the tutorials and 
 the download there is not up to date, but that will change in 
 the next few days (now that I had my last exam today).
 My fellow students and I also work with Dgame on a 2D 
 sidescroller. The work on it was stopped because of exams, but 
 it will continue in the coming weeks.

Wow that's great news! I will try it and maybe try to help you test it and improve it. I will look more into it tomorrow when I have more time. But from the first looks, I like the site design and the engine looks a lot like SFML(a good thing).
Aug 05 2013
prev sibling next sibling parent Justin Whear <justin economicmodeling.com> writes:
On Mon, 05 Aug 2013 20:59:32 +0200, Jonathan A Dunlap wrote:

 C) Derelict3 is basically just bindings over the C functions--you
 should use any and all documentation, references, and tutorials against
 the C libraries.

Thanks Justin for the response. Derelict3 does seem to be the library with the most activity by far. However, it's simply not good enough to just say that since these are just bindings that the documentation/examples in the host language is adequate. This is true under the assumption that: the developer already is comfortable in the D language to know the usage difference, are familiar with the lib API to know when these differences apply, or even know to translate dependent idioms outside the actual library usage (like loading an image from disk, to apply to a texture, may be a separate but related learned task to the library). If we are looking for a broader adoption of D, we should be in the mindset of someone who may not even have a background in computer science here.

All Derelict3 "usage differences" are clearly documented in a wonderfully short section in the README. I don't think it's a problem to assume that someone who wants to "write a video game in the D programming language" has a basic working knowledge of D and of the various aspects of language agnostic game programming; i.e. documentation on how to invent the universe should not be a prerequisite for baking an apple pie. That said, I will seriously consider writing an article on getting started with modern OpenGL with Derelict3.
Aug 05 2013
prev sibling next sibling parent "Namespace" <rswhite4 googlemail.com> writes:
On Monday, 5 August 2013 at 19:47:40 UTC, Borislav Kosharov wrote:
 On Monday, 5 August 2013 at 19:33:59 UTC, Namespace wrote:
 I'm working currently on Dgame: http://dgame-dev.de/
 I'm almost finished, but the documentation, the tutorials and 
 the download there is not up to date, but that will change in 
 the next few days (now that I had my last exam today).
 My fellow students and I also work with Dgame on a 2D 
 sidescroller. The work on it was stopped because of exams, but 
 it will continue in the coming weeks.

Wow that's great news! I will try it and maybe try to help you test it and improve it. I will look more into it tomorrow when I have more time. But from the first looks, I like the site design and the engine looks a lot like SFML(a good thing).

Yes SFML was one of my inspirations. I'll hurry to bring everything up to date. And of course I'd be happy about any help. ;)
Aug 05 2013
prev sibling next sibling parent "Jeremy DeHaan" <dehaan.jeremiah gmail.com> writes:
On Monday, 5 August 2013 at 19:33:59 UTC, Namespace wrote:
The work on it was stopped because of exams, but
 it will continue in the coming weeks.

That's the exact same problem I am having with DSFML! I was making good progress until my teacher stated giving me tests and homework! What a jerk!
Aug 05 2013
prev sibling next sibling parent "luminousone" <rd.hunt gmail.com> writes:
On Monday, 5 August 2013 at 18:18:30 UTC, Jonathan A Dunlap wrote:
 I am one of the few who have taken a keen interest in D for 
 game development. The concise language and modern conveniences 
 may be able to reduce many hours worth of development time off 
 a game project, while making the code more maintainable. Aside 
 from the core language, Dlang graphics bindings have a way to 
 go before even earning acceptance in the indie gaming scene, 
 but it's making great strides to get there.

 The main challenge I've hit is the lack of any sort of path for 
 adopting a media engine. Bindings (like SFML 
 https://github.com/krzat/SFML-D) all suffer from:

 A) No information about its current status: this is scary if 
 its repo hasn't been updated in months.
 B) Usually are complex to get working in a new project 
 (manually building or searching for undocumented dependency 
 DLLs)
 C) Lack practical references and tutorials for "real would 
 usage"
 e.g. "how to create an OpenGL window" or "how to render a 
 triangle"
 versus something like "how to load from disk an image texture 
 onto a quad and move it around using keyboard events"

 SFML bindings are also in https://github.com/aldacron/Derelict3 
 but I couldn't find a scrap of information on how to use it, 
 how to compile correctly, or example usage. It's unclear if the 
 library is even usable in its current state.

 Please don't take this as blind criticism, but rather a plea to 
 action for the community to provide better library 
 documentation support for: current lib status, getting started 
 adding it, and a general use tutorial/example. If we start 
 doing this, it'll make a big impact for other game developers 
 who are new to Dlang to adopt the language. Thanks for 
 listening!

I am working on a media/gaming library for D, its not even pre alpha, and I am learning parts of the language as I go so the code is very ugly, and the naming conventions are scatter brained. However I don't use any wrappers of other media libraries such as sfml, I only have the minimal bindings required to link with X11 and opengl(I do plan on windows bindings as well, but i haven't done that yet). At the moment I am tackling concurrency, That bit is giving me endless headaches, I am trying to setup a seperate thread to handle opengl calls and a seperate thread for handling object updates. https://github.com/luminousone/dmedia I haven't picked a license yet, but it will be something that is rather open but leaves me the option to staticly link it in closed projects. I still think you might find a few interesting bits in that link, but it does have a while to go before it is remotely useable. I am open to working with others, or making changes to what I have done if anyone is interested.
Aug 05 2013
prev sibling parent "qznc" <qznc web.de> writes:
On Monday, 5 August 2013 at 18:18:30 UTC, Jonathan A Dunlap wrote:
 I am one of the few who have taken a keen interest in D for 
 game development. The concise language and modern conveniences 
 may be able to reduce many hours worth of development time off 
 a game project, while making the code more maintainable. Aside 
 from the core language, Dlang graphics bindings have a way to 
 go before even earning acceptance in the indie gaming scene, 
 but it's making great strides to get there.

 The main challenge I've hit is the lack of any sort of path for 
 adopting a media engine. Bindings (like SFML 
 https://github.com/krzat/SFML-D) all suffer from:

 A) No information about its current status: this is scary if 
 its repo hasn't been updated in months.
 B) Usually are complex to get working in a new project 
 (manually building or searching for undocumented dependency 
 DLLs)
 C) Lack practical references and tutorials for "real would 
 usage"
 e.g. "how to create an OpenGL window" or "how to render a 
 triangle"
 versus something like "how to load from disk an image texture 
 onto a quad and move it around using keyboard events"

 SFML bindings are also in https://github.com/aldacron/Derelict3 
 but I couldn't find a scrap of information on how to use it, 
 how to compile correctly, or example usage. It's unclear if the 
 library is even usable in its current state.

 Please don't take this as blind criticism, but rather a plea to 
 action for the community to provide better library 
 documentation support for: current lib status, getting started 
 adding it, and a general use tutorial/example. If we start 
 doing this, it'll make a big impact for other game developers 
 who are new to Dlang to adopt the language. Thanks for 
 listening!

I am using DAllegro 5 for 2D stuff. So far, it went very smooth. I just use the original documentation. https://github.com/SiegeLord/DAllegro5
Aug 05 2013