Game development with D

Chapter 8, Exploring the Wide World of D, introduced the Derelict and Diemos bindings projects. While Deimos includes bindings for C libraries that are useful for game development, Derelict was created with games in mind. Between them, you can find dynamic and/or static bindings for several C and C++ libraries that are commonly used in game development, such as:

  • SDL2: The Simple Directmedia Layer is a library that abstracts window and input handling on several platforms. It allows creating OpenGL-capable windows and ships with a hardware-accelerated 2D renderer that has backends for OpenGL, OpenGL ES, and Direct3D. It is available at http://libsdl.org/.
  • SFML2: The Simple and Fast Multimedia Library is a C++ library similar to SDL2. It can be used solely to create OpenGL-enabled windows on mulitple platforms, but also ships with a 2D renderer built on top of OpenGL. Its home page is at http://www.sfml-dev.org/. There is an alternative static binding available at http://www.dsfml.com/.
  • GLFW3: GLFW is a small, simple library aimed at one thing: abstracting the window and event handling for OpenGL applications on multiple platforms. Unlike SDL2 or SFML2, it does not come with any bells and whistles for rendering, image loading, or anything other than window and event handling. Refer to http://www.glfw.org/.

Derelict includes bindings for OpenGL, OpenAL, OpenCL, OpenIL, FreeImage, FreeType, and other libraries useful for game development. There is also a binding in Derelict for the Allegro library (http://liballeg.org/). A static binding for Allegro, maintained by one of the Allegro developers, can be found at https://github.com/SiegeLord/DAllegro5.

If you're looking for libraries to help make a game engine, GFM is a project that has a number of convenience wrappers to several of the libraries mentioned above and more. It's available at https://github.com/d-gamedev-team/gfm. To handle all of the vectors, matrixes, quaternions, and other math constructs you may need, there's the gl3n library at https://github.com/Dav1dde/gl3n.

If you aren't looking for C library bindings and aren't planning to make your own game engine, you may want to turn to DGame, a simple but popular 2D game framework at https://github.com/Dgame/Dgame. If you're looking to move into 3D, Circular Studios maintains the Dash engine at https://github.com/Circular-Studios/Dash. For anyone looking to integrate D into an existing game engine, Manu Evans gave a presentation at DConf 2013 on how Remedy Games did just that for one of their projects (refer to http://dconf.org/2013/talks/evans_1.html).

There are a number of hobbyist game developers in the D community, and some who work in the industry. At the time of writing, a couple of D games have been released on Steam and there are quite a few projects scattered around the internet. Game development is one of the areas where there is ample opportunity for anyone developing D-specific tools and libraries. If it's an area of interest for you, I encourage you to reach out to others on the #D IRC channel and in the forums.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.144.65